(function (root, factory) { if (typeof define === 'function' && define.amd) define(['exports', 'kotlin', 'door-door-runtime', 'UstadMobile-lib-database-entities', 'UstadMobile-lib-database', 'kotlinx-coroutines-core', 'Napier-napier-js-legacy', 'ktor-ktor-http-js-legacy', 'ktor-ktor-client-core-js-legacy'], factory); else if (typeof exports === 'object') factory(module.exports, require('kotlin'), require('door-door-runtime'), require('UstadMobile-lib-database-entities'), require('UstadMobile-lib-database'), require('kotlinx-coroutines-core'), require('Napier-napier-js-legacy'), require('ktor-ktor-http-js-legacy'), require('ktor-ktor-client-core-js-legacy')); else { if (typeof kotlin === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['door-door-runtime'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'door-door-runtime' was not found. Please, check whether 'door-door-runtime' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['UstadMobile-lib-database-entities'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'UstadMobile-lib-database-entities' was not found. Please, check whether 'UstadMobile-lib-database-entities' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['UstadMobile-lib-database'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'UstadMobile-lib-database' was not found. Please, check whether 'UstadMobile-lib-database' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['kotlinx-coroutines-core'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['Napier-napier-js-legacy'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'Napier-napier-js-legacy' was not found. Please, check whether 'Napier-napier-js-legacy' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['ktor-ktor-http-js-legacy'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'ktor-ktor-http-js-legacy' was not found. Please, check whether 'ktor-ktor-http-js-legacy' is loaded prior to 'UstadMobile-lib-database-mpp'."); }if (typeof this['ktor-ktor-client-core-js-legacy'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database-mpp'. Its dependency 'ktor-ktor-client-core-js-legacy' was not found. Please, check whether 'ktor-ktor-client-core-js-legacy' is loaded prior to 'UstadMobile-lib-database-mpp'."); }root['UstadMobile-lib-database-mpp'] = factory(typeof this['UstadMobile-lib-database-mpp'] === 'undefined' ? {} : this['UstadMobile-lib-database-mpp'], kotlin, this['door-door-runtime'], this['UstadMobile-lib-database-entities'], this['UstadMobile-lib-database'], this['kotlinx-coroutines-core'], this['Napier-napier-js-legacy'], this['ktor-ktor-http-js-legacy'], this['ktor-ktor-client-core-js-legacy']); } }(this, function (_, Kotlin, $module$door_door_runtime, $module$UstadMobile_lib_database_entities, $module$UstadMobile_lib_database, $module$kotlinx_coroutines_core, $module$Napier_napier_js_legacy, $module$ktor_ktor_http_js_legacy, $module$ktor_ktor_client_core_js_legacy) { 'use strict'; var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {}); var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED; var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl; var trimMargin = Kotlin.kotlin.text.trimMargin_rjktp$; var PreparedStatementConfig = $module$door_door_runtime.com.ustadmobile.door.PreparedStatementConfig; var executeUpdateAsyncKmp = $module$door_door_runtime.com.ustadmobile.door.jdbc.ext.executeUpdateAsyncKmp_o9f2ds$; var Unit = Kotlin.kotlin.Unit; var prepareAndUseStatementAsync = $module$door_door_runtime.com.ustadmobile.door.ext.prepareAndUseStatementAsync_11xvef$; var SiteTerms = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SiteTerms; var throwCCE = Kotlin.throwCCE; var executeQueryAsyncKmp = $module$door_door_runtime.com.ustadmobile.door.jdbc.ext.executeQueryAsyncKmp_o9f2ds$; var useResults = $module$door_door_runtime.com.ustadmobile.door.ext.useResults_vtdvuh$; var listOf = Kotlin.kotlin.collections.listOf_i5x0yv$; var SiteTermsWithLanguage = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SiteTermsWithLanguage; var Language = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Language; var ensureNotNull = Kotlin.ensureNotNull; var toList = Kotlin.kotlin.collections.toList_7wnvza$; var DoorLiveDataImpl = $module$door_door_runtime.com.ustadmobile.door.DoorLiveDataImpl; var DoorDataSourceFactory = $module$door_door_runtime.com.ustadmobile.door.DoorDataSourceFactory; var Kind_CLASS = Kotlin.Kind.CLASS; var prepareAndUseStatementAsync_0 = $module$door_door_runtime.com.ustadmobile.door.ext.prepareAndUseStatementAsync_qi2lrt$; var SiteTermsDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.SiteTermsDao; var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$; var L0 = Kotlin.Long.ZERO; var equals = Kotlin.equals; var EntityInsertionAdapter = $module$door_door_runtime.com.ustadmobile.door.EntityInsertionAdapter; var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_287e2$; var get_rootDatabase = $module$door_door_runtime.com.ustadmobile.door.ext.get_rootDatabase_igmkyi$; var get_doorPrimaryKeyManager = $module$door_door_runtime.com.ustadmobile.door.ext.get_doorPrimaryKeyManager_igmkyi$; var systemTimeInMillis = $module$door_door_runtime.com.ustadmobile.door.util.systemTimeInMillis; var DoorJsImplClasses = $module$door_door_runtime.com.ustadmobile.door.util.DoorJsImplClasses; var getKClass = Kotlin.getKClass; var UmAppDatabase = $module$UstadMobile_lib_database.com.ustadmobile.core.db.UmAppDatabase; var Kind_OBJECT = Kotlin.Kind.OBJECT; var DoorDatabaseMetadata = $module$door_door_runtime.com.ustadmobile.door.ext.DoorDatabaseMetadata; var LazyThreadSafetyMode = Kotlin.kotlin.LazyThreadSafetyMode; var ReplicationFieldMetaData = $module$door_door_runtime.com.ustadmobile.door.replication.ReplicationFieldMetaData; var ReplicationEntityMetaData = $module$door_door_runtime.com.ustadmobile.door.replication.ReplicationEntityMetaData; var to = Kotlin.kotlin.to_ujzrz7$; var mapOf = Kotlin.kotlin.collections.mapOf_qfcya0$; var lazy = Kotlin.kotlin.lazy_kls4a0$; var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$; var mutableLinkedListOf = $module$door_door_runtime.com.ustadmobile.door.ext.mutableLinkedListOf_i5x0yv$; var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$; var TransactionDepthCounter = $module$door_door_runtime.com.ustadmobile.door.util.TransactionDepthCounter; var DoorInvalidationTracker = $module$door_door_runtime.com.ustadmobile.door.util.DoorInvalidationTracker; var coroutines = $module$kotlinx_coroutines_core.kotlinx.coroutines; var ReplicationNotificationDispatcher = $module$door_door_runtime.com.ustadmobile.door.replication.ReplicationNotificationDispatcher; var get_replicationNotificationDispatcher = $module$door_door_runtime.com.ustadmobile.door.ext.get_replicationNotificationDispatcher_igmkyi$; var lazy_0 = Kotlin.kotlin.lazy_klfg04$; var DeleteZombieAttachmentsListener = $module$door_door_runtime.com.ustadmobile.door.util.DeleteZombieAttachmentsListener; var IncomingReplicationListenerHelper = $module$door_door_runtime.com.ustadmobile.door.IncomingReplicationListenerHelper; var NodeIdAuthCache = $module$door_door_runtime.com.ustadmobile.door.util.NodeIdAuthCache; var get_nodeIdAuthCache = $module$door_door_runtime.com.ustadmobile.door.ext.get_nodeIdAuthCache_igmkyi$; var doorDatabaseMetadata = $module$door_door_runtime.com.ustadmobile.door.ext.doorDatabaseMetadata_e9mau3$; var DoorPrimaryKeyManager = $module$door_door_runtime.com.ustadmobile.door.DoorPrimaryKeyManager; var DoorDatabaseJdbc = $module$door_door_runtime.com.ustadmobile.door.DoorDatabaseJdbc; var copyToArray = Kotlin.kotlin.collections.copyToArray; var DoorDatabaseReplicateWrapper = $module$door_door_runtime.com.ustadmobile.door.DoorDatabaseReplicateWrapper; var deleteFromChangeLog = $module$door_door_runtime.com.ustadmobile.door.ext.deleteFromChangeLog_hlgbzs$; var setOf = Kotlin.kotlin.collections.setOf_mh5how$; var withDoorTransactionAsync = $module$door_door_runtime.com.ustadmobile.door.ext.withDoorTransactionAsync_es2jyg$; var napier = $module$Napier_napier_js_legacy.io.github.aakira.napier; var toString = Kotlin.toString; var setOf_0 = Kotlin.kotlin.collections.setOf_i5x0yv$; var ReplicationRunOnChangeRunner = $module$door_door_runtime.com.ustadmobile.door.replication.ReplicationRunOnChangeRunner; var LinkedHashSet_init = Kotlin.kotlin.collections.LinkedHashSet_init_287e2$; var makeNewSubscriptionManager = $module$door_door_runtime.com.ustadmobile.door.replication.makeNewSubscriptionManager_34ban0$; var RepositoryHelper = $module$door_door_runtime.com.ustadmobile.door.RepositoryHelper; var DoorDatabaseRepository = $module$door_door_runtime.com.ustadmobile.door.DoorDatabaseRepository; var AgentEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.AgentEntity; var prepareAndUseStatement = $module$door_door_runtime.com.ustadmobile.door.ext.prepareAndUseStatement_inykq9$; var prepareAndUseStatement_0 = $module$door_door_runtime.com.ustadmobile.door.ext.prepareAndUseStatement_xo9mwf$; var AgentDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.AgentDao; var ChatWithLatestMessageAndCount = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ChatWithLatestMessageAndCount; var Chat = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Chat; var ChatDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ChatDao; var ChatMemberDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ChatMemberDao; var ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer; var Container = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Container; var ContentEntryParentChildJoin = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryParentChildJoin; var ContentEntryStatementScoreProgress = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryStatementScoreProgress; var ClazzAssignmentContentJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzAssignmentContentJoinDao; var ClazzAssignment = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzAssignment; var AssignmentProgressSummary = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.AssignmentProgressSummary; var PersonGroupAssignmentSummary = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonGroupAssignmentSummary; var ClazzAssignmentWithCourseBlock = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzAssignmentWithCourseBlock; var CourseBlock = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseBlock; var listOf_0 = Kotlin.kotlin.collections.listOf_mh5how$; var ClazzAssignmentDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzAssignmentDao; var ClazzAssignmentRollUpDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzAssignmentRollUpDao; var ClazzContentJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzContentJoinDao; var Clazz = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Clazz; var ClazzWithHolidayCalendarAndSchoolAndTerminology = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzWithHolidayCalendarAndSchoolAndTerminology; var HolidayCalendar = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.HolidayCalendar; var School = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.School; var CourseTerminology = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseTerminology; var ClazzWithListDisplayDetails = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzWithListDisplayDetails; var ClazzEnrolment = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzEnrolment; var UidAndLabel = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.UidAndLabel; var ClazzWithDisplayDetails = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails; var ClazzWithSchool = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzWithSchool; var ClazzDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzDao; var takeFrom = $module$ktor_ktor_http_js_legacy.io.ktor.http.takeFrom_jl1sg7$; var doorNodeAndVersionHeaders = $module$door_door_runtime.com.ustadmobile.door.ext.doorNodeAndVersionHeaders_rq8txc$; var header = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.request.header_xadl6p$; var parameter = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.request.parameter_xadl6p$; var createKType = Kotlin.createKType; var wrapFunction = Kotlin.wrapFunction; var HttpStatement = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].io.ktor.client.statement.HttpStatement; var getReifiedTypeParameterKType = Kotlin.getReifiedTypeParameterKType; var utils = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].io.ktor.client.utils; var url = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].io.ktor.client.request.url_3rzbk2$; var HttpMethod = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-http-js-legacy'].io.ktor.http.HttpMethod; var HttpRequestBuilder_init = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].io.ktor.client.request.HttpRequestBuilder; var HttpResponse = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].io.ktor.client.statement.HttpResponse; var complete = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].io.ktor.client.statement.complete_abn2de$; var reflect = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect; var typeInfoImpl = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect.typeInfoImpl_1lvkm8$; var HttpStatusCode = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-http-js-legacy'].io.ktor.http.HttpStatusCode; var ClazzEnrolmentWithLeavingReason = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzEnrolmentWithLeavingReason; var LeavingReason = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.LeavingReason; var ClazzEnrolmentWithClazzAndAttendance = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzEnrolmentWithClazzAndAttendance; var ClazzEnrolmentWithClazz = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzEnrolmentWithClazz; var ClazzEnrolmentWithPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzEnrolmentWithPerson; var Person = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Person; var PersonWithClazzEnrolmentDetails = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonWithClazzEnrolmentDetails; var ClazzEnrolmentDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzEnrolmentDao; var ClazzLogAttendanceRecord = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzLogAttendanceRecord; var ClazzLogAttendanceRecordWithPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzLogAttendanceRecordWithPerson; var ClazzLogAttendanceRecordDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzLogAttendanceRecordDao; var ClazzLog = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzLog; var ClazzLogDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ClazzLogDao; var Comments = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Comments; var CommentsWithPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CommentsWithPerson; var CommentsDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CommentsDao; var ConnectivityStatus = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ConnectivityStatus; var ConnectivityStatusDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ConnectivityStatusDao; var ContainerWithContentEntry = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerWithContentEntry; var ContainerUidAndMimeType = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerUidAndMimeType; var ContainerDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContainerDao; var ContainerETagDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContainerETagDao; var ContainerEntryWithContainerEntryFile = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerEntryWithContainerEntryFile; var ContainerEntryFile = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerEntryFile; var ContainerEntryWithMd5 = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerEntryWithMd5; var ContainerEntryDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContainerEntryDao; var ContainerEntryFileUidAndPath = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerEntryFileUidAndPath; var ContainerEntryFileDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContainerEntryFileDao; var ContainerImportJob = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContainerImportJob; var ContainerImportJobDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContainerImportJobDao; var ContentCategory = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentCategory; var ContentCategoryDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentCategoryDao; var ContentCategorySchema = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentCategorySchema; var ContentCategorySchemaDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentCategorySchemaDao; var ContentEntryContentCategoryJoin = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryContentCategoryJoin; var ContentEntryContentCategoryJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentEntryContentCategoryJoinDao; var ContentEntryWithLanguage = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryWithLanguage; var ContentEntryWithBlockAndLanguage = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryWithBlockAndLanguage; var ContentEntryWithMostRecentContainer = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryWithMostRecentContainer; var ContentEntry = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntry; var ContentEntryContentJobItemParams = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryContentJobItemParams; var DistinctCategorySchema = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.DistinctCategorySchema; var LangUidAndName = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.LangUidAndName; var DownloadJobSizeInfo = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.DownloadJobSizeInfo; var ContentEntryWithParentChildJoinAndMostRecentContainer = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryWithParentChildJoinAndMostRecentContainer; var ContentEntryButtonModel = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryButtonModel; var ContentJobItemProgressAndStatus = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentJobItemProgressAndStatus; var ContentEntryDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentEntryDao; var List = Kotlin.kotlin.collections.List; var createInvariantKTypeProjection = Kotlin.createInvariantKTypeProjection; var utils_0 = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.utils; var url_0 = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.request.url_3rzbk2$; var HttpMethod_0 = $module$ktor_ktor_client_core_js_legacy.$$importsForInline$$['ktor-ktor-http-js-legacy'].io.ktor.http.HttpMethod; var HttpRequestBuilder_init_0 = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.request.HttpRequestBuilder; var HttpStatement_init = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.statement.HttpStatement; var HttpResponse_0 = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.statement.HttpResponse; var complete_0 = $module$ktor_ktor_client_core_js_legacy.io.ktor.client.statement.complete_abn2de$; var reflect_0 = $module$ktor_ktor_client_core_js_legacy.$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect; var typeInfoImpl_0 = $module$ktor_ktor_client_core_js_legacy.$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect.typeInfoImpl_1lvkm8$; var ContentEntryParentChildJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentEntryParentChildJoinDao; var ContentEntryPicture = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryPicture; var ContentEntryPictureDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentEntryPictureDao; var storeAttachment = $module$door_door_runtime.com.ustadmobile.door.attachments.storeAttachment_nxuiik$; var ContentEntryRelatedEntryJoin = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoin; var ContentEntryRelatedEntryJoinWithLangName = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoinWithLangName; var ContentEntryRelatedEntryJoinWithLanguage = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoinWithLanguage; var ContentEntryRelatedEntryJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentEntryRelatedEntryJoinDao; var ContentJob = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentJob; var ContentJobDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentJobDao; var ContentJobItemAndContentJob = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentJobItemAndContentJob; var ContentJobItem = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentJobItem; var ContentJobItemProgress = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContentJobItemProgress; var ContentJobItemDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContentJobItemDao; var ContextXObjectStatementJoin = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ContextXObjectStatementJoin; var ContextXObjectStatementJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ContextXObjectStatementJoinDao; var CourseAssignmentMark = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseAssignmentMark; var CourseAssignmentMarkDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseAssignmentMarkDao; var CourseAssignmentSubmissionAttachmentDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseAssignmentSubmissionAttachmentDao; var CourseAssignmentSubmissionWithAttachment = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseAssignmentSubmissionWithAttachment; var CourseAssignmentSubmissionAttachment = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseAssignmentSubmissionAttachment; var CourseAssignmentSubmission = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseAssignmentSubmission; var CourseAssignmentSubmissionDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseAssignmentSubmissionDao; var CourseBlockWithEntityDb = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseBlockWithEntityDb; var CourseDiscussion = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseDiscussion; var CourseBlockWithCompleteEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseBlockWithCompleteEntity; var ClazzAssignmentWithMetrics = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ClazzAssignmentWithMetrics; var CourseBlockDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseBlockDao; var CourseDiscussionDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseDiscussionDao; var CourseGroupMemberPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseGroupMemberPerson; var CourseGroupMember = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseGroupMember; var CourseGroupMemberDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseGroupMemberDao; var CourseGroupSet = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CourseGroupSet; var CourseGroupSetDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseGroupSetDao; var CoursePicture = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CoursePicture; var CoursePictureDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CoursePictureDao; var CourseTerminologyDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CourseTerminologyDao; var CustomField = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CustomField; var CustomFieldDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CustomFieldDao; var CustomFieldValue = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CustomFieldValue; var CustomFieldValueDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CustomFieldValueDao; var CustomFieldValueOption = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.CustomFieldValueOption; var CustomFieldValueOptionDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.CustomFieldValueOptionDao; var DiscussionPostWithDetails = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.DiscussionPostWithDetails; var DiscussionPost = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.DiscussionPost; var DiscussionPostDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.DiscussionPostDao; var DiscussionTopicListDetail = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.DiscussionTopicListDetail; var DiscussionTopic = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.DiscussionTopic; var DiscussionTopicDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.DiscussionTopicDao; var EntityRole = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.EntityRole; var EntityRoleWithNameAndRole = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.EntityRoleWithNameAndRole; var Role = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Role; var EntityRoleDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.EntityRoleDao; var ErrorReport = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ErrorReport; var ErrorReportDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ErrorReportDao; var GroupLearningSessionDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.GroupLearningSessionDao; var HolidayCalendarWithNumEntries = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.HolidayCalendarWithNumEntries; var HolidayCalendarDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.HolidayCalendarDao; var Holiday = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Holiday; var HolidayDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.HolidayDao; var LanguageDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.LanguageDao; var LanguageVariant = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.LanguageVariant; var LanguageVariantDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.LanguageVariantDao; var LearnerGroup = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.LearnerGroup; var LearnerGroupDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.LearnerGroupDao; var LearnerGroupMemberWithPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.LearnerGroupMemberWithPerson; var LearnerGroupMemberDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.LearnerGroupMemberDao; var LeavingReasonDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.LeavingReasonDao; var LocallyAvailableContainerDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.LocallyAvailableContainerDao; var MessageWithPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.MessageWithPerson; var MessageRead = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.MessageRead; var MessageDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.MessageDao; var MessageReadDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.MessageReadDao; var NetworkNode = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.NetworkNode; var NetworkNodeDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.NetworkNodeDao; var PersonAuth2 = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonAuth2; var PersonAuth2Dao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonAuth2Dao; var PersonAuth = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonAuth; var PersonAuthDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonAuthDao; var PersonDao$PersonUidAndPasswordHash = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonDao.PersonUidAndPasswordHash; var PersonDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonDao; var PersonWithAccount = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonWithAccount; var PersonWithDisplayDetails = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonWithDisplayDetails; var PersonWithPersonParentJoin = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonWithPersonParentJoin; var PersonParentJoin = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonParentJoin; var PersonGroup = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonGroup; var PersonGroupDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonGroupDao; var PersonGroupMember = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonGroupMember; var PersonGroupMemberDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonGroupMemberDao; var PersonParentJoinWithMinorPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonParentJoinWithMinorPerson; var PersonParentJoinDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonParentJoinDao; var PersonParentJoinDao$ParentEnrolmentRequired = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonParentJoinDao.ParentEnrolmentRequired; var PersonPicture = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonPicture; var PersonPictureDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.PersonPictureDao; var hasListOrArrayParams = $module$door_door_runtime.com.ustadmobile.door.ext.hasListOrArrayParams_oflprf$; var columnIndexMap = $module$door_door_runtime.com.ustadmobile.door.ext.columnIndexMap_e65xhf$; var Report = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Report; var ReportDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ReportDao; var Schedule = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Schedule; var ScheduleDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ScheduleDao; var ScheduledCheck = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScheduledCheck; var ScheduledCheckDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ScheduledCheckDao; var SchoolWithHolidayCalendar = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SchoolWithHolidayCalendar; var SchoolWithMemberCountAndLocation = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SchoolWithMemberCountAndLocation; var SchoolDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.SchoolDao; var SchoolMember = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SchoolMember; var SchoolMember_init = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SchoolMember_init; var SchoolMemberWithPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.SchoolMemberWithPerson; var SchoolMemberDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.SchoolMemberDao; var ScopedGrantAndName = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScopedGrantAndName; var ScopedGrant = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScopedGrant; var ScopedGrantWithName = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScopedGrantWithName; var ScopedGrantDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ScopedGrantDao; var ScrapeQueueItem = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScrapeQueueItem; var ScrapeQueueItemWithScrapeRun = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScrapeQueueItemWithScrapeRun; var ScrapeRun = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.ScrapeRun; var ScrapeQueueItemDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ScrapeQueueItemDao; var ScrapeRunDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.ScrapeRunDao; var Site = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.Site; var SiteDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.SiteDao; var StateContentEntity_init = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.StateContentEntity_init; var StateContentEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.StateContentEntity; var StateContentDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.StateContentDao; var StateEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.StateEntity; var StateDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.StateDao; var StatementEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.StatementEntity; var StatementDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.StatementDao; var StatementDao$ReportData = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.StatementDao.ReportData; var copyWithExtraParams = $module$door_door_runtime.com.ustadmobile.door.ext.copyWithExtraParams_ab1y0s$; var toByte = Kotlin.toByte; var StatementEntityWithDisplayDetails = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.StatementEntityWithDisplayDetails; var XLangMapEntry = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.XLangMapEntry; var copy = $module$door_door_runtime.com.ustadmobile.door.ext.copy_bzgsjb$; var PersonWithAttemptsSummary = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonWithAttemptsSummary; var PersonWithSessionsDisplay = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.PersonWithSessionsDisplay; var StatementWithSessionDetailDisplay = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.StatementWithSessionDetailDisplay; var VerbEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.VerbEntity; var SyncNodeDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.SyncNodeDao; var UserSession = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.UserSession; var UserSessionAndPerson = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.UserSessionAndPerson; var UserSessionDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.UserSessionDao; var VerbDisplay = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.VerbDisplay; var VerbDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.VerbDao; var XLangMapEntryDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.XLangMapEntryDao; var XObjectEntity = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.XObjectEntity; var XObjectEntity_init = $module$UstadMobile_lib_database_entities.com.ustadmobile.lib.db.entities.XObjectEntity_init; var XObjectDao = $module$UstadMobile_lib_database.com.ustadmobile.core.db.dao.XObjectDao; var EntityWithAttachment = $module$door_door_runtime.com.ustadmobile.door.attachments.EntityWithAttachment; var defineInlineFunction = Kotlin.defineInlineFunction; SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype.constructor = SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral; SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype.constructor = SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral; SiteTermsDao_JdbcKt.prototype = Object.create(SiteTermsDao.prototype); SiteTermsDao_JdbcKt.prototype.constructor = SiteTermsDao_JdbcKt; SiteTermsDao_ReplicateWrapper.prototype = Object.create(SiteTermsDao.prototype); SiteTermsDao_ReplicateWrapper.prototype.constructor = SiteTermsDao_ReplicateWrapper; SiteTermsDao_Repo.prototype = Object.create(SiteTermsDao.prototype); SiteTermsDao_Repo.prototype.constructor = SiteTermsDao_Repo; UmAppDatabaseJsImplementations.prototype = Object.create(DoorJsImplClasses.prototype); UmAppDatabaseJsImplementations.prototype.constructor = UmAppDatabaseJsImplementations; UmAppDatabase_DoorMetadata.prototype = Object.create(DoorDatabaseMetadata.prototype); UmAppDatabase_DoorMetadata.prototype.constructor = UmAppDatabase_DoorMetadata; UmAppDatabase_JdbcKt.prototype = Object.create(UmAppDatabase.prototype); UmAppDatabase_JdbcKt.prototype.constructor = UmAppDatabase_JdbcKt; UmAppDatabase_ReplicateWrapper.prototype = Object.create(UmAppDatabase.prototype); UmAppDatabase_ReplicateWrapper.prototype.constructor = UmAppDatabase_ReplicateWrapper; UmAppDatabase_Repo.prototype = Object.create(UmAppDatabase.prototype); UmAppDatabase_Repo.prototype.constructor = UmAppDatabase_Repo; AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype.constructor = AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral; AgentDao_JdbcKt.prototype = Object.create(AgentDao.prototype); AgentDao_JdbcKt.prototype.constructor = AgentDao_JdbcKt; AgentDao_ReplicateWrapper.prototype = Object.create(AgentDao.prototype); AgentDao_ReplicateWrapper.prototype.constructor = AgentDao_ReplicateWrapper; AgentDao_Repo.prototype = Object.create(AgentDao.prototype); AgentDao_Repo.prototype.constructor = AgentDao_Repo; ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype.constructor = ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral; ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype.constructor = ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral; ChatDao_JdbcKt.prototype = Object.create(ChatDao.prototype); ChatDao_JdbcKt.prototype.constructor = ChatDao_JdbcKt; ChatDao_ReplicateWrapper.prototype = Object.create(ChatDao.prototype); ChatDao_ReplicateWrapper.prototype.constructor = ChatDao_ReplicateWrapper; ChatDao_Repo.prototype = Object.create(ChatDao.prototype); ChatDao_Repo.prototype.constructor = ChatDao_Repo; ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype.constructor = ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral; ChatMemberDao_JdbcKt.prototype = Object.create(ChatMemberDao.prototype); ChatMemberDao_JdbcKt.prototype.constructor = ChatMemberDao_JdbcKt; ChatMemberDao_ReplicateWrapper.prototype = Object.create(ChatMemberDao.prototype); ChatMemberDao_ReplicateWrapper.prototype.constructor = ChatMemberDao_ReplicateWrapper; ChatMemberDao_Repo.prototype = Object.create(ChatMemberDao.prototype); ChatMemberDao_Repo.prototype.constructor = ChatMemberDao_Repo; ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype.constructor = ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral; ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype.constructor = ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral; ClazzAssignmentContentJoinDao_JdbcKt.prototype = Object.create(ClazzAssignmentContentJoinDao.prototype); ClazzAssignmentContentJoinDao_JdbcKt.prototype.constructor = ClazzAssignmentContentJoinDao_JdbcKt; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype = Object.create(ClazzAssignmentContentJoinDao.prototype); ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.constructor = ClazzAssignmentContentJoinDao_ReplicateWrapper; ClazzAssignmentContentJoinDao_Repo.prototype = Object.create(ClazzAssignmentContentJoinDao.prototype); ClazzAssignmentContentJoinDao_Repo.prototype.constructor = ClazzAssignmentContentJoinDao_Repo; ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype.constructor = ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral; ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype.constructor = ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral; ClazzAssignmentDao_JdbcKt.prototype = Object.create(ClazzAssignmentDao.prototype); ClazzAssignmentDao_JdbcKt.prototype.constructor = ClazzAssignmentDao_JdbcKt; ClazzAssignmentDao_ReplicateWrapper.prototype = Object.create(ClazzAssignmentDao.prototype); ClazzAssignmentDao_ReplicateWrapper.prototype.constructor = ClazzAssignmentDao_ReplicateWrapper; ClazzAssignmentDao_Repo.prototype = Object.create(ClazzAssignmentDao.prototype); ClazzAssignmentDao_Repo.prototype.constructor = ClazzAssignmentDao_Repo; ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype.constructor = ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral; ClazzAssignmentRollUpDao_JdbcKt.prototype = Object.create(ClazzAssignmentRollUpDao.prototype); ClazzAssignmentRollUpDao_JdbcKt.prototype.constructor = ClazzAssignmentRollUpDao_JdbcKt; ClazzAssignmentRollUpDao_Repo.prototype = Object.create(ClazzAssignmentRollUpDao.prototype); ClazzAssignmentRollUpDao_Repo.prototype.constructor = ClazzAssignmentRollUpDao_Repo; ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype.constructor = ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral; ClazzContentJoinDao_JdbcKt.prototype = Object.create(ClazzContentJoinDao.prototype); ClazzContentJoinDao_JdbcKt.prototype.constructor = ClazzContentJoinDao_JdbcKt; ClazzContentJoinDao_ReplicateWrapper.prototype = Object.create(ClazzContentJoinDao.prototype); ClazzContentJoinDao_ReplicateWrapper.prototype.constructor = ClazzContentJoinDao_ReplicateWrapper; ClazzContentJoinDao_Repo.prototype = Object.create(ClazzContentJoinDao.prototype); ClazzContentJoinDao_Repo.prototype.constructor = ClazzContentJoinDao_Repo; ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype.constructor = ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral; ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype.constructor = ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral; ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype.constructor = ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral; ClazzDao_JdbcKt.prototype = Object.create(ClazzDao.prototype); ClazzDao_JdbcKt.prototype.constructor = ClazzDao_JdbcKt; ClazzDao_ReplicateWrapper.prototype = Object.create(ClazzDao.prototype); ClazzDao_ReplicateWrapper.prototype.constructor = ClazzDao_ReplicateWrapper; ClazzDao_Repo.prototype = Object.create(ClazzDao.prototype); ClazzDao_Repo.prototype.constructor = ClazzDao_Repo; ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral; ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral; ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral; ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral; ClazzEnrolmentDao_JdbcKt.prototype = Object.create(ClazzEnrolmentDao.prototype); ClazzEnrolmentDao_JdbcKt.prototype.constructor = ClazzEnrolmentDao_JdbcKt; ClazzEnrolmentDao_ReplicateWrapper.prototype = Object.create(ClazzEnrolmentDao.prototype); ClazzEnrolmentDao_ReplicateWrapper.prototype.constructor = ClazzEnrolmentDao_ReplicateWrapper; ClazzEnrolmentDao_Repo.prototype = Object.create(ClazzEnrolmentDao.prototype); ClazzEnrolmentDao_Repo.prototype.constructor = ClazzEnrolmentDao_Repo; ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype.constructor = ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral; ClazzLogAttendanceRecordDao_JdbcKt.prototype = Object.create(ClazzLogAttendanceRecordDao.prototype); ClazzLogAttendanceRecordDao_JdbcKt.prototype.constructor = ClazzLogAttendanceRecordDao_JdbcKt; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype = Object.create(ClazzLogAttendanceRecordDao.prototype); ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.constructor = ClazzLogAttendanceRecordDao_ReplicateWrapper; ClazzLogAttendanceRecordDao_Repo.prototype = Object.create(ClazzLogAttendanceRecordDao.prototype); ClazzLogAttendanceRecordDao_Repo.prototype.constructor = ClazzLogAttendanceRecordDao_Repo; ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype.constructor = ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype.constructor = ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype.constructor = ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral; ClazzLogDao_JdbcKt.prototype = Object.create(ClazzLogDao.prototype); ClazzLogDao_JdbcKt.prototype.constructor = ClazzLogDao_JdbcKt; ClazzLogDao_ReplicateWrapper.prototype = Object.create(ClazzLogDao.prototype); ClazzLogDao_ReplicateWrapper.prototype.constructor = ClazzLogDao_ReplicateWrapper; ClazzLogDao_Repo.prototype = Object.create(ClazzLogDao.prototype); ClazzLogDao_Repo.prototype.constructor = ClazzLogDao_Repo; CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral; CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral; CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral; CommentsDao_JdbcKt.prototype = Object.create(CommentsDao.prototype); CommentsDao_JdbcKt.prototype.constructor = CommentsDao_JdbcKt; CommentsDao_ReplicateWrapper.prototype = Object.create(CommentsDao.prototype); CommentsDao_ReplicateWrapper.prototype.constructor = CommentsDao_ReplicateWrapper; CommentsDao_Repo.prototype = Object.create(CommentsDao.prototype); CommentsDao_Repo.prototype.constructor = CommentsDao_Repo; ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype.constructor = ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral; ConnectivityStatusDao_JdbcKt.prototype = Object.create(ConnectivityStatusDao.prototype); ConnectivityStatusDao_JdbcKt.prototype.constructor = ConnectivityStatusDao_JdbcKt; ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype.constructor = ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral; ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype.constructor = ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral; ContainerDao_JdbcKt.prototype = Object.create(ContainerDao.prototype); ContainerDao_JdbcKt.prototype.constructor = ContainerDao_JdbcKt; ContainerDao_ReplicateWrapper.prototype = Object.create(ContainerDao.prototype); ContainerDao_ReplicateWrapper.prototype.constructor = ContainerDao_ReplicateWrapper; ContainerDao_Repo.prototype = Object.create(ContainerDao.prototype); ContainerDao_Repo.prototype.constructor = ContainerDao_Repo; ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype.constructor = ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral; ContainerETagDao_JdbcKt.prototype = Object.create(ContainerETagDao.prototype); ContainerETagDao_JdbcKt.prototype.constructor = ContainerETagDao_JdbcKt; ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype.constructor = ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral; ContainerEntryDao_JdbcKt.prototype = Object.create(ContainerEntryDao.prototype); ContainerEntryDao_JdbcKt.prototype.constructor = ContainerEntryDao_JdbcKt; ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype.constructor = ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral; ContainerEntryFileDao_JdbcKt.prototype = Object.create(ContainerEntryFileDao.prototype); ContainerEntryFileDao_JdbcKt.prototype.constructor = ContainerEntryFileDao_JdbcKt; ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype.constructor = ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral; ContainerImportJobDao_JdbcKt.prototype = Object.create(ContainerImportJobDao.prototype); ContainerImportJobDao_JdbcKt.prototype.constructor = ContainerImportJobDao_JdbcKt; ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype.constructor = ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral; ContentCategoryDao_JdbcKt.prototype = Object.create(ContentCategoryDao.prototype); ContentCategoryDao_JdbcKt.prototype.constructor = ContentCategoryDao_JdbcKt; ContentCategoryDao_ReplicateWrapper.prototype = Object.create(ContentCategoryDao.prototype); ContentCategoryDao_ReplicateWrapper.prototype.constructor = ContentCategoryDao_ReplicateWrapper; ContentCategoryDao_Repo.prototype = Object.create(ContentCategoryDao.prototype); ContentCategoryDao_Repo.prototype.constructor = ContentCategoryDao_Repo; ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype.constructor = ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral; ContentCategorySchemaDao_JdbcKt.prototype = Object.create(ContentCategorySchemaDao.prototype); ContentCategorySchemaDao_JdbcKt.prototype.constructor = ContentCategorySchemaDao_JdbcKt; ContentCategorySchemaDao_ReplicateWrapper.prototype = Object.create(ContentCategorySchemaDao.prototype); ContentCategorySchemaDao_ReplicateWrapper.prototype.constructor = ContentCategorySchemaDao_ReplicateWrapper; ContentCategorySchemaDao_Repo.prototype = Object.create(ContentCategorySchemaDao.prototype); ContentCategorySchemaDao_Repo.prototype.constructor = ContentCategorySchemaDao_Repo; ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype.constructor = ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral; ContentEntryContentCategoryJoinDao_JdbcKt.prototype = Object.create(ContentEntryContentCategoryJoinDao.prototype); ContentEntryContentCategoryJoinDao_JdbcKt.prototype.constructor = ContentEntryContentCategoryJoinDao_JdbcKt; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype = Object.create(ContentEntryContentCategoryJoinDao.prototype); ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.constructor = ContentEntryContentCategoryJoinDao_ReplicateWrapper; ContentEntryContentCategoryJoinDao_Repo.prototype = Object.create(ContentEntryContentCategoryJoinDao.prototype); ContentEntryContentCategoryJoinDao_Repo.prototype.constructor = ContentEntryContentCategoryJoinDao_Repo; ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral; ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral; ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral; ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral; ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral; ContentEntryDao_JdbcKt.prototype = Object.create(ContentEntryDao.prototype); ContentEntryDao_JdbcKt.prototype.constructor = ContentEntryDao_JdbcKt; ContentEntryDao_ReplicateWrapper.prototype = Object.create(ContentEntryDao.prototype); ContentEntryDao_ReplicateWrapper.prototype.constructor = ContentEntryDao_ReplicateWrapper; ContentEntryDao_Repo.prototype = Object.create(ContentEntryDao.prototype); ContentEntryDao_Repo.prototype.constructor = ContentEntryDao_Repo; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype.constructor = ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype.constructor = ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral; ContentEntryParentChildJoinDao_JdbcKt.prototype = Object.create(ContentEntryParentChildJoinDao.prototype); ContentEntryParentChildJoinDao_JdbcKt.prototype.constructor = ContentEntryParentChildJoinDao_JdbcKt; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype = Object.create(ContentEntryParentChildJoinDao.prototype); ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.constructor = ContentEntryParentChildJoinDao_ReplicateWrapper; ContentEntryParentChildJoinDao_Repo.prototype = Object.create(ContentEntryParentChildJoinDao.prototype); ContentEntryParentChildJoinDao_Repo.prototype.constructor = ContentEntryParentChildJoinDao_Repo; ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype.constructor = ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral; ContentEntryPictureDao_JdbcKt.prototype = Object.create(ContentEntryPictureDao.prototype); ContentEntryPictureDao_JdbcKt.prototype.constructor = ContentEntryPictureDao_JdbcKt; ContentEntryPictureDao_ReplicateWrapper.prototype = Object.create(ContentEntryPictureDao.prototype); ContentEntryPictureDao_ReplicateWrapper.prototype.constructor = ContentEntryPictureDao_ReplicateWrapper; ContentEntryPictureDao_Repo.prototype = Object.create(ContentEntryPictureDao.prototype); ContentEntryPictureDao_Repo.prototype.constructor = ContentEntryPictureDao_Repo; ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype.constructor = ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral; ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype.constructor = ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype = Object.create(ContentEntryRelatedEntryJoinDao.prototype); ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.constructor = ContentEntryRelatedEntryJoinDao_JdbcKt; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype = Object.create(ContentEntryRelatedEntryJoinDao.prototype); ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.constructor = ContentEntryRelatedEntryJoinDao_ReplicateWrapper; ContentEntryRelatedEntryJoinDao_Repo.prototype = Object.create(ContentEntryRelatedEntryJoinDao.prototype); ContentEntryRelatedEntryJoinDao_Repo.prototype.constructor = ContentEntryRelatedEntryJoinDao_Repo; ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype.constructor = ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral; ContentJobDao_JdbcKt.prototype = Object.create(ContentJobDao.prototype); ContentJobDao_JdbcKt.prototype.constructor = ContentJobDao_JdbcKt; ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype.constructor = ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral; ContentJobItemDao_JdbcKt.prototype = Object.create(ContentJobItemDao.prototype); ContentJobItemDao_JdbcKt.prototype.constructor = ContentJobItemDao_JdbcKt; ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype.constructor = ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral; ContextXObjectStatementJoinDao_JdbcKt.prototype = Object.create(ContextXObjectStatementJoinDao.prototype); ContextXObjectStatementJoinDao_JdbcKt.prototype.constructor = ContextXObjectStatementJoinDao_JdbcKt; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype = Object.create(ContextXObjectStatementJoinDao.prototype); ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.constructor = ContextXObjectStatementJoinDao_ReplicateWrapper; ContextXObjectStatementJoinDao_Repo.prototype = Object.create(ContextXObjectStatementJoinDao.prototype); ContextXObjectStatementJoinDao_Repo.prototype.constructor = ContextXObjectStatementJoinDao_Repo; CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype.constructor = CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral; CourseAssignmentMarkDao_JdbcKt.prototype = Object.create(CourseAssignmentMarkDao.prototype); CourseAssignmentMarkDao_JdbcKt.prototype.constructor = CourseAssignmentMarkDao_JdbcKt; CourseAssignmentMarkDao_ReplicateWrapper.prototype = Object.create(CourseAssignmentMarkDao.prototype); CourseAssignmentMarkDao_ReplicateWrapper.prototype.constructor = CourseAssignmentMarkDao_ReplicateWrapper; CourseAssignmentMarkDao_Repo.prototype = Object.create(CourseAssignmentMarkDao.prototype); CourseAssignmentMarkDao_Repo.prototype.constructor = CourseAssignmentMarkDao_Repo; CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype = Object.create(CourseAssignmentSubmissionAttachmentDao.prototype); CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_JdbcKt; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype = Object.create(CourseAssignmentSubmissionAttachmentDao.prototype); CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper; CourseAssignmentSubmissionAttachmentDao_Repo.prototype = Object.create(CourseAssignmentSubmissionAttachmentDao.prototype); CourseAssignmentSubmissionAttachmentDao_Repo.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_Repo; CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype.constructor = CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral; CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype.constructor = CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral; CourseAssignmentSubmissionDao_JdbcKt.prototype = Object.create(CourseAssignmentSubmissionDao.prototype); CourseAssignmentSubmissionDao_JdbcKt.prototype.constructor = CourseAssignmentSubmissionDao_JdbcKt; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype = Object.create(CourseAssignmentSubmissionDao.prototype); CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.constructor = CourseAssignmentSubmissionDao_ReplicateWrapper; CourseAssignmentSubmissionDao_Repo.prototype = Object.create(CourseAssignmentSubmissionDao.prototype); CourseAssignmentSubmissionDao_Repo.prototype.constructor = CourseAssignmentSubmissionDao_Repo; CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype.constructor = CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype.constructor = CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype.constructor = CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral; CourseBlockDao_JdbcKt.prototype = Object.create(CourseBlockDao.prototype); CourseBlockDao_JdbcKt.prototype.constructor = CourseBlockDao_JdbcKt; CourseBlockDao_ReplicateWrapper.prototype = Object.create(CourseBlockDao.prototype); CourseBlockDao_ReplicateWrapper.prototype.constructor = CourseBlockDao_ReplicateWrapper; CourseBlockDao_Repo.prototype = Object.create(CourseBlockDao.prototype); CourseBlockDao_Repo.prototype.constructor = CourseBlockDao_Repo; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype.constructor = CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype.constructor = CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral; CourseDiscussionDao_JdbcKt.prototype = Object.create(CourseDiscussionDao.prototype); CourseDiscussionDao_JdbcKt.prototype.constructor = CourseDiscussionDao_JdbcKt; CourseDiscussionDao_ReplicateWrapper.prototype = Object.create(CourseDiscussionDao.prototype); CourseDiscussionDao_ReplicateWrapper.prototype.constructor = CourseDiscussionDao_ReplicateWrapper; CourseDiscussionDao_Repo.prototype = Object.create(CourseDiscussionDao.prototype); CourseDiscussionDao_Repo.prototype.constructor = CourseDiscussionDao_Repo; CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype.constructor = CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral; CourseGroupMemberDao_JdbcKt.prototype = Object.create(CourseGroupMemberDao.prototype); CourseGroupMemberDao_JdbcKt.prototype.constructor = CourseGroupMemberDao_JdbcKt; CourseGroupMemberDao_ReplicateWrapper.prototype = Object.create(CourseGroupMemberDao.prototype); CourseGroupMemberDao_ReplicateWrapper.prototype.constructor = CourseGroupMemberDao_ReplicateWrapper; CourseGroupMemberDao_Repo.prototype = Object.create(CourseGroupMemberDao.prototype); CourseGroupMemberDao_Repo.prototype.constructor = CourseGroupMemberDao_Repo; CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype.constructor = CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral; CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype.constructor = CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral; CourseGroupSetDao_JdbcKt.prototype = Object.create(CourseGroupSetDao.prototype); CourseGroupSetDao_JdbcKt.prototype.constructor = CourseGroupSetDao_JdbcKt; CourseGroupSetDao_ReplicateWrapper.prototype = Object.create(CourseGroupSetDao.prototype); CourseGroupSetDao_ReplicateWrapper.prototype.constructor = CourseGroupSetDao_ReplicateWrapper; CourseGroupSetDao_Repo.prototype = Object.create(CourseGroupSetDao.prototype); CourseGroupSetDao_Repo.prototype.constructor = CourseGroupSetDao_Repo; CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype.constructor = CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral; CoursePictureDao_JdbcKt.prototype = Object.create(CoursePictureDao.prototype); CoursePictureDao_JdbcKt.prototype.constructor = CoursePictureDao_JdbcKt; CoursePictureDao_ReplicateWrapper.prototype = Object.create(CoursePictureDao.prototype); CoursePictureDao_ReplicateWrapper.prototype.constructor = CoursePictureDao_ReplicateWrapper; CoursePictureDao_Repo.prototype = Object.create(CoursePictureDao.prototype); CoursePictureDao_Repo.prototype.constructor = CoursePictureDao_Repo; CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype.constructor = CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral; CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype.constructor = CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral; CourseTerminologyDao_JdbcKt.prototype = Object.create(CourseTerminologyDao.prototype); CourseTerminologyDao_JdbcKt.prototype.constructor = CourseTerminologyDao_JdbcKt; CourseTerminologyDao_ReplicateWrapper.prototype = Object.create(CourseTerminologyDao.prototype); CourseTerminologyDao_ReplicateWrapper.prototype.constructor = CourseTerminologyDao_ReplicateWrapper; CourseTerminologyDao_Repo.prototype = Object.create(CourseTerminologyDao.prototype); CourseTerminologyDao_Repo.prototype.constructor = CourseTerminologyDao_Repo; CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral.prototype.constructor = CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral; CustomFieldDao_JdbcKt.prototype = Object.create(CustomFieldDao.prototype); CustomFieldDao_JdbcKt.prototype.constructor = CustomFieldDao_JdbcKt; CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral.prototype.constructor = CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral; CustomFieldValueDao_JdbcKt.prototype = Object.create(CustomFieldValueDao.prototype); CustomFieldValueDao_JdbcKt.prototype.constructor = CustomFieldValueDao_JdbcKt; CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral.prototype.constructor = CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral; CustomFieldValueOptionDao_JdbcKt.prototype = Object.create(CustomFieldValueOptionDao.prototype); CustomFieldValueOptionDao_JdbcKt.prototype.constructor = CustomFieldValueOptionDao_JdbcKt; DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype.constructor = DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral; DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype.constructor = DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral; DiscussionPostDao_JdbcKt.prototype = Object.create(DiscussionPostDao.prototype); DiscussionPostDao_JdbcKt.prototype.constructor = DiscussionPostDao_JdbcKt; DiscussionPostDao_ReplicateWrapper.prototype = Object.create(DiscussionPostDao.prototype); DiscussionPostDao_ReplicateWrapper.prototype.constructor = DiscussionPostDao_ReplicateWrapper; DiscussionPostDao_Repo.prototype = Object.create(DiscussionPostDao.prototype); DiscussionPostDao_Repo.prototype.constructor = DiscussionPostDao_Repo; DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype.constructor = DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype.constructor = DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype.constructor = DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral; DiscussionTopicDao_JdbcKt.prototype = Object.create(DiscussionTopicDao.prototype); DiscussionTopicDao_JdbcKt.prototype.constructor = DiscussionTopicDao_JdbcKt; DiscussionTopicDao_ReplicateWrapper.prototype = Object.create(DiscussionTopicDao.prototype); DiscussionTopicDao_ReplicateWrapper.prototype.constructor = DiscussionTopicDao_ReplicateWrapper; DiscussionTopicDao_Repo.prototype = Object.create(DiscussionTopicDao.prototype); DiscussionTopicDao_Repo.prototype.constructor = DiscussionTopicDao_Repo; EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype.constructor = EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral; EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype.constructor = EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral; EntityRoleDao_JdbcKt.prototype = Object.create(EntityRoleDao.prototype); EntityRoleDao_JdbcKt.prototype.constructor = EntityRoleDao_JdbcKt; EntityRoleDao_Repo.prototype = Object.create(EntityRoleDao.prototype); EntityRoleDao_Repo.prototype.constructor = EntityRoleDao_Repo; ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype.constructor = ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral; ErrorReportDao_JdbcKt.prototype = Object.create(ErrorReportDao.prototype); ErrorReportDao_JdbcKt.prototype.constructor = ErrorReportDao_JdbcKt; ErrorReportDao_ReplicateWrapper.prototype = Object.create(ErrorReportDao.prototype); ErrorReportDao_ReplicateWrapper.prototype.constructor = ErrorReportDao_ReplicateWrapper; ErrorReportDao_Repo.prototype = Object.create(ErrorReportDao.prototype); ErrorReportDao_Repo.prototype.constructor = ErrorReportDao_Repo; GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype.constructor = GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral; GroupLearningSessionDao_JdbcKt.prototype = Object.create(GroupLearningSessionDao.prototype); GroupLearningSessionDao_JdbcKt.prototype.constructor = GroupLearningSessionDao_JdbcKt; GroupLearningSessionDao_ReplicateWrapper.prototype = Object.create(GroupLearningSessionDao.prototype); GroupLearningSessionDao_ReplicateWrapper.prototype.constructor = GroupLearningSessionDao_ReplicateWrapper; GroupLearningSessionDao_Repo.prototype = Object.create(GroupLearningSessionDao.prototype); GroupLearningSessionDao_Repo.prototype.constructor = GroupLearningSessionDao_Repo; HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype.constructor = HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype.constructor = HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype.constructor = HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral; HolidayCalendarDao_JdbcKt.prototype = Object.create(HolidayCalendarDao.prototype); HolidayCalendarDao_JdbcKt.prototype.constructor = HolidayCalendarDao_JdbcKt; HolidayCalendarDao_ReplicateWrapper.prototype = Object.create(HolidayCalendarDao.prototype); HolidayCalendarDao_ReplicateWrapper.prototype.constructor = HolidayCalendarDao_ReplicateWrapper; HolidayCalendarDao_Repo.prototype = Object.create(HolidayCalendarDao.prototype); HolidayCalendarDao_Repo.prototype.constructor = HolidayCalendarDao_Repo; HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype.constructor = HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral; HolidayDao_JdbcKt.prototype = Object.create(HolidayDao.prototype); HolidayDao_JdbcKt.prototype.constructor = HolidayDao_JdbcKt; HolidayDao_ReplicateWrapper.prototype = Object.create(HolidayDao.prototype); HolidayDao_ReplicateWrapper.prototype.constructor = HolidayDao_ReplicateWrapper; HolidayDao_Repo.prototype = Object.create(HolidayDao.prototype); HolidayDao_Repo.prototype.constructor = HolidayDao_Repo; LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype.constructor = LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral; LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype.constructor = LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral; LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype.constructor = LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral; LanguageDao_JdbcKt.prototype = Object.create(LanguageDao.prototype); LanguageDao_JdbcKt.prototype.constructor = LanguageDao_JdbcKt; LanguageDao_ReplicateWrapper.prototype = Object.create(LanguageDao.prototype); LanguageDao_ReplicateWrapper.prototype.constructor = LanguageDao_ReplicateWrapper; LanguageDao_Repo.prototype = Object.create(LanguageDao.prototype); LanguageDao_Repo.prototype.constructor = LanguageDao_Repo; LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype.constructor = LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral; LanguageVariantDao_JdbcKt.prototype = Object.create(LanguageVariantDao.prototype); LanguageVariantDao_JdbcKt.prototype.constructor = LanguageVariantDao_JdbcKt; LanguageVariantDao_ReplicateWrapper.prototype = Object.create(LanguageVariantDao.prototype); LanguageVariantDao_ReplicateWrapper.prototype.constructor = LanguageVariantDao_ReplicateWrapper; LanguageVariantDao_Repo.prototype = Object.create(LanguageVariantDao.prototype); LanguageVariantDao_Repo.prototype.constructor = LanguageVariantDao_Repo; LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype.constructor = LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral; LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype.constructor = LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral; LearnerGroupDao_JdbcKt.prototype = Object.create(LearnerGroupDao.prototype); LearnerGroupDao_JdbcKt.prototype.constructor = LearnerGroupDao_JdbcKt; LearnerGroupDao_ReplicateWrapper.prototype = Object.create(LearnerGroupDao.prototype); LearnerGroupDao_ReplicateWrapper.prototype.constructor = LearnerGroupDao_ReplicateWrapper; LearnerGroupDao_Repo.prototype = Object.create(LearnerGroupDao.prototype); LearnerGroupDao_Repo.prototype.constructor = LearnerGroupDao_Repo; LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype.constructor = LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral; LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype.constructor = LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral; LearnerGroupMemberDao_JdbcKt.prototype = Object.create(LearnerGroupMemberDao.prototype); LearnerGroupMemberDao_JdbcKt.prototype.constructor = LearnerGroupMemberDao_JdbcKt; LearnerGroupMemberDao_ReplicateWrapper.prototype = Object.create(LearnerGroupMemberDao.prototype); LearnerGroupMemberDao_ReplicateWrapper.prototype.constructor = LearnerGroupMemberDao_ReplicateWrapper; LearnerGroupMemberDao_Repo.prototype = Object.create(LearnerGroupMemberDao.prototype); LearnerGroupMemberDao_Repo.prototype.constructor = LearnerGroupMemberDao_Repo; LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype.constructor = LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype.constructor = LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype.constructor = LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral; LeavingReasonDao_JdbcKt.prototype = Object.create(LeavingReasonDao.prototype); LeavingReasonDao_JdbcKt.prototype.constructor = LeavingReasonDao_JdbcKt; LeavingReasonDao_ReplicateWrapper.prototype = Object.create(LeavingReasonDao.prototype); LeavingReasonDao_ReplicateWrapper.prototype.constructor = LeavingReasonDao_ReplicateWrapper; LeavingReasonDao_Repo.prototype = Object.create(LeavingReasonDao.prototype); LeavingReasonDao_Repo.prototype.constructor = LeavingReasonDao_Repo; LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype.constructor = LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral; LocallyAvailableContainerDao_JdbcKt.prototype = Object.create(LocallyAvailableContainerDao.prototype); LocallyAvailableContainerDao_JdbcKt.prototype.constructor = LocallyAvailableContainerDao_JdbcKt; MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype.constructor = MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral; MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype.constructor = MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral; MessageDao_JdbcKt.prototype = Object.create(MessageDao.prototype); MessageDao_JdbcKt.prototype.constructor = MessageDao_JdbcKt; MessageDao_ReplicateWrapper.prototype = Object.create(MessageDao.prototype); MessageDao_ReplicateWrapper.prototype.constructor = MessageDao_ReplicateWrapper; MessageDao_Repo.prototype = Object.create(MessageDao.prototype); MessageDao_Repo.prototype.constructor = MessageDao_Repo; MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype.constructor = MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral; MessageReadDao_JdbcKt.prototype = Object.create(MessageReadDao.prototype); MessageReadDao_JdbcKt.prototype.constructor = MessageReadDao_JdbcKt; MessageReadDao_ReplicateWrapper.prototype = Object.create(MessageReadDao.prototype); MessageReadDao_ReplicateWrapper.prototype.constructor = MessageReadDao_ReplicateWrapper; MessageReadDao_Repo.prototype = Object.create(MessageReadDao.prototype); MessageReadDao_Repo.prototype.constructor = MessageReadDao_Repo; NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype.constructor = NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral; NetworkNodeDao_JdbcKt.prototype = Object.create(NetworkNodeDao.prototype); NetworkNodeDao_JdbcKt.prototype.constructor = NetworkNodeDao_JdbcKt; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype.constructor = PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype.constructor = PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral; PersonAuth2Dao_JdbcKt.prototype = Object.create(PersonAuth2Dao.prototype); PersonAuth2Dao_JdbcKt.prototype.constructor = PersonAuth2Dao_JdbcKt; PersonAuth2Dao_ReplicateWrapper.prototype = Object.create(PersonAuth2Dao.prototype); PersonAuth2Dao_ReplicateWrapper.prototype.constructor = PersonAuth2Dao_ReplicateWrapper; PersonAuth2Dao_Repo.prototype = Object.create(PersonAuth2Dao.prototype); PersonAuth2Dao_Repo.prototype.constructor = PersonAuth2Dao_Repo; PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.constructor = PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral; PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.constructor = PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral; PersonAuthDao_JdbcKt.prototype = Object.create(PersonAuthDao.prototype); PersonAuthDao_JdbcKt.prototype.constructor = PersonAuthDao_JdbcKt; PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral; PersonDao_JdbcKt.prototype = Object.create(PersonDao.prototype); PersonDao_JdbcKt.prototype.constructor = PersonDao_JdbcKt; PersonDao_ReplicateWrapper.prototype = Object.create(PersonDao.prototype); PersonDao_ReplicateWrapper.prototype.constructor = PersonDao_ReplicateWrapper; PersonDao_Repo.prototype = Object.create(PersonDao.prototype); PersonDao_Repo.prototype.constructor = PersonDao_Repo; PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.constructor = PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral; PersonGroupDao_JdbcKt.prototype = Object.create(PersonGroupDao.prototype); PersonGroupDao_JdbcKt.prototype.constructor = PersonGroupDao_JdbcKt; PersonGroupDao_ReplicateWrapper.prototype = Object.create(PersonGroupDao.prototype); PersonGroupDao_ReplicateWrapper.prototype.constructor = PersonGroupDao_ReplicateWrapper; PersonGroupDao_Repo.prototype = Object.create(PersonGroupDao.prototype); PersonGroupDao_Repo.prototype.constructor = PersonGroupDao_Repo; PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.constructor = PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral; PersonGroupMemberDao_JdbcKt.prototype = Object.create(PersonGroupMemberDao.prototype); PersonGroupMemberDao_JdbcKt.prototype.constructor = PersonGroupMemberDao_JdbcKt; PersonGroupMemberDao_ReplicateWrapper.prototype = Object.create(PersonGroupMemberDao.prototype); PersonGroupMemberDao_ReplicateWrapper.prototype.constructor = PersonGroupMemberDao_ReplicateWrapper; PersonGroupMemberDao_Repo.prototype = Object.create(PersonGroupMemberDao.prototype); PersonGroupMemberDao_Repo.prototype.constructor = PersonGroupMemberDao_Repo; PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype.constructor = PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral; PersonParentJoinDao_JdbcKt.prototype = Object.create(PersonParentJoinDao.prototype); PersonParentJoinDao_JdbcKt.prototype.constructor = PersonParentJoinDao_JdbcKt; PersonParentJoinDao_ReplicateWrapper.prototype = Object.create(PersonParentJoinDao.prototype); PersonParentJoinDao_ReplicateWrapper.prototype.constructor = PersonParentJoinDao_ReplicateWrapper; PersonParentJoinDao_Repo.prototype = Object.create(PersonParentJoinDao.prototype); PersonParentJoinDao_Repo.prototype.constructor = PersonParentJoinDao_Repo; PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype.constructor = PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral; PersonPictureDao_JdbcKt.prototype = Object.create(PersonPictureDao.prototype); PersonPictureDao_JdbcKt.prototype.constructor = PersonPictureDao_JdbcKt; PersonPictureDao_ReplicateWrapper.prototype = Object.create(PersonPictureDao.prototype); PersonPictureDao_ReplicateWrapper.prototype.constructor = PersonPictureDao_ReplicateWrapper; PersonPictureDao_Repo.prototype = Object.create(PersonPictureDao.prototype); PersonPictureDao_Repo.prototype.constructor = PersonPictureDao_Repo; ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype.constructor = ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral; ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype.constructor = ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral; ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype.constructor = ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral; ReportDao_JdbcKt.prototype = Object.create(ReportDao.prototype); ReportDao_JdbcKt.prototype.constructor = ReportDao_JdbcKt; ReportDao_ReplicateWrapper.prototype = Object.create(ReportDao.prototype); ReportDao_ReplicateWrapper.prototype.constructor = ReportDao_ReplicateWrapper; ReportDao_Repo.prototype = Object.create(ReportDao.prototype); ReportDao_Repo.prototype.constructor = ReportDao_Repo; ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype.constructor = ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral; ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype.constructor = ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral; ScheduleDao_JdbcKt.prototype = Object.create(ScheduleDao.prototype); ScheduleDao_JdbcKt.prototype.constructor = ScheduleDao_JdbcKt; ScheduleDao_ReplicateWrapper.prototype = Object.create(ScheduleDao.prototype); ScheduleDao_ReplicateWrapper.prototype.constructor = ScheduleDao_ReplicateWrapper; ScheduleDao_Repo.prototype = Object.create(ScheduleDao.prototype); ScheduleDao_Repo.prototype.constructor = ScheduleDao_Repo; ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral.prototype.constructor = ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral; ScheduledCheckDao_JdbcKt.prototype = Object.create(ScheduledCheckDao.prototype); ScheduledCheckDao_JdbcKt.prototype.constructor = ScheduledCheckDao_JdbcKt; SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype.constructor = SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral; SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype.constructor = SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral; SchoolDao_JdbcKt.prototype = Object.create(SchoolDao.prototype); SchoolDao_JdbcKt.prototype.constructor = SchoolDao_JdbcKt; SchoolDao_ReplicateWrapper.prototype = Object.create(SchoolDao.prototype); SchoolDao_ReplicateWrapper.prototype.constructor = SchoolDao_ReplicateWrapper; SchoolDao_Repo.prototype = Object.create(SchoolDao.prototype); SchoolDao_Repo.prototype.constructor = SchoolDao_Repo; SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype.constructor = SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral; SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype.constructor = SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral; SchoolMemberDao_JdbcKt.prototype = Object.create(SchoolMemberDao.prototype); SchoolMemberDao_JdbcKt.prototype.constructor = SchoolMemberDao_JdbcKt; SchoolMemberDao_ReplicateWrapper.prototype = Object.create(SchoolMemberDao.prototype); SchoolMemberDao_ReplicateWrapper.prototype.constructor = SchoolMemberDao_ReplicateWrapper; SchoolMemberDao_Repo.prototype = Object.create(SchoolMemberDao.prototype); SchoolMemberDao_Repo.prototype.constructor = SchoolMemberDao_Repo; ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype.constructor = ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral; ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype.constructor = ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral; ScopedGrantDao_JdbcKt.prototype = Object.create(ScopedGrantDao.prototype); ScopedGrantDao_JdbcKt.prototype.constructor = ScopedGrantDao_JdbcKt; ScopedGrantDao_ReplicateWrapper.prototype = Object.create(ScopedGrantDao.prototype); ScopedGrantDao_ReplicateWrapper.prototype.constructor = ScopedGrantDao_ReplicateWrapper; ScopedGrantDao_Repo.prototype = Object.create(ScopedGrantDao.prototype); ScopedGrantDao_Repo.prototype.constructor = ScopedGrantDao_Repo; ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype.constructor = ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral; ScrapeQueueItemDao_JdbcKt.prototype = Object.create(ScrapeQueueItemDao.prototype); ScrapeQueueItemDao_JdbcKt.prototype.constructor = ScrapeQueueItemDao_JdbcKt; ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral.prototype.constructor = ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral; ScrapeRunDao_JdbcKt.prototype = Object.create(ScrapeRunDao.prototype); ScrapeRunDao_JdbcKt.prototype.constructor = ScrapeRunDao_JdbcKt; SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype.constructor = SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral; SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype.constructor = SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral; SiteDao_JdbcKt.prototype = Object.create(SiteDao.prototype); SiteDao_JdbcKt.prototype.constructor = SiteDao_JdbcKt; SiteDao_ReplicateWrapper.prototype = Object.create(SiteDao.prototype); SiteDao_ReplicateWrapper.prototype.constructor = SiteDao_ReplicateWrapper; SiteDao_Repo.prototype = Object.create(SiteDao.prototype); SiteDao_Repo.prototype.constructor = SiteDao_Repo; StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype.constructor = StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral; StateContentDao_JdbcKt.prototype = Object.create(StateContentDao.prototype); StateContentDao_JdbcKt.prototype.constructor = StateContentDao_JdbcKt; StateContentDao_ReplicateWrapper.prototype = Object.create(StateContentDao.prototype); StateContentDao_ReplicateWrapper.prototype.constructor = StateContentDao_ReplicateWrapper; StateContentDao_Repo.prototype = Object.create(StateContentDao.prototype); StateContentDao_Repo.prototype.constructor = StateContentDao_Repo; StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype.constructor = StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral; StateDao_JdbcKt.prototype = Object.create(StateDao.prototype); StateDao_JdbcKt.prototype.constructor = StateDao_JdbcKt; StateDao_ReplicateWrapper.prototype = Object.create(StateDao.prototype); StateDao_ReplicateWrapper.prototype.constructor = StateDao_ReplicateWrapper; StateDao_Repo.prototype = Object.create(StateDao.prototype); StateDao_Repo.prototype.constructor = StateDao_Repo; StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$getListResults$ObjectLiteral; StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral; StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral; StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral; StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral; StatementDao_JdbcKt.prototype = Object.create(StatementDao.prototype); StatementDao_JdbcKt.prototype.constructor = StatementDao_JdbcKt; StatementDao_ReplicateWrapper.prototype = Object.create(StatementDao.prototype); StatementDao_ReplicateWrapper.prototype.constructor = StatementDao_ReplicateWrapper; StatementDao_Repo.prototype = Object.create(StatementDao.prototype); StatementDao_Repo.prototype.constructor = StatementDao_Repo; SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype.constructor = SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral; SyncNodeDao_JdbcKt.prototype = Object.create(SyncNodeDao.prototype); SyncNodeDao_JdbcKt.prototype.constructor = SyncNodeDao_JdbcKt; UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype.constructor = UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral; UserSessionDao_JdbcKt.prototype = Object.create(UserSessionDao.prototype); UserSessionDao_JdbcKt.prototype.constructor = UserSessionDao_JdbcKt; UserSessionDao_ReplicateWrapper.prototype = Object.create(UserSessionDao.prototype); UserSessionDao_ReplicateWrapper.prototype.constructor = UserSessionDao_ReplicateWrapper; UserSessionDao_Repo.prototype = Object.create(UserSessionDao.prototype); UserSessionDao_Repo.prototype.constructor = UserSessionDao_Repo; VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral; VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype = Object.create(DoorDataSourceFactory.prototype); VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral; VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral; VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral; VerbDao_JdbcKt.prototype = Object.create(VerbDao.prototype); VerbDao_JdbcKt.prototype.constructor = VerbDao_JdbcKt; VerbDao_ReplicateWrapper.prototype = Object.create(VerbDao.prototype); VerbDao_ReplicateWrapper.prototype.constructor = VerbDao_ReplicateWrapper; VerbDao_Repo.prototype = Object.create(VerbDao.prototype); VerbDao_Repo.prototype.constructor = VerbDao_Repo; XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype.constructor = XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral; XLangMapEntryDao_JdbcKt.prototype = Object.create(XLangMapEntryDao.prototype); XLangMapEntryDao_JdbcKt.prototype.constructor = XLangMapEntryDao_JdbcKt; XLangMapEntryDao_ReplicateWrapper.prototype = Object.create(XLangMapEntryDao.prototype); XLangMapEntryDao_ReplicateWrapper.prototype.constructor = XLangMapEntryDao_ReplicateWrapper; XLangMapEntryDao_Repo.prototype = Object.create(XLangMapEntryDao.prototype); XLangMapEntryDao_Repo.prototype.constructor = XLangMapEntryDao_Repo; XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype.constructor = XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral; XObjectDao_JdbcKt.prototype = Object.create(XObjectDao.prototype); XObjectDao_JdbcKt.prototype.constructor = XObjectDao_JdbcKt; XObjectDao_ReplicateWrapper.prototype = Object.create(XObjectDao.prototype); XObjectDao_ReplicateWrapper.prototype.constructor = XObjectDao_ReplicateWrapper; XObjectDao_Repo.prototype = Object.create(XObjectDao.prototype); XObjectDao_Repo.prototype.constructor = XObjectDao_Repo; function SiteTermsDao_JdbcKt(_db) { SiteTermsDao.call(this); this._db = _db; this._insertAdapterSiteTerms_ = new SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral(this._db); } function Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$; Coroutine$replicateOnNewNode_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stPk,\n | ? AS stDestination\n | FROM SiteTerms\n | WHERE SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = ?), 0) \n | /*psql ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stPk,\n | ? AS stDestination\n | FROM SiteTerms\n | WHERE SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = ?), 0) \n | ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda; Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange.prototype.constructor = Coroutine$replicateOnChange; Coroutine$replicateOnChange.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stUid,\n | UserSession.usClientNodeId AS stDestination\n | FROM ChangeLog\n | JOIN SiteTerms\n | ON ChangeLog.chTableId = 272\n | AND ChangeLog.chEntityPk = SiteTerms.sTermsUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stUid,\n | UserSession.usClientNodeId AS stDestination\n | FROM ChangeLog\n | JOIN SiteTerms\n | ON ChangeLog.chTableId = 272\n | AND ChangeLog.chEntityPk = SiteTerms.sTermsUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteTermsDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteTermsDao_JdbcKt$findSiteTerms$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_sTermsUid = _resultSet.getLong_61zpoe$('sTermsUid'); var tmp_termsHtml = _resultSet.getString_61zpoe$('termsHtml'); var tmp_sTermsLang = _resultSet.getString_61zpoe$('sTermsLang'); var tmp_sTermsLangUid = _resultSet.getLong_61zpoe$('sTermsLangUid'); var tmp_sTermsActive = _resultSet.getBoolean_61zpoe$('sTermsActive'); var tmp_sTermsLastChangedBy = _resultSet.getInt_61zpoe$('sTermsLastChangedBy'); var tmp_sTermsPrimaryCsn = _resultSet.getLong_61zpoe$('sTermsPrimaryCsn'); var tmp_sTermsLocalCsn = _resultSet.getLong_61zpoe$('sTermsLocalCsn'); var tmp_sTermsLct = _resultSet.getLong_61zpoe$('sTermsLct'); var _entity = new SiteTerms(); _entity.sTermsUid = tmp_sTermsUid; _entity.termsHtml = tmp_termsHtml; _entity.sTermsLang = tmp_sTermsLang; _entity.sTermsLangUid = tmp_sTermsLangUid; _entity.sTermsActive = tmp_sTermsActive; _entity.sTermsLastChangedBy = tmp_sTermsLastChangedBy; _entity.sTermsPrimaryCsn = tmp_sTermsPrimaryCsn; _entity.sTermsLocalCsn = tmp_sTermsLocalCsn; _entity.sTermsLct = tmp_sTermsLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda(closure$langCode_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$langCode = closure$langCode_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda; Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$langCode); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findSiteTerms$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findSiteTerms$lambda(closure$langCode_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda(closure$langCode_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findSiteTerms_61zpoe$($this, langCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$langCode = langCode_0; } Coroutine$findSiteTerms_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSiteTerms_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSiteTerms_61zpoe$.prototype.constructor = Coroutine$findSiteTerms_61zpoe$; Coroutine$findSiteTerms_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, SiteTerms) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT * FROM SiteTerms WHERE sTermsUid = coalesce(\n | (SELECT sTermsUid FROM SiteTerms st_int WHERE st_int.sTermsLang = ? LIMIT 1),\n | (SELECT sTermsUid FROM SiteTerms st_int WHERE st_int.sTermsLang = 'en' LIMIT 1),\n | 0)\n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT * FROM SiteTerms WHERE sTermsUid = coalesce(\n | (SELECT sTermsUid FROM SiteTerms st_int WHERE st_int.sTermsLang = ? LIMIT 1),\n | (SELECT sTermsUid FROM SiteTerms st_int WHERE st_int.sTermsLang = 'en' LIMIT 1),\n | 0)\n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteTermsDao_JdbcKt$findSiteTerms$lambda(this.local$langCode, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.findSiteTerms_61zpoe$ = function (langCode_0, continuation_0, suspended) { var instance = new Coroutine$findSiteTerms_61zpoe$(this, langCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_gc516$($this, siteTerms_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$siteTerms = siteTerms_0; } Coroutine$insertAsync_gc516$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_gc516$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_gc516$.prototype.constructor = Coroutine$insertAsync_gc516$; Coroutine$insertAsync_gc516$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSiteTerms_.insertAndReturnIdAsync_11rb$(this.local$siteTerms, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.insertAsync_gc516$ = function (siteTerms_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_gc516$(this, siteTerms_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteTermsDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_sTermsUid = _resultSet.getLong_61zpoe$('sTermsUid'); var tmp_termsHtml = _resultSet.getString_61zpoe$('termsHtml'); var tmp_sTermsLang = _resultSet.getString_61zpoe$('sTermsLang'); var tmp_sTermsLangUid = _resultSet.getLong_61zpoe$('sTermsLangUid'); var tmp_sTermsActive = _resultSet.getBoolean_61zpoe$('sTermsActive'); var tmp_sTermsLastChangedBy = _resultSet.getInt_61zpoe$('sTermsLastChangedBy'); var tmp_sTermsPrimaryCsn = _resultSet.getLong_61zpoe$('sTermsPrimaryCsn'); var tmp_sTermsLocalCsn = _resultSet.getLong_61zpoe$('sTermsLocalCsn'); var tmp_sTermsLct = _resultSet.getLong_61zpoe$('sTermsLct'); var _entity = new SiteTerms(); _entity.sTermsUid = tmp_sTermsUid; _entity.termsHtml = tmp_termsHtml; _entity.sTermsLang = tmp_sTermsLang; _entity.sTermsLangUid = tmp_sTermsLangUid; _entity.sTermsActive = tmp_sTermsActive; _entity.sTermsLastChangedBy = tmp_sTermsLastChangedBy; _entity.sTermsPrimaryCsn = tmp_sTermsPrimaryCsn; _entity.sTermsLocalCsn = tmp_sTermsLocalCsn; _entity.sTermsLct = tmp_sTermsLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda; Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$; Coroutine$findByUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, SiteTerms) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM SiteTerms WHERE sTermsUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM SiteTerms WHERE sTermsUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteTermsDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral(this$SiteTermsDao_JdbcKt) { this.this$SiteTermsDao_JdbcKt = this$SiteTermsDao_JdbcKt; DoorDataSourceFactory.call(this); } function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_sTermsUid = _resultSet.getLong_61zpoe$('sTermsUid'); var tmp_termsHtml = _resultSet.getString_61zpoe$('termsHtml'); var tmp_sTermsLang = _resultSet.getString_61zpoe$('sTermsLang'); var tmp_sTermsLangUid = _resultSet.getLong_61zpoe$('sTermsLangUid'); var tmp_sTermsActive = _resultSet.getBoolean_61zpoe$('sTermsActive'); var tmp_sTermsLastChangedBy = _resultSet.getInt_61zpoe$('sTermsLastChangedBy'); var tmp_sTermsPrimaryCsn = _resultSet.getLong_61zpoe$('sTermsPrimaryCsn'); var tmp_sTermsLocalCsn = _resultSet.getLong_61zpoe$('sTermsLocalCsn'); var tmp_sTermsLct = _resultSet.getLong_61zpoe$('sTermsLct'); var _entity = new SiteTermsWithLanguage(); _entity.sTermsUid = tmp_sTermsUid; _entity.termsHtml = tmp_termsHtml; _entity.sTermsLang = tmp_sTermsLang; _entity.sTermsLangUid = tmp_sTermsLangUid; _entity.sTermsActive = tmp_sTermsActive; _entity.sTermsLastChangedBy = tmp_sTermsLastChangedBy; _entity.sTermsPrimaryCsn = tmp_sTermsPrimaryCsn; _entity.sTermsLocalCsn = tmp_sTermsLocalCsn; _entity.sTermsLct = tmp_sTermsLct; var _stLanguage_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }if (_stLanguage_nullFieldCount < 11) { if (_entity.stLanguage == null) { _entity.stLanguage = new Language(); }ensureNotNull(_entity.stLanguage).langUid = tmp_langUid; ensureNotNull(_entity.stLanguage).name = tmp_name; ensureNotNull(_entity.stLanguage).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.stLanguage).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.stLanguage).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.stLanguage).Language_Type = tmp_Language_Type; ensureNotNull(_entity.stLanguage).languageActive = tmp_languageActive; ensureNotNull(_entity.stLanguage).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.stLanguage).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.stLanguage).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.stLanguage).langLct = tmp_langLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this$SiteTermsDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SiteTermsDao_JdbcKt = this$SiteTermsDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT SiteTerms.*, Language.* \n | FROM SiteTerms \n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT SiteTerms.*, Language.* \n | FROM SiteTerms \n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SiteTermsDao_JdbcKt._db, _stmtConfig, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this$SiteTermsDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this$SiteTermsDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$SiteTermsDao_JdbcKt._db, listOf(['SiteTerms', 'Language']), SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this.this$SiteTermsDao_JdbcKt, _limit, _offset)); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this$SiteTermsDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SiteTermsDao_JdbcKt = this$SiteTermsDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT SiteTerms.*, Language.* \n | FROM SiteTerms \n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT SiteTerms.*, Language.* \n | FROM SiteTerms \n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SiteTermsDao_JdbcKt._db, _stmtConfig, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this$SiteTermsDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this$SiteTermsDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$SiteTermsDao_JdbcKt._db, listOf(['SiteTerms', 'Language']), SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this.this$SiteTermsDao_JdbcKt)); }; SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; SiteTermsDao_JdbcKt.prototype.findAllTermsAsFactory = function () { var _result = new SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral(this); return _result; }; function SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_sTermsUid = _resultSet.getLong_61zpoe$('sTermsUid'); var tmp_termsHtml = _resultSet.getString_61zpoe$('termsHtml'); var tmp_sTermsLang = _resultSet.getString_61zpoe$('sTermsLang'); var tmp_sTermsLangUid = _resultSet.getLong_61zpoe$('sTermsLangUid'); var tmp_sTermsActive = _resultSet.getBoolean_61zpoe$('sTermsActive'); var tmp_sTermsLastChangedBy = _resultSet.getInt_61zpoe$('sTermsLastChangedBy'); var tmp_sTermsPrimaryCsn = _resultSet.getLong_61zpoe$('sTermsPrimaryCsn'); var tmp_sTermsLocalCsn = _resultSet.getLong_61zpoe$('sTermsLocalCsn'); var tmp_sTermsLct = _resultSet.getLong_61zpoe$('sTermsLct'); var _entity = new SiteTermsWithLanguage(); _entity.sTermsUid = tmp_sTermsUid; _entity.termsHtml = tmp_termsHtml; _entity.sTermsLang = tmp_sTermsLang; _entity.sTermsLangUid = tmp_sTermsLangUid; _entity.sTermsActive = tmp_sTermsActive; _entity.sTermsLastChangedBy = tmp_sTermsLastChangedBy; _entity.sTermsPrimaryCsn = tmp_sTermsPrimaryCsn; _entity.sTermsLocalCsn = tmp_sTermsLocalCsn; _entity.sTermsLct = tmp_sTermsLct; var _stLanguage_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _stLanguage_nullFieldCount = _stLanguage_nullFieldCount + 1 | 0; }if (_stLanguage_nullFieldCount < 11) { if (_entity.stLanguage == null) { _entity.stLanguage = new Language(); }ensureNotNull(_entity.stLanguage).langUid = tmp_langUid; ensureNotNull(_entity.stLanguage).name = tmp_name; ensureNotNull(_entity.stLanguage).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.stLanguage).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.stLanguage).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.stLanguage).Language_Type = tmp_Language_Type; ensureNotNull(_entity.stLanguage).languageActive = tmp_languageActive; ensureNotNull(_entity.stLanguage).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.stLanguage).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.stLanguage).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.stLanguage).langLct = tmp_langLct; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllWithLanguageAsList($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$findAllWithLanguageAsList.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllWithLanguageAsList.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllWithLanguageAsList.prototype.constructor = Coroutine$findAllWithLanguageAsList; Coroutine$findAllWithLanguageAsList.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT SiteTerms.*, Language.*\n | FROM SiteTerms\n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT SiteTerms.*, Language.*\n | FROM SiteTerms\n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.findAllWithLanguageAsList = function (continuation_0, suspended) { var instance = new Coroutine$findAllWithLanguageAsList(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$sTermsUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$sTermsUid = closure$sTermsUid_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda; Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$sTermsUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$sTermsUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$sTermsUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$($this, sTermsUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sTermsUid = sTermsUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$; Coroutine$updateActiveByUid_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE SiteTerms \n | SET sTermsActive = ?,\n | sTermsLct = ?\n | WHERE sTermsUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE SiteTerms \n | SET sTermsActive = ?,\n | sTermsLct = ?\n | WHERE sTermsUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteTermsDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$sTermsUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (sTermsUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$(this, sTermsUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4ezy5m$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$.prototype.constructor = Coroutine$insertListAsync_4ezy5m$; Coroutine$insertListAsync_4ezy5m$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSiteTerms_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda; Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.termsHtml); this.local$_stmt.setString_vqvrqt$(2, _entity.sTermsLang); this.local$_stmt.setLong_6svq3l$(3, _entity.sTermsLangUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.sTermsActive); this.local$_stmt.setInt_vux9f0$(5, _entity.sTermsLastChangedBy); this.local$_stmt.setLong_6svq3l$(6, _entity.sTermsPrimaryCsn); this.local$_stmt.setLong_6svq3l$(7, _entity.sTermsLocalCsn); this.local$_stmt.setLong_6svq3l$(8, _entity.sTermsLct); this.local$_stmt.setLong_6svq3l$(9, _entity.sTermsUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$.prototype.constructor = Coroutine$updateListAsync_4ezy5m$; Coroutine$updateListAsync_4ezy5m$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE SiteTerms SET termsHtml = ?, sTermsLang = ?, sTermsLangUid = ?, sTermsActive = ?, sTermsLastChangedBy = ?, sTermsPrimaryCsn = ?, sTermsLocalCsn = ?, sTermsLct = ? WHERE sTermsUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SiteTermsDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO SiteTerms (sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING sTermsUid'; } else tmp$ = ''; return "INSERT INTO SiteTerms (sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES(COALESCE(?,nextval('SiteTerms_sTermsUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.sTermsUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.sTermsUid); } stmt.setString_vqvrqt$(2, entity.termsHtml); stmt.setString_vqvrqt$(3, entity.sTermsLang); stmt.setLong_6svq3l$(4, entity.sTermsLangUid); stmt.setBoolean_fzusl$(5, entity.sTermsActive); stmt.setInt_vux9f0$(6, entity.sTermsLastChangedBy); stmt.setLong_6svq3l$(7, entity.sTermsPrimaryCsn); stmt.setLong_6svq3l$(8, entity.sTermsLocalCsn); stmt.setLong_6svq3l$(9, entity.sTermsLct); }; SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SiteTermsDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao_JdbcKt', interfaces: [SiteTermsDao]}; function SiteTermsDao_ReplicateWrapper(_db, _dao) { SiteTermsDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_0; Coroutine$replicateOnNewNode_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_0.prototype.constructor = Coroutine$replicateOnChange_0; Coroutine$replicateOnChange_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_ReplicateWrapper.prototype.findSiteTerms_61zpoe$ = function (langCode, continuation) { return this._dao_0.findSiteTerms_61zpoe$(langCode, continuation); }; function Coroutine$insertAsync_gc516$_0($this, siteTerms_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$siteTerms = siteTerms_0; } Coroutine$insertAsync_gc516$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_gc516$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_gc516$_0.prototype.constructor = Coroutine$insertAsync_gc516$_0; Coroutine$insertAsync_gc516$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$siteTerms.sTermsUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(272, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$siteTerms.sTermsUid = _newPk; this.state_0 = 3; continue; case 3: this.local$siteTerms.sTermsLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_gc516$(this.local$siteTerms, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$siteTerms.sTermsUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.insertAsync_gc516$ = function (siteTerms_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_gc516$_0(this, siteTerms_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; SiteTermsDao_ReplicateWrapper.prototype.findAllTermsAsFactory = function () { return this._dao_0.findAllTermsAsFactory(); }; SiteTermsDao_ReplicateWrapper.prototype.findAllWithLanguageAsList = function (continuation) { return this._dao_0.findAllWithLanguageAsList(continuation); }; function Coroutine$updateActiveByUid_zaz62j$_0($this, sTermsUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sTermsUid = sTermsUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_0.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_0; Coroutine$updateActiveByUid_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$sTermsUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (sTermsUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_0(this, sTermsUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4ezy5m$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_0.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_0; Coroutine$insertListAsync_4ezy5m$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.sTermsUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(272, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.sTermsUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.sTermsLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_0.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_0; Coroutine$updateListAsync_4ezy5m$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.sTermsLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao_ReplicateWrapper', interfaces: [SiteTermsDao]}; function SiteTermsDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SiteTermsDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_1; Coroutine$replicateOnNewNode_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_1.prototype.constructor = Coroutine$replicateOnChange_1; Coroutine$replicateOnChange_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findSiteTerms_61zpoe$_0($this, langCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$langCode = langCode_0; } Coroutine$findSiteTerms_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSiteTerms_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSiteTerms_61zpoe$_0.prototype.constructor = Coroutine$findSiteTerms_61zpoe$_0; Coroutine$findSiteTerms_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSiteTerms_61zpoe$(this.local$langCode, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.findSiteTerms_61zpoe$ = function (langCode_0, continuation_0, suspended) { var instance = new Coroutine$findSiteTerms_61zpoe$_0(this, langCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_gc516$_1($this, siteTerms_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$siteTerms = siteTerms_0; } Coroutine$insertAsync_gc516$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_gc516$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_gc516$_1.prototype.constructor = Coroutine$insertAsync_gc516$_1; Coroutine$insertAsync_gc516$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_gc516$(this.local$siteTerms, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.insertAsync_gc516$ = function (siteTerms_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_gc516$_1(this, siteTerms_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_0; Coroutine$findByUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_Repo.prototype.findAllTermsAsFactory = function () { var _result = this._dao.findAllTermsAsFactory(); return _result; }; function Coroutine$findAllWithLanguageAsList_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$findAllWithLanguageAsList_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllWithLanguageAsList_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllWithLanguageAsList_0.prototype.constructor = Coroutine$findAllWithLanguageAsList_0; Coroutine$findAllWithLanguageAsList_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllWithLanguageAsList(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.findAllWithLanguageAsList = function (continuation_0, suspended) { var instance = new Coroutine$findAllWithLanguageAsList_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_1($this, sTermsUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sTermsUid = sTermsUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_1.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_1; Coroutine$updateActiveByUid_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$sTermsUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (sTermsUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_1(this, sTermsUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4ezy5m$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_1.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_1; Coroutine$insertListAsync_4ezy5m$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_1.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_1; Coroutine$updateListAsync_4ezy5m$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao_Repo', interfaces: [SiteTermsDao]}; function UmAppDatabaseJsImplementations() { UmAppDatabaseJsImplementations_instance = this; DoorJsImplClasses.call(this); this.dbKClass_1or59m$_0 = getKClass(UmAppDatabase); this.dbImplKClass_mtoxqu$_0 = getKClass(UmAppDatabase_JdbcKt); this.replicateWrapperImplClass_gokwcl$_0 = getKClass(UmAppDatabase_ReplicateWrapper); this.repositoryImplClass_cqcl2d$_0 = getKClass(UmAppDatabase_Repo); this.metadata_5fnphu$_0 = new UmAppDatabase_DoorMetadata(); } Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'dbKClass', {configurable: true, get: function () { return this.dbKClass_1or59m$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'dbImplKClass', {configurable: true, get: function () { return this.dbImplKClass_mtoxqu$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'replicateWrapperImplClass', {configurable: true, get: function () { return this.replicateWrapperImplClass_gokwcl$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'repositoryImplClass', {configurable: true, get: function () { return this.repositoryImplClass_cqcl2d$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'metadata', {configurable: true, get: function () { return this.metadata_5fnphu$_0; }}); UmAppDatabaseJsImplementations.$metadata$ = {kind: Kind_OBJECT, simpleName: 'UmAppDatabaseJsImplementations', interfaces: [DoorJsImplClasses]}; var UmAppDatabaseJsImplementations_instance = null; function UmAppDatabaseJsImplementations_getInstance() { if (UmAppDatabaseJsImplementations_instance === null) { new UmAppDatabaseJsImplementations(); }return UmAppDatabaseJsImplementations_instance; } function UmAppDatabase_DoorMetadata() { UmAppDatabase_DoorMetadata$Companion_getInstance(); DoorDatabaseMetadata.call(this); this.allTables_gkz47r$_0 = listOf(['NetworkNode', 'ClazzLog', 'ClazzLogAttendanceRecord', 'Schedule', 'DateRange', 'HolidayCalendar', 'Holiday', 'ScheduledCheck', 'AuditLog', 'CustomField', 'CustomFieldValue', 'CustomFieldValueOption', 'Person', 'Clazz', 'ClazzEnrolment', 'LeavingReason', 'ContentEntry', 'ContentEntryContentCategoryJoin', 'ContentEntryParentChildJoin', 'ContentEntryRelatedEntryJoin', 'ContentCategorySchema', 'ContentCategory', 'Language', 'LanguageVariant', 'AccessToken', 'PersonAuth', 'Role', 'EntityRole', 'PersonGroup', 'PersonGroupMember', 'PersonPicture', 'ScrapeQueueItem', 'ScrapeRun', 'ConnectivityStatus', 'Container', 'ContainerEntry', 'ContainerEntryFile', 'VerbEntity', 'XObjectEntity', 'StatementEntity', 'ContextXObjectStatementJoin', 'AgentEntity', 'StateEntity', 'StateContentEntity', 'XLangMapEntry', 'SyncNode', 'LocallyAvailableContainer', 'ContainerETag', 'School', 'SchoolMember', 'Comments', 'Report', 'Site', 'ContainerImportJob', 'LearnerGroup', 'LearnerGroupMember', 'GroupLearningSession', 'SiteTerms', 'ClazzContentJoin', 'PersonParentJoin', 'ScopedGrant', 'ErrorReport', 'ClazzAssignment', 'ClazzAssignmentContentJoin', 'CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment', 'CourseAssignmentMark', 'ClazzAssignmentRollUp', 'PersonAuth2', 'UserSession', 'ContentJob', 'ContentJobItem', 'CourseBlock', 'CourseTerminology', 'CourseGroupSet', 'CourseGroupMember', 'SqliteChangeSeqNums', 'UpdateNotification', 'ChangeLog', 'ZombieAttachmentData', 'DoorNode', 'ReplicationStatus', 'ClazzLogReplicate', 'ClazzLogAttendanceRecordReplicate', 'CourseAssignmentSubmissionReplicate', 'CourseAssignmentSubmissionAttachmentReplicate', 'CourseAssignmentMarkReplicate', 'CourseBlockReplicate', 'CourseTerminologyReplicate', 'CourseGroupSetReplicate', 'CourseGroupMemberReplicate', 'ScheduleReplicate', 'HolidayCalendarReplicate', 'HolidayReplicate', 'PersonReplicate', 'ClazzReplicate', 'ClazzEnrolmentReplicate', 'LeavingReasonReplicate', 'ContentEntryReplicate', 'ContentEntryContentCategoryJoinReplicate', 'ContentEntryParentChildJoinReplicate', 'ContentEntryRelatedEntryJoinReplicate', 'ContentCategorySchemaReplicate', 'ContentCategoryReplicate', 'LanguageReplicate', 'LanguageVariantReplicate', 'PersonGroupReplicate', 'PersonGroupMemberReplicate', 'PersonPictureReplicate', 'ContainerReplicate', 'VerbEntityReplicate', 'XObjectEntityReplicate', 'StatementEntityReplicate', 'ContextXObjectStatementJoinReplicate', 'AgentEntityReplicate', 'StateEntityReplicate', 'StateContentEntityReplicate', 'XLangMapEntryReplicate', 'SchoolReplicate', 'SchoolMemberReplicate', 'CommentsReplicate', 'ReportReplicate', 'SiteReplicate', 'LearnerGroupReplicate', 'LearnerGroupMemberReplicate', 'GroupLearningSessionReplicate', 'SiteTermsReplicate', 'ClazzContentJoinReplicate', 'PersonParentJoinReplicate', 'ScopedGrantReplicate', 'ErrorReportReplicate', 'ClazzAssignmentReplicate', 'ClazzAssignmentContentJoinReplicate', 'PersonAuth2Replicate', 'UserSessionReplicate', 'CoursePicture', 'CoursePictureReplicate', 'ContentEntryPicture', 'ContentEntryPictureReplicate', 'Chat', 'ChatMember', 'Message', 'MessageReplicate', 'ChatReplicate', 'ChatMemberReplicate', 'MessageRead', 'MessageReadReplicate', 'CourseDiscussion', 'CourseDiscussionReplicate', 'DiscussionTopic', 'DiscussionTopicReplicate', 'DiscussionPost', 'DiscussionPostReplicate']); this.replicateEntities_i11jcr$_0 = lazy(LazyThreadSafetyMode.NONE, UmAppDatabase_DoorMetadata$replicateEntities$lambda); } Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'dbClass', {configurable: true, get: function () { return getKClass(UmAppDatabase); }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'hasReadOnlyWrapper', {configurable: true, get: function () { return true; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'hasAttachments', {configurable: true, get: function () { return true; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'syncableTableIdMap', {configurable: true, get: function () { return UmAppDatabase_DoorMetadata$Companion_getInstance().TABLE_ID_MAP; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'version', {configurable: true, get: function () { return 106; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'allTables', {configurable: true, get: function () { return this.allTables_gkz47r$_0; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'replicateEntities', {configurable: true, get: function () { return this.replicateEntities_i11jcr$_0.value; }}); function UmAppDatabase_DoorMetadata$Companion() { UmAppDatabase_DoorMetadata$Companion_instance = this; this.TABLE_ID_MAP = emptyMap(); } UmAppDatabase_DoorMetadata$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UmAppDatabase_DoorMetadata$Companion_instance = null; function UmAppDatabase_DoorMetadata$Companion_getInstance() { if (UmAppDatabase_DoorMetadata$Companion_instance === null) { new UmAppDatabase_DoorMetadata$Companion(); }return UmAppDatabase_DoorMetadata$Companion_instance; } function UmAppDatabase_DoorMetadata$replicateEntities$lambda() { return mapOf([to(14, new ReplicationEntityMetaData(14, 100, 'ClazzLog', 'ClazzLogReplicate', 'ClazzLog_ReceiveView', 'clazzLogUid', 'clazzLogLastChangedTime', 'clPk', 'clDestination', 'clVersionId', 'clPending', listOf([new ReplicationFieldMetaData('clazzLogUid', -5), new ReplicationFieldMetaData('clazzLogClazzUid', -5), new ReplicationFieldMetaData('logDate', -5), new ReplicationFieldMetaData('timeRecorded', -5), new ReplicationFieldMetaData('clazzLogDone', 16), new ReplicationFieldMetaData('cancellationNote', -1), new ReplicationFieldMetaData('clazzLogCancelled', 16), new ReplicationFieldMetaData('clazzLogNumPresent', 4), new ReplicationFieldMetaData('clazzLogNumAbsent', 4), new ReplicationFieldMetaData('clazzLogNumPartial', 4), new ReplicationFieldMetaData('clazzLogScheduleUid', -5), new ReplicationFieldMetaData('clazzLogStatusFlag', 4), new ReplicationFieldMetaData('clazzLogMSQN', -5), new ReplicationFieldMetaData('clazzLogLCSN', -5), new ReplicationFieldMetaData('clazzLogLCB', 4), new ReplicationFieldMetaData('clazzLogLastChangedTime', -5)]), listOf([new ReplicationFieldMetaData('clPk', -5), new ReplicationFieldMetaData('clVersionId', -5), new ReplicationFieldMetaData('clDestination', -5), new ReplicationFieldMetaData('clPending', 16)]), null, null, null, 1000)), to(15, new ReplicationEntityMetaData(15, 100, 'ClazzLogAttendanceRecord', 'ClazzLogAttendanceRecordReplicate', 'ClazzLogAttendanceRecord_ReceiveView', 'clazzLogAttendanceRecordUid', 'clazzLogAttendanceRecordLastChangedTime', 'clarPk', 'clarDestination', 'clarVersionId', 'clarPending', listOf([new ReplicationFieldMetaData('clazzLogAttendanceRecordUid', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordClazzLogUid', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordPersonUid', -5), new ReplicationFieldMetaData('attendanceStatus', 4), new ReplicationFieldMetaData('clazzLogAttendanceRecordMasterChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordLocalChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordLastChangedBy', 4), new ReplicationFieldMetaData('clazzLogAttendanceRecordLastChangedTime', -5)]), listOf([new ReplicationFieldMetaData('clarPk', -5), new ReplicationFieldMetaData('clarVersionId', -5), new ReplicationFieldMetaData('clarDestination', -5), new ReplicationFieldMetaData('clarPending', 16)]), null, null, null, 1000)), to(21, new ReplicationEntityMetaData(21, 100, 'Schedule', 'ScheduleReplicate', 'Schedule_ReceiveView', 'scheduleUid', 'scheduleLastChangedTime', 'schedulePk', 'scheduleDestination', 'scheduleVersionId', 'schedulePending', listOf([new ReplicationFieldMetaData('scheduleUid', -5), new ReplicationFieldMetaData('sceduleStartTime', -5), new ReplicationFieldMetaData('scheduleEndTime', -5), new ReplicationFieldMetaData('scheduleDay', 4), new ReplicationFieldMetaData('scheduleMonth', 4), new ReplicationFieldMetaData('scheduleFrequency', 4), new ReplicationFieldMetaData('umCalendarUid', -5), new ReplicationFieldMetaData('scheduleClazzUid', -5), new ReplicationFieldMetaData('scheduleMasterChangeSeqNum', -5), new ReplicationFieldMetaData('scheduleLocalChangeSeqNum', -5), new ReplicationFieldMetaData('scheduleLastChangedBy', 4), new ReplicationFieldMetaData('scheduleLastChangedTime', -5), new ReplicationFieldMetaData('scheduleActive', 16)]), listOf([new ReplicationFieldMetaData('schedulePk', -5), new ReplicationFieldMetaData('scheduleVersionId', -5), new ReplicationFieldMetaData('scheduleDestination', -5), new ReplicationFieldMetaData('schedulePending', 16)]), null, null, null, 1000)), to(28, new ReplicationEntityMetaData(28, 100, 'HolidayCalendar', 'HolidayCalendarReplicate', 'HolidayCalendar_ReceiveView', 'umCalendarUid', 'umCalendarLct', 'hcPk', 'hcDestination', 'hcVersionId', 'hcPending', listOf([new ReplicationFieldMetaData('umCalendarUid', -5), new ReplicationFieldMetaData('umCalendarName', -1), new ReplicationFieldMetaData('umCalendarCategory', 4), new ReplicationFieldMetaData('umCalendarActive', 16), new ReplicationFieldMetaData('umCalendarMasterChangeSeqNum', -5), new ReplicationFieldMetaData('umCalendarLocalChangeSeqNum', -5), new ReplicationFieldMetaData('umCalendarLastChangedBy', 4), new ReplicationFieldMetaData('umCalendarLct', -5)]), listOf([new ReplicationFieldMetaData('hcPk', -5), new ReplicationFieldMetaData('hcVersionId', -5), new ReplicationFieldMetaData('hcDestination', -5), new ReplicationFieldMetaData('hcPending', 16)]), null, null, null, 1000)), to(99, new ReplicationEntityMetaData(99, 100, 'Holiday', 'HolidayReplicate', 'Holiday_ReceiveView', 'holUid', 'holLct', 'holidayPk', 'holidayDestination', 'holidayVersionId', 'holidayPending', listOf([new ReplicationFieldMetaData('holUid', -5), new ReplicationFieldMetaData('holMasterCsn', -5), new ReplicationFieldMetaData('holLocalCsn', -5), new ReplicationFieldMetaData('holLastModBy', 4), new ReplicationFieldMetaData('holLct', -5), new ReplicationFieldMetaData('holActive', 16), new ReplicationFieldMetaData('holHolidayCalendarUid', -5), new ReplicationFieldMetaData('holStartTime', -5), new ReplicationFieldMetaData('holEndTime', -5), new ReplicationFieldMetaData('holName', -1)]), listOf([new ReplicationFieldMetaData('holidayPk', -5), new ReplicationFieldMetaData('holidayVersionId', -5), new ReplicationFieldMetaData('holidayDestination', -5), new ReplicationFieldMetaData('holidayPending', 16)]), null, null, null, 1000)), to(9, new ReplicationEntityMetaData(9, 100, 'Person', 'PersonReplicate', 'Person_ReceiveView', 'personUid', 'personLct', 'personPk', 'personDestination', 'personVersionId', 'personPending', listOf([new ReplicationFieldMetaData('personUid', -5), new ReplicationFieldMetaData('username', -1), new ReplicationFieldMetaData('firstNames', -1), new ReplicationFieldMetaData('lastName', -1), new ReplicationFieldMetaData('emailAddr', -1), new ReplicationFieldMetaData('phoneNum', -1), new ReplicationFieldMetaData('gender', 4), new ReplicationFieldMetaData('active', 16), new ReplicationFieldMetaData('admin', 16), new ReplicationFieldMetaData('personNotes', -1), new ReplicationFieldMetaData('fatherName', -1), new ReplicationFieldMetaData('fatherNumber', -1), new ReplicationFieldMetaData('motherName', -1), new ReplicationFieldMetaData('motherNum', -1), new ReplicationFieldMetaData('dateOfBirth', -5), new ReplicationFieldMetaData('personAddress', -1), new ReplicationFieldMetaData('personOrgId', -1), new ReplicationFieldMetaData('personGroupUid', -5), new ReplicationFieldMetaData('personMasterChangeSeqNum', -5), new ReplicationFieldMetaData('personLocalChangeSeqNum', -5), new ReplicationFieldMetaData('personLastChangedBy', 4), new ReplicationFieldMetaData('personLct', -5), new ReplicationFieldMetaData('personCountry', -1), new ReplicationFieldMetaData('personType', 4)]), listOf([new ReplicationFieldMetaData('personPk', -5), new ReplicationFieldMetaData('personVersionId', -5), new ReplicationFieldMetaData('personDestination', -5), new ReplicationFieldMetaData('personPending', 16)]), null, null, null, 1000)), to(6, new ReplicationEntityMetaData(6, 0, 'Clazz', 'ClazzReplicate', 'Clazz_ReceiveView', 'clazzUid', 'clazzLct', 'clazzPk', 'clazzDestination', 'clazzVersionId', 'clazzPending', listOf([new ReplicationFieldMetaData('clazzUid', -5), new ReplicationFieldMetaData('clazzName', -1), new ReplicationFieldMetaData('clazzDesc', -1), new ReplicationFieldMetaData('attendanceAverage', 6), new ReplicationFieldMetaData('clazzHolidayUMCalendarUid', -5), new ReplicationFieldMetaData('clazzScheuleUMCalendarUid', -5), new ReplicationFieldMetaData('isClazzActive', 16), new ReplicationFieldMetaData('clazzLocationUid', -5), new ReplicationFieldMetaData('clazzStartTime', -5), new ReplicationFieldMetaData('clazzEndTime', -5), new ReplicationFieldMetaData('clazzFeatures', -5), new ReplicationFieldMetaData('clazzSchoolUid', -5), new ReplicationFieldMetaData('clazzEnrolmentPolicy', 4), new ReplicationFieldMetaData('clazzTerminologyUid', -5), new ReplicationFieldMetaData('clazzMasterChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLocalChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLastChangedBy', 4), new ReplicationFieldMetaData('clazzLct', -5), new ReplicationFieldMetaData('clazzTimeZone', -1), new ReplicationFieldMetaData('clazzStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('clazzTeachersPersonGroupUid', -5), new ReplicationFieldMetaData('clazzPendingStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('clazzParentsPersonGroupUid', -5), new ReplicationFieldMetaData('clazzCode', -1)]), listOf([new ReplicationFieldMetaData('clazzPk', -5), new ReplicationFieldMetaData('clazzVersionId', -5), new ReplicationFieldMetaData('clazzDestination', -5), new ReplicationFieldMetaData('clazzPending', 16)]), null, null, null, 1000)), to(65, new ReplicationEntityMetaData(65, 1, 'ClazzEnrolment', 'ClazzEnrolmentReplicate', 'ClazzEnrolment_ReceiveView', 'clazzEnrolmentUid', 'clazzEnrolmentLct', 'cePk', 'ceDestination', 'ceVersionId', 'cePending', listOf([new ReplicationFieldMetaData('clazzEnrolmentUid', -5), new ReplicationFieldMetaData('clazzEnrolmentPersonUid', -5), new ReplicationFieldMetaData('clazzEnrolmentClazzUid', -5), new ReplicationFieldMetaData('clazzEnrolmentDateJoined', -5), new ReplicationFieldMetaData('clazzEnrolmentDateLeft', -5), new ReplicationFieldMetaData('clazzEnrolmentRole', 4), new ReplicationFieldMetaData('clazzEnrolmentAttendancePercentage', 6), new ReplicationFieldMetaData('clazzEnrolmentActive', 16), new ReplicationFieldMetaData('clazzEnrolmentLeavingReasonUid', -5), new ReplicationFieldMetaData('clazzEnrolmentOutcome', 4), new ReplicationFieldMetaData('clazzEnrolmentLocalChangeSeqNum', -5), new ReplicationFieldMetaData('clazzEnrolmentMasterChangeSeqNum', -5), new ReplicationFieldMetaData('clazzEnrolmentLastChangedBy', 4), new ReplicationFieldMetaData('clazzEnrolmentLct', -5)]), listOf([new ReplicationFieldMetaData('cePk', -5), new ReplicationFieldMetaData('ceVersionId', -5), new ReplicationFieldMetaData('ceDestination', -5), new ReplicationFieldMetaData('cePending', 16)]), null, null, null, 1000)), to(410, new ReplicationEntityMetaData(410, 100, 'LeavingReason', 'LeavingReasonReplicate', 'LeavingReason_ReceiveView', 'leavingReasonUid', 'leavingReasonLct', 'lrPk', 'lrDestination', 'lrVersionId', 'lrPending', listOf([new ReplicationFieldMetaData('leavingReasonUid', -5), new ReplicationFieldMetaData('leavingReasonTitle', -1), new ReplicationFieldMetaData('leavingReasonMCSN', -5), new ReplicationFieldMetaData('leavingReasonCSN', -5), new ReplicationFieldMetaData('leavingReasonLCB', 4), new ReplicationFieldMetaData('leavingReasonLct', -5)]), listOf([new ReplicationFieldMetaData('lrPk', -5), new ReplicationFieldMetaData('lrVersionId', -5), new ReplicationFieldMetaData('lrDestination', -5), new ReplicationFieldMetaData('lrPending', 16)]), null, null, null, 1000)), to(42, new ReplicationEntityMetaData(42, 100, 'ContentEntry', 'ContentEntryReplicate', 'ContentEntry_ReceiveView', 'contentEntryUid', 'contentEntryLct', 'cePk', 'ceDestination', 'ceVersionId', 'cePending', listOf([new ReplicationFieldMetaData('contentEntryUid', -5), new ReplicationFieldMetaData('title', -1), new ReplicationFieldMetaData('description', -1), new ReplicationFieldMetaData('entryId', -1), new ReplicationFieldMetaData('author', -1), new ReplicationFieldMetaData('publisher', -1), new ReplicationFieldMetaData('licenseType', 4), new ReplicationFieldMetaData('licenseName', -1), new ReplicationFieldMetaData('licenseUrl', -1), new ReplicationFieldMetaData('sourceUrl', -1), new ReplicationFieldMetaData('thumbnailUrl', -1), new ReplicationFieldMetaData('lastModified', -5), new ReplicationFieldMetaData('primaryLanguageUid', -5), new ReplicationFieldMetaData('languageVariantUid', -5), new ReplicationFieldMetaData('contentFlags', 4), new ReplicationFieldMetaData('leaf', 16), new ReplicationFieldMetaData('publik', 16), new ReplicationFieldMetaData('ceInactive', 16), new ReplicationFieldMetaData('completionCriteria', 4), new ReplicationFieldMetaData('minScore', 4), new ReplicationFieldMetaData('contentTypeFlag', 4), new ReplicationFieldMetaData('contentOwner', -5), new ReplicationFieldMetaData('contentEntryLocalChangeSeqNum', -5), new ReplicationFieldMetaData('contentEntryMasterChangeSeqNum', -5), new ReplicationFieldMetaData('contentEntryLastChangedBy', 4), new ReplicationFieldMetaData('contentEntryLct', -5)]), listOf([new ReplicationFieldMetaData('cePk', -5), new ReplicationFieldMetaData('ceVersionId', -5), new ReplicationFieldMetaData('ceDestination', -5), new ReplicationFieldMetaData('cePending', 16)]), null, null, null, 1000)), to(3, new ReplicationEntityMetaData(3, 100, 'ContentEntryContentCategoryJoin', 'ContentEntryContentCategoryJoinReplicate', 'ContentEntryContentCategoryJoin_ReceiveView', 'ceccjUid', 'ceccjLct', 'ceccjPk', 'ceccjDestination', 'ceccjVersionId', 'ceccjPending', listOf([new ReplicationFieldMetaData('ceccjUid', -5), new ReplicationFieldMetaData('ceccjContentEntryUid', -5), new ReplicationFieldMetaData('ceccjContentCategoryUid', -5), new ReplicationFieldMetaData('ceccjLocalChangeSeqNum', -5), new ReplicationFieldMetaData('ceccjMasterChangeSeqNum', -5), new ReplicationFieldMetaData('ceccjLastChangedBy', 4), new ReplicationFieldMetaData('ceccjLct', -5)]), listOf([new ReplicationFieldMetaData('ceccjPk', -5), new ReplicationFieldMetaData('ceccjVersionId', -5), new ReplicationFieldMetaData('ceccjDestination', -5), new ReplicationFieldMetaData('ceccjPending', 16)]), null, null, null, 1000)), to(7, new ReplicationEntityMetaData(7, 100, 'ContentEntryParentChildJoin', 'ContentEntryParentChildJoinReplicate', 'ContentEntryParentChildJoin_ReceiveView', 'cepcjUid', 'cepcjLct', 'cepcjPk', 'cepcjDestination', 'cepcjVersionId', 'cepcjPending', listOf([new ReplicationFieldMetaData('cepcjParentContentEntryUid', -5), new ReplicationFieldMetaData('cepcjChildContentEntryUid', -5), new ReplicationFieldMetaData('childIndex', 4), new ReplicationFieldMetaData('cepcjUid', -5), new ReplicationFieldMetaData('cepcjLocalChangeSeqNum', -5), new ReplicationFieldMetaData('cepcjMasterChangeSeqNum', -5), new ReplicationFieldMetaData('cepcjLastChangedBy', 4), new ReplicationFieldMetaData('cepcjLct', -5)]), listOf([new ReplicationFieldMetaData('cepcjPk', -5), new ReplicationFieldMetaData('cepcjVersionId', -5), new ReplicationFieldMetaData('cepcjDestination', -5), new ReplicationFieldMetaData('cepcjPending', 16)]), null, null, null, 1000)), to(8, new ReplicationEntityMetaData(8, 100, 'ContentEntryRelatedEntryJoin', 'ContentEntryRelatedEntryJoinReplicate', 'ContentEntryRelatedEntryJoin_ReceiveView', 'cerejUid', 'cerejLct', 'cerejPk', 'cerejDestination', 'cerejVersionId', 'cerejPending', listOf([new ReplicationFieldMetaData('cerejUid', -5), new ReplicationFieldMetaData('cerejContentEntryUid', -5), new ReplicationFieldMetaData('cerejRelatedEntryUid', -5), new ReplicationFieldMetaData('cerejLastChangedBy', 4), new ReplicationFieldMetaData('relType', 4), new ReplicationFieldMetaData('comment', -1), new ReplicationFieldMetaData('cerejRelLanguageUid', -5), new ReplicationFieldMetaData('cerejLocalChangeSeqNum', -5), new ReplicationFieldMetaData('cerejMasterChangeSeqNum', -5), new ReplicationFieldMetaData('cerejLct', -5)]), listOf([new ReplicationFieldMetaData('cerejPk', -5), new ReplicationFieldMetaData('cerejVersionId', -5), new ReplicationFieldMetaData('cerejDestination', -5), new ReplicationFieldMetaData('cerejPending', 16)]), null, null, null, 1000)), to(2, new ReplicationEntityMetaData(2, 100, 'ContentCategorySchema', 'ContentCategorySchemaReplicate', 'ContentCategorySchema_ReceiveView', 'contentCategorySchemaUid', 'contentCategorySchemaLct', 'ccsPk', 'ccsDestination', 'ccsVersionId', 'ccsPending', listOf([new ReplicationFieldMetaData('contentCategorySchemaUid', -5), new ReplicationFieldMetaData('schemaName', -1), new ReplicationFieldMetaData('schemaUrl', -1), new ReplicationFieldMetaData('contentCategorySchemaLocalChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategorySchemaMasterChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategorySchemaLastChangedBy', 4), new ReplicationFieldMetaData('contentCategorySchemaLct', -5)]), listOf([new ReplicationFieldMetaData('ccsPk', -5), new ReplicationFieldMetaData('ccsVersionId', -5), new ReplicationFieldMetaData('ccsDestination', -5), new ReplicationFieldMetaData('ccsPending', 16)]), null, null, null, 1000)), to(1, new ReplicationEntityMetaData(1, 100, 'ContentCategory', 'ContentCategoryReplicate', 'ContentCategory_ReceiveView', 'contentCategoryUid', 'contentCategoryLct', 'ccPk', 'ccDestination', 'ccVersionId', 'ccPending', listOf([new ReplicationFieldMetaData('contentCategoryUid', -5), new ReplicationFieldMetaData('ctnCatContentCategorySchemaUid', -5), new ReplicationFieldMetaData('name', -1), new ReplicationFieldMetaData('contentCategoryLocalChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategoryMasterChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategoryLastChangedBy', 4), new ReplicationFieldMetaData('contentCategoryLct', -5)]), listOf([new ReplicationFieldMetaData('ccPk', -5), new ReplicationFieldMetaData('ccVersionId', -5), new ReplicationFieldMetaData('ccDestination', -5), new ReplicationFieldMetaData('ccPending', 16)]), null, null, null, 1000)), to(13, new ReplicationEntityMetaData(13, 100, 'Language', 'LanguageReplicate', 'Language_ReceiveView', 'langUid', 'langLct', 'languagePk', 'languageDestination', 'languageVersionId', 'languagePending', listOf([new ReplicationFieldMetaData('langUid', -5), new ReplicationFieldMetaData('name', -1), new ReplicationFieldMetaData('iso_639_1_standard', -1), new ReplicationFieldMetaData('iso_639_2_standard', -1), new ReplicationFieldMetaData('iso_639_3_standard', -1), new ReplicationFieldMetaData('Language_Type', -1), new ReplicationFieldMetaData('languageActive', 16), new ReplicationFieldMetaData('langLocalChangeSeqNum', -5), new ReplicationFieldMetaData('langMasterChangeSeqNum', -5), new ReplicationFieldMetaData('langLastChangedBy', 4), new ReplicationFieldMetaData('langLct', -5)]), listOf([new ReplicationFieldMetaData('languagePk', -5), new ReplicationFieldMetaData('languageVersionId', -5), new ReplicationFieldMetaData('languageDestination', -5), new ReplicationFieldMetaData('languagePending', 16)]), null, null, null, 1000)), to(10, new ReplicationEntityMetaData(10, 100, 'LanguageVariant', 'LanguageVariantReplicate', 'LanguageVariant_ReceiveView', 'langVariantUid', 'langVariantLct', 'lvPk', 'lvDestination', 'lvVersionId', 'lvPending', listOf([new ReplicationFieldMetaData('langVariantUid', -5), new ReplicationFieldMetaData('langUid', -5), new ReplicationFieldMetaData('countryCode', -1), new ReplicationFieldMetaData('name', -1), new ReplicationFieldMetaData('langVariantLocalChangeSeqNum', -5), new ReplicationFieldMetaData('langVariantMasterChangeSeqNum', -5), new ReplicationFieldMetaData('langVariantLastChangedBy', 4), new ReplicationFieldMetaData('langVariantLct', -5)]), listOf([new ReplicationFieldMetaData('lvPk', -5), new ReplicationFieldMetaData('lvVersionId', -5), new ReplicationFieldMetaData('lvDestination', -5), new ReplicationFieldMetaData('lvPending', 16)]), null, null, null, 1000)), to(43, new ReplicationEntityMetaData(43, 100, 'PersonGroup', 'PersonGroupReplicate', 'PersonGroup_ReceiveView', 'groupUid', 'groupLct', 'pgPk', 'pgDestination', 'pgVersionId', 'pgPending', listOf([new ReplicationFieldMetaData('groupUid', -5), new ReplicationFieldMetaData('groupMasterCsn', -5), new ReplicationFieldMetaData('groupLocalCsn', -5), new ReplicationFieldMetaData('groupLastChangedBy', 4), new ReplicationFieldMetaData('groupLct', -5), new ReplicationFieldMetaData('groupName', -1), new ReplicationFieldMetaData('groupActive', 16), new ReplicationFieldMetaData('personGroupFlag', 4)]), listOf([new ReplicationFieldMetaData('pgPk', -5), new ReplicationFieldMetaData('pgVersionId', -5), new ReplicationFieldMetaData('pgDestination', -5), new ReplicationFieldMetaData('pgPending', 16)]), null, null, null, 1000)), to(44, new ReplicationEntityMetaData(44, 0, 'PersonGroupMember', 'PersonGroupMemberReplicate', 'PersonGroupMember_ReceiveView', 'groupMemberUid', 'groupMemberLct', 'pgmPk', 'pgmDestination', 'pgmVersionId', 'pgmPending', listOf([new ReplicationFieldMetaData('groupMemberUid', -5), new ReplicationFieldMetaData('groupMemberActive', 16), new ReplicationFieldMetaData('groupMemberPersonUid', -5), new ReplicationFieldMetaData('groupMemberGroupUid', -5), new ReplicationFieldMetaData('groupMemberMasterCsn', -5), new ReplicationFieldMetaData('groupMemberLocalCsn', -5), new ReplicationFieldMetaData('groupMemberLastChangedBy', 4), new ReplicationFieldMetaData('groupMemberLct', -5)]), listOf([new ReplicationFieldMetaData('pgmPk', -5), new ReplicationFieldMetaData('pgmVersionId', -5), new ReplicationFieldMetaData('pgmDestination', -5), new ReplicationFieldMetaData('pgmPending', 16)]), null, null, null, 1000)), to(50, new ReplicationEntityMetaData(50, 100, 'PersonPicture', 'PersonPictureReplicate', 'PersonPicture_ReceiveView', 'personPictureUid', 'personPictureLct', 'ppPk', 'ppDestination', 'ppVersionId', 'ppPending', listOf([new ReplicationFieldMetaData('personPictureUid', -5), new ReplicationFieldMetaData('personPicturePersonUid', -5), new ReplicationFieldMetaData('personPictureMasterCsn', -5), new ReplicationFieldMetaData('personPictureLocalCsn', -5), new ReplicationFieldMetaData('personPictureLastChangedBy', 4), new ReplicationFieldMetaData('personPictureLct', -5), new ReplicationFieldMetaData('personPictureUri', -1), new ReplicationFieldMetaData('personPictureMd5', -1), new ReplicationFieldMetaData('fileSize', 4), new ReplicationFieldMetaData('picTimestamp', -5), new ReplicationFieldMetaData('mimeType', -1), new ReplicationFieldMetaData('personPictureActive', 16)]), listOf([new ReplicationFieldMetaData('ppPk', -5), new ReplicationFieldMetaData('ppVersionId', -5), new ReplicationFieldMetaData('ppDestination', -5), new ReplicationFieldMetaData('ppPending', 16)]), 'personPictureUri', 'personPictureMd5', 'fileSize', 1000)), to(51, new ReplicationEntityMetaData(51, 100, 'Container', 'ContainerReplicate', 'Container_ReceiveView', 'containerUid', 'cntLct', 'containerPk', 'containerDestination', 'containerVersionId', 'containerPending', listOf([new ReplicationFieldMetaData('containerUid', -5), new ReplicationFieldMetaData('cntLocalCsn', -5), new ReplicationFieldMetaData('cntMasterCsn', -5), new ReplicationFieldMetaData('cntLastModBy', 4), new ReplicationFieldMetaData('cntLct', -5), new ReplicationFieldMetaData('fileSize', -5), new ReplicationFieldMetaData('containerContentEntryUid', -5), new ReplicationFieldMetaData('cntLastModified', -5), new ReplicationFieldMetaData('mimeType', -1), new ReplicationFieldMetaData('remarks', -1), new ReplicationFieldMetaData('mobileOptimized', 16), new ReplicationFieldMetaData('cntNumEntries', 4)]), listOf([new ReplicationFieldMetaData('containerPk', -5), new ReplicationFieldMetaData('containerVersionId', -5), new ReplicationFieldMetaData('containerDestination', -5), new ReplicationFieldMetaData('containerPending', 16)]), null, null, null, 1000)), to(62, new ReplicationEntityMetaData(62, 100, 'VerbEntity', 'VerbEntityReplicate', 'VerbEntity_ReceiveView', 'verbUid', 'verbLct', 'vePk', 'veDestination', 'veVersionId', 'vePending', listOf([new ReplicationFieldMetaData('verbUid', -5), new ReplicationFieldMetaData('urlId', -1), new ReplicationFieldMetaData('verbInActive', 16), new ReplicationFieldMetaData('verbMasterChangeSeqNum', -5), new ReplicationFieldMetaData('verbLocalChangeSeqNum', -5), new ReplicationFieldMetaData('verbLastChangedBy', 4), new ReplicationFieldMetaData('verbLct', -5)]), listOf([new ReplicationFieldMetaData('vePk', -5), new ReplicationFieldMetaData('veVersionId', -5), new ReplicationFieldMetaData('veDestination', -5), new ReplicationFieldMetaData('vePending', 16)]), null, null, null, 1000)), to(64, new ReplicationEntityMetaData(64, 100, 'XObjectEntity', 'XObjectEntityReplicate', 'XObjectEntity_ReceiveView', 'xObjectUid', 'xObjectLct', 'xoePk', 'xoeDestination', 'xoeVersionId', 'xoePending', listOf([new ReplicationFieldMetaData('xObjectUid', -5), new ReplicationFieldMetaData('objectType', -1), new ReplicationFieldMetaData('objectId', -1), new ReplicationFieldMetaData('definitionType', -1), new ReplicationFieldMetaData('interactionType', -1), new ReplicationFieldMetaData('correctResponsePattern', -1), new ReplicationFieldMetaData('objectContentEntryUid', -5), new ReplicationFieldMetaData('objectStatementRefUid', -5), new ReplicationFieldMetaData('xObjectMasterChangeSeqNum', -5), new ReplicationFieldMetaData('xObjectocalChangeSeqNum', -5), new ReplicationFieldMetaData('xObjectLastChangedBy', 4), new ReplicationFieldMetaData('xObjectLct', -5)]), listOf([new ReplicationFieldMetaData('xoePk', -5), new ReplicationFieldMetaData('xoeVersionId', -5), new ReplicationFieldMetaData('xoeDestination', -5), new ReplicationFieldMetaData('xoePending', 16)]), null, null, null, 1000)), to(60, new ReplicationEntityMetaData(60, 1, 'StatementEntity', 'StatementEntityReplicate', 'StatementEntity_ReceiveView', 'statementUid', 'statementLct', 'sePk', 'seDestination', 'seVersionId', 'sePending', listOf([new ReplicationFieldMetaData('statementUid', -5), new ReplicationFieldMetaData('statementId', -1), new ReplicationFieldMetaData('statementPersonUid', -5), new ReplicationFieldMetaData('statementVerbUid', -5), new ReplicationFieldMetaData('xObjectUid', -5), new ReplicationFieldMetaData('subStatementActorUid', -5), new ReplicationFieldMetaData('substatementVerbUid', -5), new ReplicationFieldMetaData('subStatementObjectUid', -5), new ReplicationFieldMetaData('agentUid', -5), new ReplicationFieldMetaData('instructorUid', -5), new ReplicationFieldMetaData('authorityUid', -5), new ReplicationFieldMetaData('teamUid', -5), new ReplicationFieldMetaData('resultCompletion', 16), new ReplicationFieldMetaData('resultSuccess', 5), new ReplicationFieldMetaData('resultScoreScaled', 6), new ReplicationFieldMetaData('resultScoreRaw', -5), new ReplicationFieldMetaData('resultScoreMin', -5), new ReplicationFieldMetaData('resultScoreMax', -5), new ReplicationFieldMetaData('resultDuration', -5), new ReplicationFieldMetaData('resultResponse', -1), new ReplicationFieldMetaData('timestamp', -5), new ReplicationFieldMetaData('stored', -5), new ReplicationFieldMetaData('contextRegistration', -1), new ReplicationFieldMetaData('contextPlatform', -1), new ReplicationFieldMetaData('contextStatementId', -1), new ReplicationFieldMetaData('fullStatement', -1), new ReplicationFieldMetaData('statementMasterChangeSeqNum', -5), new ReplicationFieldMetaData('statementLocalChangeSeqNum', -5), new ReplicationFieldMetaData('statementLastChangedBy', 4), new ReplicationFieldMetaData('statementLct', -5), new ReplicationFieldMetaData('extensionProgress', 4), new ReplicationFieldMetaData('contentEntryRoot', 16), new ReplicationFieldMetaData('statementContentEntryUid', -5), new ReplicationFieldMetaData('statementLearnerGroupUid', -5), new ReplicationFieldMetaData('statementClazzUid', -5)]), listOf([new ReplicationFieldMetaData('sePk', -5), new ReplicationFieldMetaData('seVersionId', -5), new ReplicationFieldMetaData('seDestination', -5), new ReplicationFieldMetaData('sePending', 16)]), null, null, null, 1000)), to(66, new ReplicationEntityMetaData(66, 100, 'ContextXObjectStatementJoin', 'ContextXObjectStatementJoinReplicate', 'ContextXObjectStatementJoin_ReceiveView', 'contextXObjectStatementJoinUid', 'contextXObjectLct', 'cxosjPk', 'cxosjDestination', 'cxosjVersionId', 'cxosjPending', listOf([new ReplicationFieldMetaData('contextXObjectStatementJoinUid', -5), new ReplicationFieldMetaData('contextActivityFlag', 4), new ReplicationFieldMetaData('contextStatementUid', -5), new ReplicationFieldMetaData('contextXObjectUid', -5), new ReplicationFieldMetaData('verbMasterChangeSeqNum', -5), new ReplicationFieldMetaData('verbLocalChangeSeqNum', -5), new ReplicationFieldMetaData('verbLastChangedBy', 4), new ReplicationFieldMetaData('contextXObjectLct', -5)]), listOf([new ReplicationFieldMetaData('cxosjPk', -5), new ReplicationFieldMetaData('cxosjVersionId', -5), new ReplicationFieldMetaData('cxosjDestination', -5), new ReplicationFieldMetaData('cxosjPending', 16)]), null, null, null, 1000)), to(68, new ReplicationEntityMetaData(68, 100, 'AgentEntity', 'AgentEntityReplicate', 'AgentEntity_ReceiveView', 'agentUid', 'agentLct', 'aePk', 'aeDestination', 'aeVersionId', 'aePending', listOf([new ReplicationFieldMetaData('agentUid', -5), new ReplicationFieldMetaData('agentMbox', -1), new ReplicationFieldMetaData('agentMbox_sha1sum', -1), new ReplicationFieldMetaData('agentOpenid', -1), new ReplicationFieldMetaData('agentAccountName', -1), new ReplicationFieldMetaData('agentHomePage', -1), new ReplicationFieldMetaData('agentPersonUid', -5), new ReplicationFieldMetaData('statementMasterChangeSeqNum', -5), new ReplicationFieldMetaData('statementLocalChangeSeqNum', -5), new ReplicationFieldMetaData('statementLastChangedBy', 4), new ReplicationFieldMetaData('agentLct', -5)]), listOf([new ReplicationFieldMetaData('aePk', -5), new ReplicationFieldMetaData('aeVersionId', -5), new ReplicationFieldMetaData('aeDestination', -5), new ReplicationFieldMetaData('aePending', 16)]), null, null, null, 1000)), to(70, new ReplicationEntityMetaData(70, 100, 'StateEntity', 'StateEntityReplicate', 'StateEntity_ReceiveView', 'stateUid', 'stateLct', 'sePk', 'seDestination', 'seVersionId', 'sePending', listOf([new ReplicationFieldMetaData('stateUid', -5), new ReplicationFieldMetaData('stateId', -1), new ReplicationFieldMetaData('agentUid', -5), new ReplicationFieldMetaData('activityId', -1), new ReplicationFieldMetaData('registration', -1), new ReplicationFieldMetaData('isIsactive', 16), new ReplicationFieldMetaData('timestamp', -5), new ReplicationFieldMetaData('stateMasterChangeSeqNum', -5), new ReplicationFieldMetaData('stateLocalChangeSeqNum', -5), new ReplicationFieldMetaData('stateLastChangedBy', 4), new ReplicationFieldMetaData('stateLct', -5)]), listOf([new ReplicationFieldMetaData('sePk', -5), new ReplicationFieldMetaData('seVersionId', -5), new ReplicationFieldMetaData('seDestination', -5), new ReplicationFieldMetaData('sePending', 16)]), null, null, null, 1000)), to(72, new ReplicationEntityMetaData(72, 100, 'StateContentEntity', 'StateContentEntityReplicate', 'StateContentEntity_ReceiveView', 'stateContentUid', 'stateContentLct', 'scePk', 'sceDestination', 'sceVersionId', 'scePending', listOf([new ReplicationFieldMetaData('stateContentUid', -5), new ReplicationFieldMetaData('stateContentStateUid', -5), new ReplicationFieldMetaData('stateContentKey', -1), new ReplicationFieldMetaData('stateContentValue', -1), new ReplicationFieldMetaData('isIsactive', 16), new ReplicationFieldMetaData('stateContentMasterChangeSeqNum', -5), new ReplicationFieldMetaData('stateContentLocalChangeSeqNum', -5), new ReplicationFieldMetaData('stateContentLastChangedBy', 4), new ReplicationFieldMetaData('stateContentLct', -5)]), listOf([new ReplicationFieldMetaData('scePk', -5), new ReplicationFieldMetaData('sceVersionId', -5), new ReplicationFieldMetaData('sceDestination', -5), new ReplicationFieldMetaData('scePending', 16)]), null, null, null, 1000)), to(74, new ReplicationEntityMetaData(74, 100, 'XLangMapEntry', 'XLangMapEntryReplicate', 'XLangMapEntry_ReceiveView', 'statementLangMapUid', 'statementLangMapLct', 'xlmePk', 'xlmeDestination', 'xlmeVersionId', 'xlmePending', listOf([new ReplicationFieldMetaData('verbLangMapUid', -5), new ReplicationFieldMetaData('objectLangMapUid', -5), new ReplicationFieldMetaData('languageLangMapUid', -5), new ReplicationFieldMetaData('languageVariantLangMapUid', -5), new ReplicationFieldMetaData('valueLangMap', -1), new ReplicationFieldMetaData('statementLangMapMasterCsn', 4), new ReplicationFieldMetaData('statementLangMapLocalCsn', 4), new ReplicationFieldMetaData('statementLangMapLcb', 4), new ReplicationFieldMetaData('statementLangMapLct', -5), new ReplicationFieldMetaData('statementLangMapUid', -5)]), listOf([new ReplicationFieldMetaData('xlmePk', -5), new ReplicationFieldMetaData('xlmeVersionId', -5), new ReplicationFieldMetaData('xlmeDestination', -5), new ReplicationFieldMetaData('xlmePending', 16)]), null, null, null, 1000)), to(164, new ReplicationEntityMetaData(164, 100, 'School', 'SchoolReplicate', 'School_ReceiveView', 'schoolUid', 'schoolLct', 'schoolPk', 'schoolDestination', 'schoolVersionId', 'schoolPending', listOf([new ReplicationFieldMetaData('schoolUid', -5), new ReplicationFieldMetaData('schoolName', -1), new ReplicationFieldMetaData('schoolDesc', -1), new ReplicationFieldMetaData('schoolAddress', -1), new ReplicationFieldMetaData('schoolActive', 16), new ReplicationFieldMetaData('schoolPhoneNumber', -1), new ReplicationFieldMetaData('schoolGender', 4), new ReplicationFieldMetaData('schoolHolidayCalendarUid', -5), new ReplicationFieldMetaData('schoolFeatures', -5), new ReplicationFieldMetaData('schoolLocationLong', 8), new ReplicationFieldMetaData('schoolLocationLatt', 8), new ReplicationFieldMetaData('schoolEmailAddress', -1), new ReplicationFieldMetaData('schoolTeachersPersonGroupUid', -5), new ReplicationFieldMetaData('schoolStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('schoolPendingStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('schoolCode', -1), new ReplicationFieldMetaData('schoolMasterChangeSeqNum', -5), new ReplicationFieldMetaData('schoolLocalChangeSeqNum', -5), new ReplicationFieldMetaData('schoolLastChangedBy', 4), new ReplicationFieldMetaData('schoolLct', -5), new ReplicationFieldMetaData('schoolTimeZone', -1)]), listOf([new ReplicationFieldMetaData('schoolPk', -5), new ReplicationFieldMetaData('schoolVersionId', -5), new ReplicationFieldMetaData('schoolDestination', -5), new ReplicationFieldMetaData('schoolPending', 16)]), null, null, null, 1000)), to(200, new ReplicationEntityMetaData(200, 1, 'SchoolMember', 'SchoolMemberReplicate', 'SchoolMember_ReceiveView', 'schoolMemberUid', 'schoolMemberLct', 'smPk', 'smDestination', 'smVersionId', 'smPending', listOf([new ReplicationFieldMetaData('schoolMemberUid', -5), new ReplicationFieldMetaData('schoolMemberPersonUid', -5), new ReplicationFieldMetaData('schoolMemberSchoolUid', -5), new ReplicationFieldMetaData('schoolMemberJoinDate', -5), new ReplicationFieldMetaData('schoolMemberLeftDate', -5), new ReplicationFieldMetaData('schoolMemberRole', 4), new ReplicationFieldMetaData('schoolMemberActive', 16), new ReplicationFieldMetaData('schoolMemberLocalChangeSeqNum', -5), new ReplicationFieldMetaData('schoolMemberMasterChangeSeqNum', -5), new ReplicationFieldMetaData('schoolMemberLastChangedBy', 4), new ReplicationFieldMetaData('schoolMemberLct', -5)]), listOf([new ReplicationFieldMetaData('smPk', -5), new ReplicationFieldMetaData('smVersionId', -5), new ReplicationFieldMetaData('smDestination', -5), new ReplicationFieldMetaData('smPending', 16)]), null, null, null, 1000)), to(208, new ReplicationEntityMetaData(208, 100, 'Comments', 'CommentsReplicate', 'Comments_ReceiveView', 'commentsUid', 'commentsLct', 'commentsPk', 'commentsDestination', 'commentsVersionId', 'commentsPending', listOf([new ReplicationFieldMetaData('commentsUid', -5), new ReplicationFieldMetaData('commentsText', -1), new ReplicationFieldMetaData('commentsEntityType', 4), new ReplicationFieldMetaData('commentsEntityUid', -5), new ReplicationFieldMetaData('commentsPublic', 16), new ReplicationFieldMetaData('commentsStatus', 4), new ReplicationFieldMetaData('commentsPersonUid', -5), new ReplicationFieldMetaData('commentsToPersonUid', -5), new ReplicationFieldMetaData('commentSubmitterUid', -5), new ReplicationFieldMetaData('commentsFlagged', 16), new ReplicationFieldMetaData('commentsInActive', 16), new ReplicationFieldMetaData('commentsDateTimeAdded', -5), new ReplicationFieldMetaData('commentsDateTimeUpdated', -5), new ReplicationFieldMetaData('commentsMCSN', -5), new ReplicationFieldMetaData('commentsLCSN', -5), new ReplicationFieldMetaData('commentsLCB', 4), new ReplicationFieldMetaData('commentsLct', -5)]), listOf([new ReplicationFieldMetaData('commentsPk', -5), new ReplicationFieldMetaData('commentsVersionId', -5), new ReplicationFieldMetaData('commentsDestination', -5), new ReplicationFieldMetaData('commentsPending', 16)]), null, null, null, 1000)), to(101, new ReplicationEntityMetaData(101, 100, 'Report', 'ReportReplicate', 'Report_ReceiveView', 'reportUid', 'reportLct', 'reportPk', 'reportDestination', 'reportVersionId', 'reportPending', listOf([new ReplicationFieldMetaData('reportUid', -5), new ReplicationFieldMetaData('reportOwnerUid', -5), new ReplicationFieldMetaData('xAxis', 4), new ReplicationFieldMetaData('reportDateRangeSelection', 4), new ReplicationFieldMetaData('fromDate', -5), new ReplicationFieldMetaData('fromRelTo', 4), new ReplicationFieldMetaData('fromRelOffSet', 4), new ReplicationFieldMetaData('fromRelUnit', 4), new ReplicationFieldMetaData('toDate', -5), new ReplicationFieldMetaData('toRelTo', 4), new ReplicationFieldMetaData('toRelOffSet', 4), new ReplicationFieldMetaData('toRelUnit', 4), new ReplicationFieldMetaData('reportTitle', -1), new ReplicationFieldMetaData('reportDescription', -1), new ReplicationFieldMetaData('reportSeries', -1), new ReplicationFieldMetaData('reportInactive', 16), new ReplicationFieldMetaData('isTemplate', 16), new ReplicationFieldMetaData('priority', 4), new ReplicationFieldMetaData('reportTitleId', 4), new ReplicationFieldMetaData('reportDescId', 4), new ReplicationFieldMetaData('reportMasterChangeSeqNum', -5), new ReplicationFieldMetaData('reportLocalChangeSeqNum', -5), new ReplicationFieldMetaData('reportLastChangedBy', 4), new ReplicationFieldMetaData('reportLct', -5)]), listOf([new ReplicationFieldMetaData('reportPk', -5), new ReplicationFieldMetaData('reportVersionId', -5), new ReplicationFieldMetaData('reportDestination', -5), new ReplicationFieldMetaData('reportPending', 16)]), null, null, null, 1000)), to(189, new ReplicationEntityMetaData(189, 100, 'Site', 'SiteReplicate', 'Site_ReceiveView', 'siteUid', 'siteLct', 'sitePk', 'siteDestination', 'siteVersionId', 'sitePending', listOf([new ReplicationFieldMetaData('siteUid', -5), new ReplicationFieldMetaData('sitePcsn', -5), new ReplicationFieldMetaData('siteLcsn', -5), new ReplicationFieldMetaData('siteLcb', 4), new ReplicationFieldMetaData('siteLct', -5), new ReplicationFieldMetaData('siteName', -1), new ReplicationFieldMetaData('guestLogin', 16), new ReplicationFieldMetaData('registrationAllowed', 16), new ReplicationFieldMetaData('authSalt', -1)]), listOf([new ReplicationFieldMetaData('sitePk', -5), new ReplicationFieldMetaData('siteVersionId', -5), new ReplicationFieldMetaData('siteDestination', -5), new ReplicationFieldMetaData('sitePending', 16)]), null, null, null, 1000)), to(301, new ReplicationEntityMetaData(301, 100, 'LearnerGroup', 'LearnerGroupReplicate', 'LearnerGroup_ReceiveView', 'learnerGroupUid', 'learnerGroupLct', 'lgPk', 'lgDestination', 'lgVersionId', 'lgPending', listOf([new ReplicationFieldMetaData('learnerGroupUid', -5), new ReplicationFieldMetaData('learnerGroupName', -1), new ReplicationFieldMetaData('learnerGroupDescription', -1), new ReplicationFieldMetaData('learnerGroupActive', 16), new ReplicationFieldMetaData('learnerGroupMCSN', -5), new ReplicationFieldMetaData('learnerGroupCSN', -5), new ReplicationFieldMetaData('learnerGroupLCB', 4), new ReplicationFieldMetaData('learnerGroupLct', -5)]), listOf([new ReplicationFieldMetaData('lgPk', -5), new ReplicationFieldMetaData('lgVersionId', -5), new ReplicationFieldMetaData('lgDestination', -5), new ReplicationFieldMetaData('lgPending', 16)]), null, null, null, 1000)), to(300, new ReplicationEntityMetaData(300, 100, 'LearnerGroupMember', 'LearnerGroupMemberReplicate', 'LearnerGroupMember_ReceiveView', 'learnerGroupMemberUid', 'learnerGroupMemberLct', 'lgmPk', 'lgmDestination', 'lgmVersionId', 'lgmPending', listOf([new ReplicationFieldMetaData('learnerGroupMemberUid', -5), new ReplicationFieldMetaData('learnerGroupMemberPersonUid', -5), new ReplicationFieldMetaData('learnerGroupMemberLgUid', -5), new ReplicationFieldMetaData('learnerGroupMemberRole', 4), new ReplicationFieldMetaData('learnerGroupMemberActive', 16), new ReplicationFieldMetaData('learnerGroupMemberMCSN', -5), new ReplicationFieldMetaData('learnerGroupMemberCSN', -5), new ReplicationFieldMetaData('learnerGroupMemberLCB', 4), new ReplicationFieldMetaData('learnerGroupMemberLct', -5)]), listOf([new ReplicationFieldMetaData('lgmPk', -5), new ReplicationFieldMetaData('lgmVersionId', -5), new ReplicationFieldMetaData('lgmDestination', -5), new ReplicationFieldMetaData('lgmPending', 16)]), null, null, null, 1000)), to(302, new ReplicationEntityMetaData(302, 100, 'GroupLearningSession', 'GroupLearningSessionReplicate', 'GroupLearningSession_ReceiveView', 'groupLearningSessionUid', 'groupLearningSessionLct', 'glsPk', 'glsDestination', 'glsVersionId', 'glsPending', listOf([new ReplicationFieldMetaData('groupLearningSessionUid', -5), new ReplicationFieldMetaData('groupLearningSessionContentUid', -5), new ReplicationFieldMetaData('groupLearningSessionLearnerGroupUid', -5), new ReplicationFieldMetaData('groupLearningSessionInactive', 16), new ReplicationFieldMetaData('groupLearningSessionMCSN', -5), new ReplicationFieldMetaData('groupLearningSessionCSN', -5), new ReplicationFieldMetaData('groupLearningSessionLCB', 4), new ReplicationFieldMetaData('groupLearningSessionLct', -5)]), listOf([new ReplicationFieldMetaData('glsPk', -5), new ReplicationFieldMetaData('glsVersionId', -5), new ReplicationFieldMetaData('glsDestination', -5), new ReplicationFieldMetaData('glsPending', 16)]), null, null, null, 1000)), to(272, new ReplicationEntityMetaData(272, 100, 'SiteTerms', 'SiteTermsReplicate', 'SiteTerms_ReceiveView', 'sTermsUid', 'sTermsLct', 'stPk', 'stDestination', 'stVersionId', 'stPending', listOf([new ReplicationFieldMetaData('sTermsUid', -5), new ReplicationFieldMetaData('termsHtml', -1), new ReplicationFieldMetaData('sTermsLang', -1), new ReplicationFieldMetaData('sTermsLangUid', -5), new ReplicationFieldMetaData('sTermsActive', 16), new ReplicationFieldMetaData('sTermsLastChangedBy', 4), new ReplicationFieldMetaData('sTermsPrimaryCsn', -5), new ReplicationFieldMetaData('sTermsLocalCsn', -5), new ReplicationFieldMetaData('sTermsLct', -5)]), listOf([new ReplicationFieldMetaData('stPk', -5), new ReplicationFieldMetaData('stVersionId', -5), new ReplicationFieldMetaData('stDestination', -5), new ReplicationFieldMetaData('stPending', 16)]), null, null, null, 1000)), to(134, new ReplicationEntityMetaData(134, 100, 'ClazzContentJoin', 'ClazzContentJoinReplicate', 'ClazzContentJoin_ReceiveView', 'ccjUid', 'ccjLct', 'ccjPk', 'ccjDestination', 'ccjVersionId', 'ccjPending', listOf([new ReplicationFieldMetaData('ccjUid', -5), new ReplicationFieldMetaData('ccjContentEntryUid', -5), new ReplicationFieldMetaData('ccjClazzUid', -5), new ReplicationFieldMetaData('ccjActive', 16), new ReplicationFieldMetaData('ccjLocalChangeSeqNum', -5), new ReplicationFieldMetaData('ccjMasterChangeSeqNum', -5), new ReplicationFieldMetaData('ccjLastChangedBy', 4), new ReplicationFieldMetaData('ccjLct', -5)]), listOf([new ReplicationFieldMetaData('ccjPk', -5), new ReplicationFieldMetaData('ccjVersionId', -5), new ReplicationFieldMetaData('ccjDestination', -5), new ReplicationFieldMetaData('ccjPending', 16)]), null, null, null, 1000)), to(512, new ReplicationEntityMetaData(512, 100, 'PersonParentJoin', 'PersonParentJoinReplicate', 'PersonParentJoin_ReceiveView', 'ppjUid', 'ppjLct', 'ppjPk', 'ppjDestination', 'ppjVersionId', 'ppjPending', listOf([new ReplicationFieldMetaData('ppjUid', -5), new ReplicationFieldMetaData('ppjPcsn', -5), new ReplicationFieldMetaData('ppjLcsn', -5), new ReplicationFieldMetaData('ppjLcb', 4), new ReplicationFieldMetaData('ppjLct', -5), new ReplicationFieldMetaData('ppjParentPersonUid', -5), new ReplicationFieldMetaData('ppjMinorPersonUid', -5), new ReplicationFieldMetaData('ppjRelationship', 4), new ReplicationFieldMetaData('ppjEmail', -1), new ReplicationFieldMetaData('ppjPhone', -1), new ReplicationFieldMetaData('ppjInactive', 16), new ReplicationFieldMetaData('ppjStatus', 4), new ReplicationFieldMetaData('ppjApprovalTiemstamp', -5), new ReplicationFieldMetaData('ppjApprovalIpAddr', -1)]), listOf([new ReplicationFieldMetaData('ppjPk', -5), new ReplicationFieldMetaData('ppjVersionId', -5), new ReplicationFieldMetaData('ppjDestination', -5), new ReplicationFieldMetaData('ppjPending', 16)]), null, null, null, 1000)), to(48, new ReplicationEntityMetaData(48, 0, 'ScopedGrant', 'ScopedGrantReplicate', 'ScopedGrant_ReceiveView', 'sgUid', 'sgLct', 'sgPk', 'sgDestination', 'sgVersionId', 'sgPending', listOf([new ReplicationFieldMetaData('sgUid', -5), new ReplicationFieldMetaData('sgPcsn', -5), new ReplicationFieldMetaData('sgLcsn', -5), new ReplicationFieldMetaData('sgLcb', 4), new ReplicationFieldMetaData('sgLct', -5), new ReplicationFieldMetaData('sgTableId', 4), new ReplicationFieldMetaData('sgEntityUid', -5), new ReplicationFieldMetaData('sgPermissions', -5), new ReplicationFieldMetaData('sgGroupUid', -5), new ReplicationFieldMetaData('sgIndex', 4), new ReplicationFieldMetaData('sgFlags', 4)]), listOf([new ReplicationFieldMetaData('sgPk', -5), new ReplicationFieldMetaData('sgVersionId', -5), new ReplicationFieldMetaData('sgDestination', -5), new ReplicationFieldMetaData('sgPending', 16)]), null, null, null, 1000)), to(419, new ReplicationEntityMetaData(419, 100, 'ErrorReport', 'ErrorReportReplicate', 'ErrorReport_ReceiveView', 'errUid', 'errLct', 'erPk', 'erDestination', 'erVersionId', 'erPending', listOf([new ReplicationFieldMetaData('errUid', -5), new ReplicationFieldMetaData('errPcsn', -5), new ReplicationFieldMetaData('errLcsn', -5), new ReplicationFieldMetaData('errLcb', 4), new ReplicationFieldMetaData('errLct', -5), new ReplicationFieldMetaData('severity', 4), new ReplicationFieldMetaData('timestamp', -5), new ReplicationFieldMetaData('presenterUri', -1), new ReplicationFieldMetaData('appVersion', -1), new ReplicationFieldMetaData('versionCode', 4), new ReplicationFieldMetaData('errorCode', 4), new ReplicationFieldMetaData('operatingSys', -1), new ReplicationFieldMetaData('osVersion', -1), new ReplicationFieldMetaData('stackTrace', -1), new ReplicationFieldMetaData('message', -1)]), listOf([new ReplicationFieldMetaData('erPk', -5), new ReplicationFieldMetaData('erVersionId', -5), new ReplicationFieldMetaData('erDestination', -5), new ReplicationFieldMetaData('erPending', 16)]), null, null, null, 1000)), to(520, new ReplicationEntityMetaData(520, 100, 'ClazzAssignment', 'ClazzAssignmentReplicate', 'ClazzAssignment_ReceiveView', 'caUid', 'caLct', 'caPk', 'caDestination', 'caVersionId', 'caPending', listOf([new ReplicationFieldMetaData('caUid', -5), new ReplicationFieldMetaData('caTitle', -1), new ReplicationFieldMetaData('caDescription', -1), new ReplicationFieldMetaData('caGroupUid', -5), new ReplicationFieldMetaData('caActive', 16), new ReplicationFieldMetaData('caClassCommentEnabled', 16), new ReplicationFieldMetaData('caPrivateCommentsEnabled', 16), new ReplicationFieldMetaData('caCompletionCriteria', 4), new ReplicationFieldMetaData('caRequireFileSubmission', 16), new ReplicationFieldMetaData('caFileType', 4), new ReplicationFieldMetaData('caSizeLimit', 4), new ReplicationFieldMetaData('caNumberOfFiles', 4), new ReplicationFieldMetaData('caSubmissionPolicy', 4), new ReplicationFieldMetaData('caMarkingType', 4), new ReplicationFieldMetaData('caRequireTextSubmission', 16), new ReplicationFieldMetaData('caTextLimitType', 4), new ReplicationFieldMetaData('caTextLimit', 4), new ReplicationFieldMetaData('caXObjectUid', -5), new ReplicationFieldMetaData('caClazzUid', -5), new ReplicationFieldMetaData('caLocalChangeSeqNum', -5), new ReplicationFieldMetaData('caMasterChangeSeqNum', -5), new ReplicationFieldMetaData('caLastChangedBy', 4), new ReplicationFieldMetaData('caLct', -5)]), listOf([new ReplicationFieldMetaData('caPk', -5), new ReplicationFieldMetaData('caVersionId', -5), new ReplicationFieldMetaData('caDestination', -5), new ReplicationFieldMetaData('caPending', 16)]), null, null, null, 1000)), to(521, new ReplicationEntityMetaData(521, 100, 'ClazzAssignmentContentJoin', 'ClazzAssignmentContentJoinReplicate', 'ClazzAssignmentContentJoin_ReceiveView', 'cacjUid', 'cacjLct', 'cacjPk', 'cacjDestination', 'cacjVersionId', 'cacjPending', listOf([new ReplicationFieldMetaData('cacjUid', -5), new ReplicationFieldMetaData('cacjContentUid', -5), new ReplicationFieldMetaData('cacjAssignmentUid', -5), new ReplicationFieldMetaData('cacjActive', 16), new ReplicationFieldMetaData('cacjWeight', 4), new ReplicationFieldMetaData('cacjMCSN', -5), new ReplicationFieldMetaData('cacjLCSN', -5), new ReplicationFieldMetaData('cacjLCB', 4), new ReplicationFieldMetaData('cacjLct', -5)]), listOf([new ReplicationFieldMetaData('cacjPk', -5), new ReplicationFieldMetaData('cacjVersionId', -5), new ReplicationFieldMetaData('cacjDestination', -5), new ReplicationFieldMetaData('cacjPending', 16)]), null, null, null, 1000)), to(522, new ReplicationEntityMetaData(522, 100, 'CourseAssignmentSubmission', 'CourseAssignmentSubmissionReplicate', 'CourseAssignmentSubmission_ReceiveView', 'casUid', 'casTimestamp', 'casPk', 'casDestination', 'casVersionId', 'casPending', listOf([new ReplicationFieldMetaData('casUid', -5), new ReplicationFieldMetaData('casAssignmentUid', -5), new ReplicationFieldMetaData('casSubmitterUid', -5), new ReplicationFieldMetaData('casSubmitterPersonUid', -5), new ReplicationFieldMetaData('casText', -1), new ReplicationFieldMetaData('casType', 4), new ReplicationFieldMetaData('casTimestamp', -5)]), listOf([new ReplicationFieldMetaData('casPk', -5), new ReplicationFieldMetaData('casVersionId', -5), new ReplicationFieldMetaData('casDestination', -5), new ReplicationFieldMetaData('casPending', 16)]), null, null, null, 1000)), to(90, new ReplicationEntityMetaData(90, 100, 'CourseAssignmentSubmissionAttachment', 'CourseAssignmentSubmissionAttachmentReplicate', 'CourseAssignmentSubmissionAttachment_ReceiveView', 'casaUid', 'casaTimestamp', 'casaPk', 'casaDestination', 'casaVersionId', 'casaPending', listOf([new ReplicationFieldMetaData('casaUid', -5), new ReplicationFieldMetaData('casaSubmissionUid', -5), new ReplicationFieldMetaData('casaMimeType', -1), new ReplicationFieldMetaData('casaFileName', -1), new ReplicationFieldMetaData('casaUri', -1), new ReplicationFieldMetaData('casaMd5', -1), new ReplicationFieldMetaData('casaSize', 4), new ReplicationFieldMetaData('casaTimestamp', -5)]), listOf([new ReplicationFieldMetaData('casaPk', -5), new ReplicationFieldMetaData('casaVersionId', -5), new ReplicationFieldMetaData('casaDestination', -5), new ReplicationFieldMetaData('casaPending', 16)]), 'casaUri', 'casaMd5', 'casaSize', 1000)), to(523, new ReplicationEntityMetaData(523, 100, 'CourseAssignmentMark', 'CourseAssignmentMarkReplicate', 'CourseAssignmentMark_ReceiveView', 'camUid', 'camLct', 'camPk', 'camDestination', 'camVersionId', 'camPending', listOf([new ReplicationFieldMetaData('camUid', -5), new ReplicationFieldMetaData('camAssignmentUid', -5), new ReplicationFieldMetaData('camSubmitterUid', -5), new ReplicationFieldMetaData('camMark', 6), new ReplicationFieldMetaData('camPenalty', 4), new ReplicationFieldMetaData('camLct', -5)]), listOf([new ReplicationFieldMetaData('camPk', -5), new ReplicationFieldMetaData('camVersionId', -5), new ReplicationFieldMetaData('camDestination', -5), new ReplicationFieldMetaData('camPending', 16)]), null, null, null, 1000)), to(678, new ReplicationEntityMetaData(678, 100, 'PersonAuth2', 'PersonAuth2Replicate', 'PersonAuth2_ReceiveView', 'pauthUid', 'pauthLct', 'paPk', 'paDestination', 'paVersionId', 'paPending', listOf([new ReplicationFieldMetaData('pauthUid', -5), new ReplicationFieldMetaData('pauthMechanism', -1), new ReplicationFieldMetaData('pauthAuth', -1), new ReplicationFieldMetaData('pauthLcsn', -5), new ReplicationFieldMetaData('pauthPcsn', -5), new ReplicationFieldMetaData('pauthLcb', -5), new ReplicationFieldMetaData('pauthLct', -5)]), listOf([new ReplicationFieldMetaData('paPk', -5), new ReplicationFieldMetaData('paVersionId', -5), new ReplicationFieldMetaData('paDestination', -5), new ReplicationFieldMetaData('paPending', 16)]), null, null, null, 1000)), to(679, new ReplicationEntityMetaData(679, 0, 'UserSession', 'UserSessionReplicate', 'UserSession_ReceiveView', 'usUid', 'usLct', 'usPk', 'usDestination', 'usVersionId', 'usPending', listOf([new ReplicationFieldMetaData('usUid', -5), new ReplicationFieldMetaData('usPcsn', -5), new ReplicationFieldMetaData('usLcsn', -5), new ReplicationFieldMetaData('usLcb', 4), new ReplicationFieldMetaData('usLct', -5), new ReplicationFieldMetaData('usPersonUid', -5), new ReplicationFieldMetaData('usClientNodeId', -5), new ReplicationFieldMetaData('usStartTime', -5), new ReplicationFieldMetaData('usEndTime', -5), new ReplicationFieldMetaData('usStatus', 4), new ReplicationFieldMetaData('usReason', 4), new ReplicationFieldMetaData('usAuth', -1), new ReplicationFieldMetaData('usSessionType', 4)]), listOf([new ReplicationFieldMetaData('usPk', -5), new ReplicationFieldMetaData('usVersionId', -5), new ReplicationFieldMetaData('usDestination', -5), new ReplicationFieldMetaData('usPending', 16)]), null, null, null, 1000)), to(124, new ReplicationEntityMetaData(124, 100, 'CourseBlock', 'CourseBlockReplicate', 'CourseBlock_ReceiveView', 'cbUid', 'cbLct', 'cbPk', 'cbDestination', 'cbVersionId', 'cbPending', listOf([new ReplicationFieldMetaData('cbUid', -5), new ReplicationFieldMetaData('cbType', 4), new ReplicationFieldMetaData('cbIndentLevel', 4), new ReplicationFieldMetaData('cbModuleParentBlockUid', -5), new ReplicationFieldMetaData('cbTitle', -1), new ReplicationFieldMetaData('cbDescription', -1), new ReplicationFieldMetaData('cbCompletionCriteria', 4), new ReplicationFieldMetaData('cbHideUntilDate', -5), new ReplicationFieldMetaData('cbDeadlineDate', -5), new ReplicationFieldMetaData('cbLateSubmissionPenalty', 4), new ReplicationFieldMetaData('cbGracePeriodDate', -5), new ReplicationFieldMetaData('cbMaxPoints', 4), new ReplicationFieldMetaData('cbMinPoints', 4), new ReplicationFieldMetaData('cbIndex', 4), new ReplicationFieldMetaData('cbClazzUid', -5), new ReplicationFieldMetaData('cbActive', 16), new ReplicationFieldMetaData('cbHidden', 16), new ReplicationFieldMetaData('cbEntityUid', -5), new ReplicationFieldMetaData('cbLct', -5)]), listOf([new ReplicationFieldMetaData('cbPk', -5), new ReplicationFieldMetaData('cbVersionId', -5), new ReplicationFieldMetaData('cbDestination', -5), new ReplicationFieldMetaData('cbPending', 16)]), null, null, null, 1000)), to(450, new ReplicationEntityMetaData(450, 100, 'CourseTerminology', 'CourseTerminologyReplicate', 'CourseTerminology_ReceiveView', 'ctUid', 'ctLct', 'ctPk', 'ctDestination', 'ctVersionId', 'ctPending', listOf([new ReplicationFieldMetaData('ctUid', -5), new ReplicationFieldMetaData('ctTitle', -1), new ReplicationFieldMetaData('ctTerminology', -1), new ReplicationFieldMetaData('ctLct', -5)]), listOf([new ReplicationFieldMetaData('ctPk', -5), new ReplicationFieldMetaData('ctVersionId', -5), new ReplicationFieldMetaData('ctDestination', -5), new ReplicationFieldMetaData('ctPending', 16)]), null, null, null, 1000)), to(242, new ReplicationEntityMetaData(242, 100, 'CourseGroupSet', 'CourseGroupSetReplicate', 'CourseGroupSet_ReceiveView', 'cgsUid', 'cgsLct', 'cgsPk', 'cgsDestination', 'cgsVersionId', 'cgsPending', listOf([new ReplicationFieldMetaData('cgsUid', -5), new ReplicationFieldMetaData('cgsName', -1), new ReplicationFieldMetaData('cgsTotalGroups', 4), new ReplicationFieldMetaData('cgsActive', 16), new ReplicationFieldMetaData('cgsClazzUid', -5), new ReplicationFieldMetaData('cgsLct', -5)]), listOf([new ReplicationFieldMetaData('cgsPk', -5), new ReplicationFieldMetaData('cgsVersionId', -5), new ReplicationFieldMetaData('cgsDestination', -5), new ReplicationFieldMetaData('cgsPending', 16)]), null, null, null, 1000)), to(243, new ReplicationEntityMetaData(243, 100, 'CourseGroupMember', 'CourseGroupMemberReplicate', 'CourseGroupMember_ReceiveView', 'cgmUid', 'cgmLct', 'cgmPk', 'cgmDestination', 'cgmVersionId', 'cgmPending', listOf([new ReplicationFieldMetaData('cgmUid', -5), new ReplicationFieldMetaData('cgmSetUid', -5), new ReplicationFieldMetaData('cgmGroupNumber', 4), new ReplicationFieldMetaData('cgmPersonUid', -5), new ReplicationFieldMetaData('cgmLct', -5)]), listOf([new ReplicationFieldMetaData('cgmPk', -5), new ReplicationFieldMetaData('cgmVersionId', -5), new ReplicationFieldMetaData('cgmDestination', -5), new ReplicationFieldMetaData('cgmPending', 16)]), null, null, null, 1000)), to(125, new ReplicationEntityMetaData(125, 100, 'CoursePicture', 'CoursePictureReplicate', 'CoursePicture_ReceiveView', 'coursePictureUid', 'coursePictureLct', 'cpPk', 'cpDestination', 'cpVersionId', 'cpPending', listOf([new ReplicationFieldMetaData('coursePictureUid', -5), new ReplicationFieldMetaData('coursePictureClazzUid', -5), new ReplicationFieldMetaData('coursePictureMasterCsn', -5), new ReplicationFieldMetaData('coursePictureLocalCsn', -5), new ReplicationFieldMetaData('coursePictureLastChangedBy', 4), new ReplicationFieldMetaData('coursePictureLct', -5), new ReplicationFieldMetaData('coursePictureUri', -1), new ReplicationFieldMetaData('coursePictureMd5', -1), new ReplicationFieldMetaData('coursePictureFileSize', 4), new ReplicationFieldMetaData('coursePictureTimestamp', -5), new ReplicationFieldMetaData('coursePictureMimeType', -1), new ReplicationFieldMetaData('coursePictureActive', 16)]), listOf([new ReplicationFieldMetaData('cpPk', -5), new ReplicationFieldMetaData('cpVersionId', -5), new ReplicationFieldMetaData('cpDestination', -5), new ReplicationFieldMetaData('cpPending', 16)]), 'coursePictureUri', 'coursePictureMd5', 'coursePictureFileSize', 1000)), to(138, new ReplicationEntityMetaData(138, 100, 'ContentEntryPicture', 'ContentEntryPictureReplicate', 'ContentEntryPicture_ReceiveView', 'cepUid', 'cepTimestamp', 'cepPk', 'cepDestination', 'cepVersionId', 'cepPending', listOf([new ReplicationFieldMetaData('cepUid', -5), new ReplicationFieldMetaData('cepContentEntryUid', -5), new ReplicationFieldMetaData('cepUri', -1), new ReplicationFieldMetaData('cepMd5', -1), new ReplicationFieldMetaData('cepFileSize', 4), new ReplicationFieldMetaData('cepTimestamp', -5), new ReplicationFieldMetaData('cepMimeType', -1), new ReplicationFieldMetaData('cepActive', 16)]), listOf([new ReplicationFieldMetaData('cepPk', -5), new ReplicationFieldMetaData('cepVersionId', -5), new ReplicationFieldMetaData('cepDestination', -5), new ReplicationFieldMetaData('cepPending', 16)]), 'cepUri', 'cepMd5', 'cepFileSize', 1000)), to(127, new ReplicationEntityMetaData(127, 0, 'Chat', 'ChatReplicate', 'Chat_ReceiveView', 'chatUid', 'chatLct', 'chatPk', 'chatDestination', 'chatVersionId', 'chatPending', listOf([new ReplicationFieldMetaData('chatUid', -5), new ReplicationFieldMetaData('chatStartDate', -5), new ReplicationFieldMetaData('chatTitle', -1), new ReplicationFieldMetaData('chatGroup', 16), new ReplicationFieldMetaData('chatLct', -5)]), listOf([new ReplicationFieldMetaData('chatPk', -5), new ReplicationFieldMetaData('chatVersionId', -5), new ReplicationFieldMetaData('chatDestination', -5), new ReplicationFieldMetaData('chatPending', 16)]), null, null, null, 1000)), to(128, new ReplicationEntityMetaData(128, 0, 'ChatMember', 'ChatMemberReplicate', 'ChatMember_ReceiveView', 'chatMemberUid', 'chatMemberLct', 'chatMemberPk', 'chatMemberDestination', 'chatMemberVersionId', 'chatMemberPending', listOf([new ReplicationFieldMetaData('chatMemberUid', -5), new ReplicationFieldMetaData('chatMemberChatUid', -5), new ReplicationFieldMetaData('chatMemberPersonUid', -5), new ReplicationFieldMetaData('chatMemberJoinedDate', -5), new ReplicationFieldMetaData('chatMemberLeftDate', -5), new ReplicationFieldMetaData('chatMemberLct', -5)]), listOf([new ReplicationFieldMetaData('chatMemberPk', -5), new ReplicationFieldMetaData('chatMemberVersionId', -5), new ReplicationFieldMetaData('chatMemberDestination', -5), new ReplicationFieldMetaData('chatMemberPending', 16)]), null, null, null, 1000)), to(126, new ReplicationEntityMetaData(126, 100, 'Message', 'MessageReplicate', 'Message_ReceiveView', 'messageUid', 'messageLct', 'messagePk', 'messageDestination', 'messageVersionId', 'messagePending', listOf([new ReplicationFieldMetaData('messageUid', -5), new ReplicationFieldMetaData('messageSenderPersonUid', -5), new ReplicationFieldMetaData('messageTableId', 4), new ReplicationFieldMetaData('messageEntityUid', -5), new ReplicationFieldMetaData('messageText', -1), new ReplicationFieldMetaData('messageTimestamp', -5), new ReplicationFieldMetaData('messageClazzUid', -5), new ReplicationFieldMetaData('messageLct', -5)]), listOf([new ReplicationFieldMetaData('messagePk', -5), new ReplicationFieldMetaData('messageVersionId', -5), new ReplicationFieldMetaData('messageDestination', -5), new ReplicationFieldMetaData('messagePending', 16)]), null, null, null, 1000)), to(129, new ReplicationEntityMetaData(129, 100, 'MessageRead', 'MessageReadReplicate', 'MessageRead_ReceiveView', 'messageReadUid', 'messageReadLct', 'messageReadPk', 'messageReadDestination', 'messageReadVersionId', 'messageReadPending', listOf([new ReplicationFieldMetaData('messageReadUid', -5), new ReplicationFieldMetaData('messageReadPersonUid', -5), new ReplicationFieldMetaData('messageReadMessageUid', -5), new ReplicationFieldMetaData('messageReadEntityUid', -5), new ReplicationFieldMetaData('messageReadLct', -5)]), listOf([new ReplicationFieldMetaData('messageReadPk', -5), new ReplicationFieldMetaData('messageReadVersionId', -5), new ReplicationFieldMetaData('messageReadDestination', -5), new ReplicationFieldMetaData('messageReadPending', 16)]), null, null, null, 1000)), to(130, new ReplicationEntityMetaData(130, 100, 'CourseDiscussion', 'CourseDiscussionReplicate', 'CourseDiscussion_ReceiveView', 'courseDiscussionUid', 'courseDiscussionLct', 'courseDiscussionPk', 'courseDiscussionDestination', 'courseDiscussionVersionId', 'courseDiscussionPending', listOf([new ReplicationFieldMetaData('courseDiscussionUid', -5), new ReplicationFieldMetaData('courseDiscussionTitle', -1), new ReplicationFieldMetaData('courseDiscussionDesc', -1), new ReplicationFieldMetaData('courseDiscussionClazzUid', -5), new ReplicationFieldMetaData('courseDiscussionActive', 16), new ReplicationFieldMetaData('courseDiscussionLct', -5)]), listOf([new ReplicationFieldMetaData('courseDiscussionPk', -5), new ReplicationFieldMetaData('courseDiscussionVersionId', -5), new ReplicationFieldMetaData('courseDiscussionDestination', -5), new ReplicationFieldMetaData('courseDiscussionPending', 16)]), null, null, null, 1000)), to(131, new ReplicationEntityMetaData(131, 100, 'DiscussionTopic', 'DiscussionTopicReplicate', 'DiscussionTopic_ReceiveView', 'discussionTopicUid', 'discussionTopicLct', 'discussionTopicPk', 'discussionTopicDestination', 'discussionTopicVersionId', 'discussionTopicPending', listOf([new ReplicationFieldMetaData('discussionTopicUid', -5), new ReplicationFieldMetaData('discussionTopicTitle', -1), new ReplicationFieldMetaData('discussionTopicDesc', -1), new ReplicationFieldMetaData('discussionTopicStartDate', -5), new ReplicationFieldMetaData('discussionTopicCourseDiscussionUid', -5), new ReplicationFieldMetaData('discussionTopicVisible', 16), new ReplicationFieldMetaData('discussionTopicArchive', 16), new ReplicationFieldMetaData('discussionTopicIndex', 4), new ReplicationFieldMetaData('discussionTopicClazzUid', -5), new ReplicationFieldMetaData('discussionTopicLct', -5)]), listOf([new ReplicationFieldMetaData('discussionTopicPk', -5), new ReplicationFieldMetaData('discussionTopicVersionId', -5), new ReplicationFieldMetaData('discussionTopicDestination', -5), new ReplicationFieldMetaData('discussionTopicPending', 16)]), null, null, null, 1000)), to(132, new ReplicationEntityMetaData(132, 100, 'DiscussionPost', 'DiscussionPostReplicate', 'DiscussionPost_ReceiveView', 'discussionPostUid', 'discussionPostLct', 'discussionPostPk', 'discussionPostDestination', 'discussionPostVersionId', 'discussionPostPending', listOf([new ReplicationFieldMetaData('discussionPostUid', -5), new ReplicationFieldMetaData('discussionPostTitle', -1), new ReplicationFieldMetaData('discussionPostMessage', -1), new ReplicationFieldMetaData('discussionPostStartDate', -5), new ReplicationFieldMetaData('discussionPostDiscussionTopicUid', -5), new ReplicationFieldMetaData('discussionPostVisible', 16), new ReplicationFieldMetaData('discussionPostArchive', 16), new ReplicationFieldMetaData('discussionPostStartedPersonUid', -5), new ReplicationFieldMetaData('discussionPostClazzUid', -5), new ReplicationFieldMetaData('discussionPostLct', -5)]), listOf([new ReplicationFieldMetaData('discussionPostPk', -5), new ReplicationFieldMetaData('discussionPostVersionId', -5), new ReplicationFieldMetaData('discussionPostDestination', -5), new ReplicationFieldMetaData('discussionPostPending', 16)]), null, null, null, 1000))]); } UmAppDatabase_DoorMetadata.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_DoorMetadata', interfaces: [DoorDatabaseMetadata]}; function UmAppDatabase_JdbcKt(doorJdbcSourceDatabase, dataSource, dbName, realAttachmentFilters, jdbcQueryTimeout) { UmAppDatabase.call(this); this.doorJdbcSourceDatabase_bt2m6l$_0 = doorJdbcSourceDatabase; this.dataSource_sv708p$_0 = dataSource; this.dbName_gan2df$_0 = dbName; this.realAttachmentFilters_2an2a6$_0 = realAttachmentFilters; this.jdbcQueryTimeout_8tsw54$_0 = jdbcQueryTimeout; this.realAttachmentStorageUri_9ktfae$_0 = null; this.transactionDepthCounter_bjrze7$_0 = new TransactionDepthCounter(); this.invalidationTracker_ade4a6$_0 = new DoorInvalidationTracker(this.toString()); this.realReplicationNotificationDispatcher_205h14$_0 = lazy_0(UmAppDatabase_JdbcKt$realReplicationNotificationDispatcher$lambda(this)); var tmp$; if (equals(this, get_rootDatabase(this))) { tmp$ = new DeleteZombieAttachmentsListener(this); } else { tmp$ = null; } this._deleteZombieAttachmentsListener_0 = tmp$; this.realIncomingReplicationListenerHelper_iyxd1e$_0 = new IncomingReplicationListenerHelper(); this.realNodeIdAuthCache_xrrr9l$_0 = lazy_0(UmAppDatabase_JdbcKt$realNodeIdAuthCache$lambda(this)); this.realPrimaryKeyManager_iue8ui$_0 = lazy_0(UmAppDatabase_JdbcKt$realPrimaryKeyManager$lambda(this)); this._NetworkNodeDao_3oxnq1$_0 = lazy_0(UmAppDatabase_JdbcKt$_NetworkNodeDao$lambda(this)); this._PersonDao_k7x8oe$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonDao$lambda(this)); this._ClazzDao_3jk0dr$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzDao$lambda(this)); this._CourseBlockDao_2gjouh$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseBlockDao$lambda(this)); this._CourseTerminologyDao_45h00h$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseTerminologyDao$lambda(this)); this._CourseGroupSetDao_d461hl$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseGroupSetDao$lambda(this)); this._CourseGroupMemberDao_f2mrkb$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseGroupMemberDao$lambda(this)); this._ClazzEnrolmentDao_4bba63$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzEnrolmentDao$lambda(this)); this._LeavingReasonDao_dar3v5$_0 = lazy_0(UmAppDatabase_JdbcKt$_LeavingReasonDao$lambda(this)); this._ContentEntryDao_9nbtke$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryDao$lambda(this)); this._ContentEntryContentCategoryJoinDao_2aqtq9$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryContentCategoryJoinDao$lambda(this)); this._ContentEntryParentChildJoinDao_tr06be$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryParentChildJoinDao$lambda(this)); this._ContentEntryRelatedEntryJoinDao_hyl14z$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryRelatedEntryJoinDao$lambda(this)); this._ClazzContentJoinDao_tcg5t0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzContentJoinDao$lambda(this)); this._ContentCategorySchemaDao_a6b1ap$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentCategorySchemaDao$lambda(this)); this._ContentCategoryDao_605o8e$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentCategoryDao$lambda(this)); this._LanguageDao_nmss4x$_0 = lazy_0(UmAppDatabase_JdbcKt$_LanguageDao$lambda(this)); this._LanguageVariantDao_44u5pg$_0 = lazy_0(UmAppDatabase_JdbcKt$_LanguageVariantDao$lambda(this)); this._ScrapeQueueItemDao_7pv1vr$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScrapeQueueItemDao$lambda(this)); this._PersonAuthDao_7soik6$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonAuthDao$lambda(this)); this._PersonGroupDao_jo1o5b$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonGroupDao$lambda(this)); this._PersonGroupMemberDao_swianv$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonGroupMemberDao$lambda(this)); this._EntityRoleDao_flwn1q$_0 = lazy_0(UmAppDatabase_JdbcKt$_EntityRoleDao$lambda(this)); this._PersonPictureDao_wwh6o0$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonPictureDao$lambda(this)); this._ScrapeRunDao_1dfbi$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScrapeRunDao$lambda(this)); this._ConnectivityStatusDao_kxoa8y$_0 = lazy_0(UmAppDatabase_JdbcKt$_ConnectivityStatusDao$lambda(this)); this._ContainerDao_8y171k$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerDao$lambda(this)); this._ContainerEntryDao_2k8qly$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerEntryDao$lambda(this)); this._ContainerEntryFileDao_j7lyp2$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerEntryFileDao$lambda(this)); this._ContainerETagDao_aj6yxf$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerETagDao$lambda(this)); this._VerbDao_ut1ars$_0 = lazy_0(UmAppDatabase_JdbcKt$_VerbDao$lambda(this)); this._XObjectDao_uyivji$_0 = lazy_0(UmAppDatabase_JdbcKt$_XObjectDao$lambda(this)); this._ReportDao_u3d377$_0 = lazy_0(UmAppDatabase_JdbcKt$_ReportDao$lambda(this)); this._ContainerImportJobDao_87ws0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerImportJobDao$lambda(this)); this._StatementDao_yqx14q$_0 = lazy_0(UmAppDatabase_JdbcKt$_StatementDao$lambda(this)); this._ContextXObjectStatementJoinDao_mwkbi0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContextXObjectStatementJoinDao$lambda(this)); this._StateDao_y7psns$_0 = lazy_0(UmAppDatabase_JdbcKt$_StateDao$lambda(this)); this._StateContentDao_y2yl6n$_0 = lazy_0(UmAppDatabase_JdbcKt$_StateContentDao$lambda(this)); this._AgentDao_ruleqs$_0 = lazy_0(UmAppDatabase_JdbcKt$_AgentDao$lambda(this)); this._LearnerGroupDao_b0g40p$_0 = lazy_0(UmAppDatabase_JdbcKt$_LearnerGroupDao$lambda(this)); this._LearnerGroupMemberDao_mag2e9$_0 = lazy_0(UmAppDatabase_JdbcKt$_LearnerGroupMemberDao$lambda(this)); this._GroupLearningSessionDao_m33w7i$_0 = lazy_0(UmAppDatabase_JdbcKt$_GroupLearningSessionDao$lambda(this)); this._ClazzLogAttendanceRecordDao_ap5hnj$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzLogAttendanceRecordDao$lambda(this)); this._ClazzLogDao_e1mhp7$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzLogDao$lambda(this)); this._CustomFieldDao_5e73mo$_0 = lazy_0(UmAppDatabase_JdbcKt$_CustomFieldDao$lambda(this)); this._CustomFieldValueDao_kaoow1$_0 = lazy_0(UmAppDatabase_JdbcKt$_CustomFieldValueDao$lambda(this)); this._CustomFieldValueOptionDao_kgo4ve$_0 = lazy_0(UmAppDatabase_JdbcKt$_CustomFieldValueOptionDao$lambda(this)); this._ScheduleDao_6f1hrk$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScheduleDao$lambda(this)); this._ScheduledCheckDao_xhifv0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScheduledCheckDao$lambda(this)); this._HolidayCalendarDao_uwm5jh$_0 = lazy_0(UmAppDatabase_JdbcKt$_HolidayCalendarDao$lambda(this)); this._HolidayDao_bvaw29$_0 = lazy_0(UmAppDatabase_JdbcKt$_HolidayDao$lambda(this)); this._SchoolDao_7eo53h$_0 = lazy_0(UmAppDatabase_JdbcKt$_SchoolDao$lambda(this)); this._XLangMapEntryDao_h0gfv1$_0 = lazy_0(UmAppDatabase_JdbcKt$_XLangMapEntryDao$lambda(this)); this._LocallyAvailableContainerDao_7wf02v$_0 = lazy_0(UmAppDatabase_JdbcKt$_LocallyAvailableContainerDao$lambda(this)); this._SchoolMemberDao_2tq407$_0 = lazy_0(UmAppDatabase_JdbcKt$_SchoolMemberDao$lambda(this)); this._ClazzAssignmentDao_3ggsx0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzAssignmentDao$lambda(this)); this._ClazzAssignmentContentJoinDao_u85dhz$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzAssignmentContentJoinDao$lambda(this)); this._ClazzAssignmentRollUpDao_idjn7w$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzAssignmentRollUpDao$lambda(this)); this._CourseAssignmentSubmissionDao_lzd959$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionDao$lambda(this)); this._CourseAssignmentSubmissionAttachmentDao_kk6as0$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionAttachmentDao$lambda(this)); this._CourseAssignmentMarkDao_bcqoqa$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseAssignmentMarkDao$lambda(this)); this._CommentsDao_n8pvx$_0 = lazy_0(UmAppDatabase_JdbcKt$_CommentsDao$lambda(this)); this._SyncNodeDao_gj1sd2$_0 = lazy_0(UmAppDatabase_JdbcKt$_SyncNodeDao$lambda(this)); this._SiteDao_dgj3hc$_0 = lazy_0(UmAppDatabase_JdbcKt$_SiteDao$lambda(this)); this._SiteTermsDao_z71e95$_0 = lazy_0(UmAppDatabase_JdbcKt$_SiteTermsDao$lambda(this)); this._PersonParentJoinDao_jpqxfm$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonParentJoinDao$lambda(this)); this._ScopedGrantDao_c5bgvx$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScopedGrantDao$lambda(this)); this._ErrorReportDao_fhjgp9$_0 = lazy_0(UmAppDatabase_JdbcKt$_ErrorReportDao$lambda(this)); this._PersonAuth2Dao_sbcr2k$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonAuth2Dao$lambda(this)); this._UserSessionDao_u3lyxu$_0 = lazy_0(UmAppDatabase_JdbcKt$_UserSessionDao$lambda(this)); this._ContentJobItemDao_wk14ls$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentJobItemDao$lambda(this)); this._ContentJobDao_otp6eb$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentJobDao$lambda(this)); this._CoursePictureDao_8lofba$_0 = lazy_0(UmAppDatabase_JdbcKt$_CoursePictureDao$lambda(this)); this._ContentEntryPictureDao_h75b18$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryPictureDao$lambda(this)); this._ChatDao_q2bpip$_0 = lazy_0(UmAppDatabase_JdbcKt$_ChatDao$lambda(this)); this._ChatMemberDao_msanf9$_0 = lazy_0(UmAppDatabase_JdbcKt$_ChatMemberDao$lambda(this)); this._MessageDao_jfy3z6$_0 = lazy_0(UmAppDatabase_JdbcKt$_MessageDao$lambda(this)); this._MessageReadDao_2blgx8$_0 = lazy_0(UmAppDatabase_JdbcKt$_MessageReadDao$lambda(this)); this._CourseDiscussionDao_cb20xo$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseDiscussionDao$lambda(this)); this._DiscussionTopicDao_5a2pfi$_0 = lazy_0(UmAppDatabase_JdbcKt$_DiscussionTopicDao$lambda(this)); this._DiscussionPostDao_siiczl$_0 = lazy_0(UmAppDatabase_JdbcKt$_DiscussionPostDao$lambda(this)); this.setupFromDataSource(); } Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'doorJdbcSourceDatabase', {get: function () { return this.doorJdbcSourceDatabase_bt2m6l$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'dataSource', {get: function () { return this.dataSource_sv708p$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'dbName', {get: function () { return this.dbName_gan2df$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realAttachmentFilters', {get: function () { return this.realAttachmentFilters_2an2a6$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'jdbcQueryTimeout', {get: function () { return this.jdbcQueryTimeout_8tsw54$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'dbVersion', {configurable: true, get: function () { return 106; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realAttachmentStorageUri', {configurable: true, get: function () { return this.realAttachmentStorageUri_9ktfae$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'transactionDepthCounter', {configurable: true, get: function () { return this.transactionDepthCounter_bjrze7$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'invalidationTracker', {configurable: true, get: function () { return this.invalidationTracker_ade4a6$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'isInTransaction', {configurable: true, get: function () { return false; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realReplicationNotificationDispatcher', {configurable: true, get: function () { return this.realReplicationNotificationDispatcher_205h14$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realIncomingReplicationListenerHelper', {configurable: true, get: function () { return this.realIncomingReplicationListenerHelper_iyxd1e$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realNodeIdAuthCache', {configurable: true, get: function () { return this.realNodeIdAuthCache_xrrr9l$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realPrimaryKeyManager', {configurable: true, get: function () { return this.realPrimaryKeyManager_iue8ui$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_NetworkNodeDao', {configurable: true, get: function () { return this._NetworkNodeDao_3oxnq1$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'networkNodeDao', {configurable: true, get: function () { return this._NetworkNodeDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonDao', {configurable: true, get: function () { return this._PersonDao_k7x8oe$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personDao', {configurable: true, get: function () { return this._PersonDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzDao', {configurable: true, get: function () { return this._ClazzDao_3jk0dr$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzDao', {configurable: true, get: function () { return this._ClazzDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao_2gjouh$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao_45h00h$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao_d461hl$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao_f2mrkb$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao_4bba63$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LeavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao_dar3v5$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'leavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao_9nbtke$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_2aqtq9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_tr06be$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_hyl14z$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao_tcg5t0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao_a6b1ap$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao_605o8e$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LanguageDao', {configurable: true, get: function () { return this._LanguageDao_nmss4x$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'languageDao', {configurable: true, get: function () { return this._LanguageDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LanguageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao_44u5pg$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'languageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScrapeQueueItemDao', {configurable: true, get: function () { return this._ScrapeQueueItemDao_7pv1vr$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scrapeQueueItemDao', {configurable: true, get: function () { return this._ScrapeQueueItemDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonAuthDao', {configurable: true, get: function () { return this._PersonAuthDao_7soik6$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personAuthDao', {configurable: true, get: function () { return this._PersonAuthDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonGroupDao', {configurable: true, get: function () { return this._PersonGroupDao_jo1o5b$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personGroupDao', {configurable: true, get: function () { return this._PersonGroupDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao_swianv$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_EntityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao_flwn1q$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'entityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonPictureDao', {configurable: true, get: function () { return this._PersonPictureDao_wwh6o0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personPictureDao', {configurable: true, get: function () { return this._PersonPictureDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScrapeRunDao', {configurable: true, get: function () { return this._ScrapeRunDao_1dfbi$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scrapeRunDao', {configurable: true, get: function () { return this._ScrapeRunDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ConnectivityStatusDao', {configurable: true, get: function () { return this._ConnectivityStatusDao_kxoa8y$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'connectivityStatusDao', {configurable: true, get: function () { return this._ConnectivityStatusDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerDao', {configurable: true, get: function () { return this._ContainerDao_8y171k$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerDao', {configurable: true, get: function () { return this._ContainerDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerEntryDao', {configurable: true, get: function () { return this._ContainerEntryDao_2k8qly$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerEntryDao', {configurable: true, get: function () { return this._ContainerEntryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerEntryFileDao', {configurable: true, get: function () { return this._ContainerEntryFileDao_j7lyp2$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerEntryFileDao', {configurable: true, get: function () { return this._ContainerEntryFileDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerETagDao', {configurable: true, get: function () { return this._ContainerETagDao_aj6yxf$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerETagDao', {configurable: true, get: function () { return this._ContainerETagDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_VerbDao', {configurable: true, get: function () { return this._VerbDao_ut1ars$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'verbDao', {configurable: true, get: function () { return this._VerbDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_XObjectDao', {configurable: true, get: function () { return this._XObjectDao_uyivji$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'xObjectDao', {configurable: true, get: function () { return this._XObjectDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ReportDao', {configurable: true, get: function () { return this._ReportDao_u3d377$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'reportDao', {configurable: true, get: function () { return this._ReportDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerImportJobDao', {configurable: true, get: function () { return this._ContainerImportJobDao_87ws0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerImportJobDao', {configurable: true, get: function () { return this._ContainerImportJobDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_StatementDao', {configurable: true, get: function () { return this._StatementDao_yqx14q$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'statementDao', {configurable: true, get: function () { return this._StatementDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_mwkbi0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_StateDao', {configurable: true, get: function () { return this._StateDao_y7psns$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'stateDao', {configurable: true, get: function () { return this._StateDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_StateContentDao', {configurable: true, get: function () { return this._StateContentDao_y2yl6n$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'stateContentDao', {configurable: true, get: function () { return this._StateContentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_AgentDao', {configurable: true, get: function () { return this._AgentDao_ruleqs$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'agentDao', {configurable: true, get: function () { return this._AgentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LearnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao_b0g40p$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'learnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LearnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao_mag2e9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'learnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_GroupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao_m33w7i$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'groupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_ap5hnj$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao_e1mhp7$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CustomFieldDao', {configurable: true, get: function () { return this._CustomFieldDao_5e73mo$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'customFieldDao', {configurable: true, get: function () { return this._CustomFieldDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CustomFieldValueDao', {configurable: true, get: function () { return this._CustomFieldValueDao_kaoow1$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'customFieldValueDao', {configurable: true, get: function () { return this._CustomFieldValueDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CustomFieldValueOptionDao', {configurable: true, get: function () { return this._CustomFieldValueOptionDao_kgo4ve$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'customFieldValueOptionDao', {configurable: true, get: function () { return this._CustomFieldValueOptionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScheduleDao', {configurable: true, get: function () { return this._ScheduleDao_6f1hrk$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scheduleDao', {configurable: true, get: function () { return this._ScheduleDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScheduledCheckDao', {configurable: true, get: function () { return this._ScheduledCheckDao_xhifv0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scheduledCheckDao', {configurable: true, get: function () { return this._ScheduledCheckDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_HolidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao_uwm5jh$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'holidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_HolidayDao', {configurable: true, get: function () { return this._HolidayDao_bvaw29$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'holidayDao', {configurable: true, get: function () { return this._HolidayDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SchoolDao', {configurable: true, get: function () { return this._SchoolDao_7eo53h$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'schoolDao', {configurable: true, get: function () { return this._SchoolDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_XLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao_h0gfv1$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'xLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LocallyAvailableContainerDao', {configurable: true, get: function () { return this._LocallyAvailableContainerDao_7wf02v$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'locallyAvailableContainerDao', {configurable: true, get: function () { return this._LocallyAvailableContainerDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SchoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao_2tq407$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'schoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao_3ggsx0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_u85dhz$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzAssignmentRollUpDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao_idjn7w$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'cacheClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_lzd959$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_kk6as0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_bcqoqa$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CommentsDao', {configurable: true, get: function () { return this._CommentsDao_n8pvx$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'commentsDao', {configurable: true, get: function () { return this._CommentsDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SyncNodeDao', {configurable: true, get: function () { return this._SyncNodeDao_gj1sd2$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'syncNodeDao', {configurable: true, get: function () { return this._SyncNodeDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SiteDao', {configurable: true, get: function () { return this._SiteDao_dgj3hc$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'siteDao', {configurable: true, get: function () { return this._SiteDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SiteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao_z71e95$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'siteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao_jpqxfm$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao_c5bgvx$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ErrorReportDao', {configurable: true, get: function () { return this._ErrorReportDao_fhjgp9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'errorReportDao', {configurable: true, get: function () { return this._ErrorReportDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao_sbcr2k$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_UserSessionDao', {configurable: true, get: function () { return this._UserSessionDao_u3lyxu$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'userSessionDao', {configurable: true, get: function () { return this._UserSessionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentJobItemDao', {configurable: true, get: function () { return this._ContentJobItemDao_wk14ls$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentJobItemDao', {configurable: true, get: function () { return this._ContentJobItemDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentJobDao', {configurable: true, get: function () { return this._ContentJobDao_otp6eb$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentJobDao', {configurable: true, get: function () { return this._ContentJobDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CoursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao_8lofba$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'coursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao_h75b18$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ChatDao', {configurable: true, get: function () { return this._ChatDao_q2bpip$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'chatDao', {configurable: true, get: function () { return this._ChatDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ChatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao_msanf9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'chatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_MessageDao', {configurable: true, get: function () { return this._MessageDao_jfy3z6$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'messageDao', {configurable: true, get: function () { return this._MessageDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_MessageReadDao', {configurable: true, get: function () { return this._MessageReadDao_2blgx8$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'messageReadDao', {configurable: true, get: function () { return this._MessageReadDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao_cb20xo$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_DiscussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao_5a2pfi$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'discussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_DiscussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao_siiczl$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'discussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao; }}); UmAppDatabase_JdbcKt.prototype.createAllTables = function () { var _stmtList = mutableLinkedListOf([]); switch (this.jdbcDbType) { case 1: var element = 'CREATE TABLE IF NOT EXISTS _doorwayinfo (dbVersion int primary key, dbHash varchar(255))'; _stmtList.add_11rb$(element); var element_0 = "INSERT INTO _doorwayinfo VALUES (106, '')"; _stmtList.add_11rb$(element_0); var element_1 = 'CREATE TABLE IF NOT EXISTS NetworkNode ( bluetoothMacAddress TEXT , ipAddress TEXT , wifiDirectMacAddress TEXT , deviceWifiDirectName TEXT , endpointUrl TEXT , lastUpdateTimeStamp INTEGER NOT NULL , networkServiceLastUpdated INTEGER NOT NULL , nsdServiceName TEXT , port INTEGER NOT NULL , numFailureCount INTEGER NOT NULL , wifiDirectDeviceStatus INTEGER NOT NULL , groupSsid TEXT , nodeId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_1); var element_2 = 'CREATE INDEX index_NetworkNode_bluetoothMacAddress ON NetworkNode (bluetoothMacAddress)'; _stmtList.add_11rb$(element_2); var element_3 = 'CREATE INDEX index_NetworkNode_lastUpdateTimeStamp ON NetworkNode (lastUpdateTimeStamp)'; _stmtList.add_11rb$(element_3); var element_4 = 'CREATE TABLE IF NOT EXISTS ClazzLog ( clazzLogClazzUid INTEGER NOT NULL , logDate INTEGER NOT NULL , timeRecorded INTEGER NOT NULL , clazzLogDone INTEGER NOT NULL , cancellationNote TEXT , clazzLogCancelled INTEGER NOT NULL , clazzLogNumPresent INTEGER NOT NULL , clazzLogNumAbsent INTEGER NOT NULL , clazzLogNumPartial INTEGER NOT NULL , clazzLogScheduleUid INTEGER NOT NULL , clazzLogStatusFlag INTEGER NOT NULL , clazzLogMSQN INTEGER NOT NULL , clazzLogLCSN INTEGER NOT NULL , clazzLogLCB INTEGER NOT NULL , clazzLogLastChangedTime INTEGER NOT NULL , clazzLogUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_4); var element_5 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecord ( clazzLogAttendanceRecordClazzLogUid INTEGER NOT NULL , clazzLogAttendanceRecordPersonUid INTEGER NOT NULL , attendanceStatus INTEGER NOT NULL , clazzLogAttendanceRecordMasterChangeSeqNum INTEGER NOT NULL , clazzLogAttendanceRecordLocalChangeSeqNum INTEGER NOT NULL , clazzLogAttendanceRecordLastChangedBy INTEGER NOT NULL , clazzLogAttendanceRecordLastChangedTime INTEGER NOT NULL , clazzLogAttendanceRecordUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_5); var element_6 = 'CREATE TABLE IF NOT EXISTS Schedule ( sceduleStartTime INTEGER NOT NULL , scheduleEndTime INTEGER NOT NULL , scheduleDay INTEGER NOT NULL , scheduleMonth INTEGER NOT NULL , scheduleFrequency INTEGER NOT NULL , umCalendarUid INTEGER NOT NULL , scheduleClazzUid INTEGER NOT NULL , scheduleMasterChangeSeqNum INTEGER NOT NULL , scheduleLocalChangeSeqNum INTEGER NOT NULL , scheduleLastChangedBy INTEGER NOT NULL , scheduleLastChangedTime INTEGER NOT NULL , scheduleActive INTEGER NOT NULL , scheduleUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_6); var element_7 = 'CREATE TABLE IF NOT EXISTS DateRange ( dateRangeLocalChangeSeqNum INTEGER NOT NULL , dateRangeMasterChangeSeqNum INTEGER NOT NULL , dateRangLastChangedBy INTEGER NOT NULL , dateRangeLct INTEGER NOT NULL , dateRangeFromDate INTEGER NOT NULL , dateRangeToDate INTEGER NOT NULL , dateRangeUMCalendarUid INTEGER NOT NULL , dateRangeName TEXT , dateRangeDesc TEXT , dateRangeActive INTEGER NOT NULL , dateRangeUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_7); var element_8 = 'CREATE TABLE IF NOT EXISTS HolidayCalendar ( umCalendarName TEXT , umCalendarCategory INTEGER NOT NULL , umCalendarActive INTEGER NOT NULL , umCalendarMasterChangeSeqNum INTEGER NOT NULL , umCalendarLocalChangeSeqNum INTEGER NOT NULL , umCalendarLastChangedBy INTEGER NOT NULL , umCalendarLct INTEGER NOT NULL , umCalendarUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_8); var element_9 = 'CREATE TABLE IF NOT EXISTS Holiday ( holMasterCsn INTEGER NOT NULL , holLocalCsn INTEGER NOT NULL , holLastModBy INTEGER NOT NULL , holLct INTEGER NOT NULL , holActive INTEGER NOT NULL , holHolidayCalendarUid INTEGER NOT NULL , holStartTime INTEGER NOT NULL , holEndTime INTEGER NOT NULL , holName TEXT , holUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_9); var element_10 = 'CREATE TABLE IF NOT EXISTS ScheduledCheck ( checkTime INTEGER NOT NULL , checkType INTEGER NOT NULL , checkUuid TEXT , checkParameters TEXT , scClazzLogUid INTEGER NOT NULL , scheduledCheckMasterCsn INTEGER NOT NULL , scheduledCheckLocalCsn INTEGER NOT NULL , scheduledCheckLastChangedBy INTEGER NOT NULL , scheduledCheckLct INTEGER NOT NULL , scheduledCheckUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_10); var element_11 = 'CREATE TABLE IF NOT EXISTS AuditLog ( auditLogMasterChangeSeqNum INTEGER NOT NULL , auditLogLocalChangeSeqNum INTEGER NOT NULL , auditLogLastChangedBy INTEGER NOT NULL , auditLogLct INTEGER NOT NULL , auditLogActorPersonUid INTEGER NOT NULL , auditLogTableUid INTEGER NOT NULL , auditLogEntityUid INTEGER NOT NULL , auditLogDate INTEGER NOT NULL , notes TEXT , auditLogUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_11); var element_12 = 'CREATE TABLE IF NOT EXISTS CustomField ( customFieldName TEXT , customFieldNameAlt TEXT , customFieldLabelMessageID INTEGER NOT NULL , customFieldIcon TEXT , customFieldIconId INTEGER NOT NULL , actionOnClick TEXT , customFieldType INTEGER NOT NULL , customFieldEntityType INTEGER NOT NULL , customFieldActive INTEGER NOT NULL , customFieldDefaultValue TEXT , customFieldMCSN INTEGER NOT NULL , customFieldLCSN INTEGER NOT NULL , customFieldLCB INTEGER NOT NULL , customFieldLct INTEGER NOT NULL , customFieldInputType INTEGER NOT NULL , customFieldUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_12); var element_13 = 'CREATE TABLE IF NOT EXISTS CustomFieldValue ( customFieldValueFieldUid INTEGER NOT NULL , customFieldValueEntityUid INTEGER NOT NULL , customFieldValueValue TEXT , customFieldValueCustomFieldValueOptionUid INTEGER NOT NULL , customFieldValueMCSN INTEGER NOT NULL , customFieldValueLCSN INTEGER NOT NULL , customFieldValueLCB INTEGER NOT NULL , customFieldLct INTEGER NOT NULL , customFieldValueUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_13); var element_14 = 'CREATE TABLE IF NOT EXISTS CustomFieldValueOption ( customFieldValueOptionName TEXT , customFieldValueOptionFieldUid INTEGER NOT NULL , customFieldValueOptionIcon TEXT , customFieldValueOptionMessageId INTEGER NOT NULL , customFieldValueOptionActive INTEGER NOT NULL , customFieldValueOptionMCSN INTEGER NOT NULL , customFieldValueOptionLCSN INTEGER NOT NULL , customFieldValueOptionLCB INTEGER NOT NULL , customFieldValueLct INTEGER NOT NULL , customFieldValueOptionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_14); var element_15 = 'CREATE TABLE IF NOT EXISTS Person ( username TEXT , firstNames TEXT , lastName TEXT , emailAddr TEXT , phoneNum TEXT , gender INTEGER NOT NULL , active INTEGER NOT NULL , admin INTEGER NOT NULL , personNotes TEXT , fatherName TEXT , fatherNumber TEXT , motherName TEXT , motherNum TEXT , dateOfBirth INTEGER NOT NULL , personAddress TEXT , personOrgId TEXT , personGroupUid INTEGER NOT NULL , personMasterChangeSeqNum INTEGER NOT NULL , personLocalChangeSeqNum INTEGER NOT NULL , personLastChangedBy INTEGER NOT NULL , personLct INTEGER NOT NULL , personCountry TEXT , personType INTEGER NOT NULL DEFAULT 0 , personUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_15); var element_16 = 'CREATE TABLE IF NOT EXISTS Clazz ( clazzName TEXT , clazzDesc TEXT , attendanceAverage REAL NOT NULL , clazzHolidayUMCalendarUid INTEGER NOT NULL , clazzScheuleUMCalendarUid INTEGER NOT NULL , isClazzActive INTEGER NOT NULL , clazzLocationUid INTEGER NOT NULL , clazzStartTime INTEGER NOT NULL , clazzEndTime INTEGER NOT NULL , clazzFeatures INTEGER NOT NULL , clazzSchoolUid INTEGER NOT NULL , clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 , clazzTerminologyUid INTEGER NOT NULL DEFAULT 25966 , clazzMasterChangeSeqNum INTEGER NOT NULL , clazzLocalChangeSeqNum INTEGER NOT NULL , clazzLastChangedBy INTEGER NOT NULL , clazzLct INTEGER NOT NULL , clazzTimeZone TEXT , clazzStudentsPersonGroupUid INTEGER NOT NULL , clazzTeachersPersonGroupUid INTEGER NOT NULL , clazzPendingStudentsPersonGroupUid INTEGER NOT NULL , clazzParentsPersonGroupUid INTEGER NOT NULL , clazzCode TEXT , clazzUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_16); var element_17 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolment ( clazzEnrolmentPersonUid INTEGER NOT NULL , clazzEnrolmentClazzUid INTEGER NOT NULL , clazzEnrolmentDateJoined INTEGER NOT NULL , clazzEnrolmentDateLeft INTEGER NOT NULL , clazzEnrolmentRole INTEGER NOT NULL , clazzEnrolmentAttendancePercentage REAL NOT NULL , clazzEnrolmentActive INTEGER NOT NULL , clazzEnrolmentLeavingReasonUid INTEGER NOT NULL , clazzEnrolmentOutcome INTEGER NOT NULL , clazzEnrolmentLocalChangeSeqNum INTEGER NOT NULL , clazzEnrolmentMasterChangeSeqNum INTEGER NOT NULL , clazzEnrolmentLastChangedBy INTEGER NOT NULL , clazzEnrolmentLct INTEGER NOT NULL , clazzEnrolmentUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_17); var element_18 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentPersonUid_clazzEnrolmentClazzUid ON ClazzEnrolment (clazzEnrolmentPersonUid, clazzEnrolmentClazzUid)'; _stmtList.add_11rb$(element_18); var element_19 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentPersonUid ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentPersonUid)'; _stmtList.add_11rb$(element_19); var element_20 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentRole ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentRole)'; _stmtList.add_11rb$(element_20); var element_21 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentPersonUid ON ClazzEnrolment (clazzEnrolmentPersonUid)'; _stmtList.add_11rb$(element_21); var element_22 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid ON ClazzEnrolment (clazzEnrolmentClazzUid)'; _stmtList.add_11rb$(element_22); var element_23 = 'CREATE TABLE IF NOT EXISTS LeavingReason ( leavingReasonTitle TEXT , leavingReasonMCSN INTEGER NOT NULL , leavingReasonCSN INTEGER NOT NULL , leavingReasonLCB INTEGER NOT NULL , leavingReasonLct INTEGER NOT NULL , leavingReasonUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_23); var element_24 = 'CREATE TABLE IF NOT EXISTS ContentEntry ( title TEXT , description TEXT , entryId TEXT , author TEXT , publisher TEXT , licenseType INTEGER NOT NULL , licenseName TEXT , licenseUrl TEXT , sourceUrl TEXT , thumbnailUrl TEXT , lastModified INTEGER NOT NULL , primaryLanguageUid INTEGER NOT NULL , languageVariantUid INTEGER NOT NULL , contentFlags INTEGER NOT NULL , leaf INTEGER NOT NULL , publik INTEGER NOT NULL , ceInactive INTEGER NOT NULL , completionCriteria INTEGER NOT NULL , minScore INTEGER NOT NULL , contentTypeFlag INTEGER NOT NULL , contentOwner INTEGER NOT NULL , contentEntryLocalChangeSeqNum INTEGER NOT NULL , contentEntryMasterChangeSeqNum INTEGER NOT NULL , contentEntryLastChangedBy INTEGER NOT NULL , contentEntryLct INTEGER NOT NULL , contentEntryUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_24); var element_25 = 'CREATE INDEX index_ContentEntry_primaryLanguageUid ON ContentEntry (primaryLanguageUid)'; _stmtList.add_11rb$(element_25); var element_26 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoin ( ceccjContentEntryUid INTEGER NOT NULL , ceccjContentCategoryUid INTEGER NOT NULL , ceccjLocalChangeSeqNum INTEGER NOT NULL , ceccjMasterChangeSeqNum INTEGER NOT NULL , ceccjLastChangedBy INTEGER NOT NULL , ceccjLct INTEGER NOT NULL , ceccjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_26); var element_27 = 'CREATE INDEX index_ContentEntryContentCategoryJoin_ceccjContentEntryUid ON ContentEntryContentCategoryJoin (ceccjContentEntryUid)'; _stmtList.add_11rb$(element_27); var element_28 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoin ( cepcjParentContentEntryUid INTEGER NOT NULL , cepcjChildContentEntryUid INTEGER NOT NULL , childIndex INTEGER NOT NULL , cepcjLocalChangeSeqNum INTEGER NOT NULL , cepcjMasterChangeSeqNum INTEGER NOT NULL , cepcjLastChangedBy INTEGER NOT NULL , cepcjLct INTEGER NOT NULL , cepcjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_28); var element_29 = 'CREATE INDEX parent_child ON ContentEntryParentChildJoin (cepcjChildContentEntryUid, cepcjParentContentEntryUid)'; _stmtList.add_11rb$(element_29); var element_30 = 'CREATE INDEX index_ContentEntryParentChildJoin_cepcjParentContentEntryUid ON ContentEntryParentChildJoin (cepcjParentContentEntryUid)'; _stmtList.add_11rb$(element_30); var element_31 = 'CREATE INDEX index_ContentEntryParentChildJoin_cepcjChildContentEntryUid ON ContentEntryParentChildJoin (cepcjChildContentEntryUid)'; _stmtList.add_11rb$(element_31); var element_32 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoin ( cerejContentEntryUid INTEGER NOT NULL , cerejRelatedEntryUid INTEGER NOT NULL , cerejLastChangedBy INTEGER NOT NULL , relType INTEGER NOT NULL , comment TEXT , cerejRelLanguageUid INTEGER NOT NULL , cerejLocalChangeSeqNum INTEGER NOT NULL , cerejMasterChangeSeqNum INTEGER NOT NULL , cerejLct INTEGER NOT NULL , cerejUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_32); var element_33 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchema ( schemaName TEXT , schemaUrl TEXT , contentCategorySchemaLocalChangeSeqNum INTEGER NOT NULL , contentCategorySchemaMasterChangeSeqNum INTEGER NOT NULL , contentCategorySchemaLastChangedBy INTEGER NOT NULL , contentCategorySchemaLct INTEGER NOT NULL , contentCategorySchemaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_33); var element_34 = 'CREATE TABLE IF NOT EXISTS ContentCategory ( ctnCatContentCategorySchemaUid INTEGER NOT NULL , name TEXT , contentCategoryLocalChangeSeqNum INTEGER NOT NULL , contentCategoryMasterChangeSeqNum INTEGER NOT NULL , contentCategoryLastChangedBy INTEGER NOT NULL , contentCategoryLct INTEGER NOT NULL , contentCategoryUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_34); var element_35 = 'CREATE TABLE IF NOT EXISTS Language ( name TEXT , iso_639_1_standard TEXT , iso_639_2_standard TEXT , iso_639_3_standard TEXT , Language_Type TEXT , languageActive INTEGER NOT NULL , langLocalChangeSeqNum INTEGER NOT NULL , langMasterChangeSeqNum INTEGER NOT NULL , langLastChangedBy INTEGER NOT NULL , langLct INTEGER NOT NULL , langUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_35); var element_36 = 'CREATE TABLE IF NOT EXISTS LanguageVariant ( langUid INTEGER NOT NULL , countryCode TEXT , name TEXT , langVariantLocalChangeSeqNum INTEGER NOT NULL , langVariantMasterChangeSeqNum INTEGER NOT NULL , langVariantLastChangedBy INTEGER NOT NULL , langVariantLct INTEGER NOT NULL , langVariantUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_36); var element_37 = 'CREATE TABLE IF NOT EXISTS AccessToken ( token TEXT PRIMARY KEY , accessTokenPersonUid INTEGER NOT NULL , expires INTEGER NOT NULL )'; _stmtList.add_11rb$(element_37); var element_38 = 'CREATE TABLE IF NOT EXISTS PersonAuth ( passwordHash TEXT , personAuthStatus INTEGER NOT NULL , personAuthUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_38); var element_39 = 'CREATE TABLE IF NOT EXISTS Role ( roleName TEXT , roleActive INTEGER NOT NULL , roleMasterCsn INTEGER NOT NULL , roleLocalCsn INTEGER NOT NULL , roleLastChangedBy INTEGER NOT NULL , roleLct INTEGER NOT NULL , rolePermissions INTEGER NOT NULL , roleUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_39); var element_40 = 'CREATE INDEX index_Role_rolePermissions ON Role (rolePermissions)'; _stmtList.add_11rb$(element_40); var element_41 = 'CREATE TABLE IF NOT EXISTS EntityRole ( erMasterCsn INTEGER NOT NULL , erLocalCsn INTEGER NOT NULL , erLastChangedBy INTEGER NOT NULL , erLct INTEGER NOT NULL , erTableId INTEGER NOT NULL , erEntityUid INTEGER NOT NULL , erGroupUid INTEGER NOT NULL , erRoleUid INTEGER NOT NULL , erActive INTEGER NOT NULL , erUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_41); var element_42 = 'CREATE INDEX index_EntityRole_erGroupUid_erRoleUid_erTableId ON EntityRole (erGroupUid, erRoleUid, erTableId)'; _stmtList.add_11rb$(element_42); var element_43 = 'CREATE INDEX index_EntityRole_erTableId ON EntityRole (erTableId)'; _stmtList.add_11rb$(element_43); var element_44 = 'CREATE INDEX index_EntityRole_erEntityUid ON EntityRole (erEntityUid)'; _stmtList.add_11rb$(element_44); var element_45 = 'CREATE INDEX index_EntityRole_erGroupUid ON EntityRole (erGroupUid)'; _stmtList.add_11rb$(element_45); var element_46 = 'CREATE INDEX index_EntityRole_erRoleUid ON EntityRole (erRoleUid)'; _stmtList.add_11rb$(element_46); var element_47 = 'CREATE TABLE IF NOT EXISTS PersonGroup ( groupMasterCsn INTEGER NOT NULL , groupLocalCsn INTEGER NOT NULL , groupLastChangedBy INTEGER NOT NULL , groupLct INTEGER NOT NULL , groupName TEXT , groupActive INTEGER NOT NULL , personGroupFlag INTEGER NOT NULL , groupUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_47); var element_48 = 'CREATE TABLE IF NOT EXISTS PersonGroupMember ( groupMemberActive INTEGER NOT NULL , groupMemberPersonUid INTEGER NOT NULL , groupMemberGroupUid INTEGER NOT NULL , groupMemberMasterCsn INTEGER NOT NULL , groupMemberLocalCsn INTEGER NOT NULL , groupMemberLastChangedBy INTEGER NOT NULL , groupMemberLct INTEGER NOT NULL , groupMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_48); var element_49 = 'CREATE INDEX index_PersonGroupMember_groupMemberPersonUid ON PersonGroupMember (groupMemberPersonUid)'; _stmtList.add_11rb$(element_49); var element_50 = 'CREATE INDEX index_PersonGroupMember_groupMemberGroupUid ON PersonGroupMember (groupMemberGroupUid)'; _stmtList.add_11rb$(element_50); var element_51 = 'CREATE TABLE IF NOT EXISTS PersonPicture ( personPicturePersonUid INTEGER NOT NULL , personPictureMasterCsn INTEGER NOT NULL , personPictureLocalCsn INTEGER NOT NULL , personPictureLastChangedBy INTEGER NOT NULL , personPictureLct INTEGER NOT NULL , personPictureUri TEXT , personPictureMd5 TEXT , fileSize INTEGER NOT NULL , picTimestamp INTEGER NOT NULL , mimeType TEXT , personPictureActive INTEGER NOT NULL , personPictureUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_51); var element_52 = 'CREATE TABLE IF NOT EXISTS ScrapeQueueItem ( sqiContentEntryParentUid INTEGER NOT NULL , sqiContentEntryUid INTEGER NOT NULL , destDir TEXT , scrapeUrl TEXT , status INTEGER NOT NULL , runId INTEGER NOT NULL , itemType INTEGER NOT NULL , errorCode INTEGER NOT NULL , contentType TEXT , timeAdded INTEGER NOT NULL , timeStarted INTEGER NOT NULL , timeFinished INTEGER NOT NULL , priority INTEGER NOT NULL , overrideEntry INTEGER NOT NULL , sqiUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_52); var element_53 = 'CREATE INDEX index_ScrapeQueueItem_status_itemType ON ScrapeQueueItem (status, itemType)'; _stmtList.add_11rb$(element_53); var element_54 = 'CREATE TABLE IF NOT EXISTS ScrapeRun ( scrapeType TEXT , scrapeRunStatus INTEGER NOT NULL , conversionParams TEXT , scrapeRunUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_54); var element_55 = 'CREATE TABLE IF NOT EXISTS ConnectivityStatus ( csUid INTEGER PRIMARY KEY NOT NULL , connectivityState INTEGER NOT NULL , wifiSsid TEXT , connectedOrConnecting INTEGER NOT NULL )'; _stmtList.add_11rb$(element_55); var element_56 = 'CREATE TABLE IF NOT EXISTS Container ( cntLocalCsn INTEGER NOT NULL , cntMasterCsn INTEGER NOT NULL , cntLastModBy INTEGER NOT NULL , cntLct INTEGER NOT NULL , fileSize INTEGER NOT NULL , containerContentEntryUid INTEGER NOT NULL , cntLastModified INTEGER NOT NULL , mimeType TEXT , remarks TEXT , mobileOptimized INTEGER NOT NULL , cntNumEntries INTEGER NOT NULL , containerUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_56); var element_57 = 'CREATE INDEX cnt_uid_to_most_recent ON Container (containerContentEntryUid, cntLastModified)'; _stmtList.add_11rb$(element_57); var element_58 = 'CREATE INDEX index_Container_cntLastModified ON Container (cntLastModified)'; _stmtList.add_11rb$(element_58); var element_59 = 'CREATE TABLE IF NOT EXISTS ContainerEntry ( ceContainerUid INTEGER NOT NULL , cePath TEXT , ceCefUid INTEGER NOT NULL , ceUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_59); var element_60 = 'CREATE INDEX index_ContainerEntry_ceContainerUid ON ContainerEntry (ceContainerUid)'; _stmtList.add_11rb$(element_60); var element_61 = 'CREATE TABLE IF NOT EXISTS ContainerEntryFile ( cefMd5 TEXT , cefPath TEXT , ceTotalSize INTEGER NOT NULL , ceCompressedSize INTEGER NOT NULL , compression INTEGER NOT NULL , lastModified INTEGER NOT NULL , cefUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_61); var element_62 = 'CREATE INDEX index_ContainerEntryFile_cefMd5 ON ContainerEntryFile (cefMd5)'; _stmtList.add_11rb$(element_62); var element_63 = 'CREATE TABLE IF NOT EXISTS VerbEntity ( urlId TEXT , verbInActive INTEGER NOT NULL , verbMasterChangeSeqNum INTEGER NOT NULL , verbLocalChangeSeqNum INTEGER NOT NULL , verbLastChangedBy INTEGER NOT NULL , verbLct INTEGER NOT NULL , verbUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_63); var element_64 = 'CREATE TABLE IF NOT EXISTS XObjectEntity ( objectType TEXT , objectId TEXT , definitionType TEXT , interactionType TEXT , correctResponsePattern TEXT , objectContentEntryUid INTEGER NOT NULL , objectStatementRefUid INTEGER NOT NULL DEFAULT 0 , xObjectMasterChangeSeqNum INTEGER NOT NULL , xObjectocalChangeSeqNum INTEGER NOT NULL , xObjectLastChangedBy INTEGER NOT NULL , xObjectLct INTEGER NOT NULL , xObjectUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_64); var element_65 = 'CREATE TABLE IF NOT EXISTS StatementEntity ( statementId TEXT , statementPersonUid INTEGER NOT NULL , statementVerbUid INTEGER NOT NULL , xObjectUid INTEGER NOT NULL , subStatementActorUid INTEGER NOT NULL , substatementVerbUid INTEGER NOT NULL , subStatementObjectUid INTEGER NOT NULL , agentUid INTEGER NOT NULL , instructorUid INTEGER NOT NULL , authorityUid INTEGER NOT NULL , teamUid INTEGER NOT NULL , resultCompletion INTEGER NOT NULL , resultSuccess INTEGER NOT NULL , resultScoreScaled REAL NOT NULL , resultScoreRaw INTEGER NOT NULL , resultScoreMin INTEGER NOT NULL , resultScoreMax INTEGER NOT NULL , resultDuration INTEGER NOT NULL , resultResponse TEXT , timestamp INTEGER NOT NULL , stored INTEGER NOT NULL , contextRegistration TEXT , contextPlatform TEXT , contextStatementId TEXT , fullStatement TEXT , statementMasterChangeSeqNum INTEGER NOT NULL , statementLocalChangeSeqNum INTEGER NOT NULL , statementLastChangedBy INTEGER NOT NULL , statementLct INTEGER NOT NULL , extensionProgress INTEGER NOT NULL , contentEntryRoot INTEGER NOT NULL , statementContentEntryUid INTEGER NOT NULL , statementLearnerGroupUid INTEGER NOT NULL , statementClazzUid INTEGER NOT NULL , statementUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_65); var element_66 = 'CREATE INDEX index_StatementEntity_statementContentEntryUid_statementPersonUid_contentEntryRoot_timestamp_statementLocalChangeSeqNum ON StatementEntity (statementContentEntryUid, statementPersonUid, contentEntryRoot, timestamp, statementLocalChangeSeqNum)'; _stmtList.add_11rb$(element_66); var element_67 = 'CREATE INDEX index_StatementEntity_statementPersonUid ON StatementEntity (statementPersonUid)'; _stmtList.add_11rb$(element_67); var element_68 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoin ( contextActivityFlag INTEGER NOT NULL , contextStatementUid INTEGER NOT NULL , contextXObjectUid INTEGER NOT NULL , verbMasterChangeSeqNum INTEGER NOT NULL , verbLocalChangeSeqNum INTEGER NOT NULL , verbLastChangedBy INTEGER NOT NULL , contextXObjectLct INTEGER NOT NULL , contextXObjectStatementJoinUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_68); var element_69 = 'CREATE TABLE IF NOT EXISTS AgentEntity ( agentMbox TEXT , agentMbox_sha1sum TEXT , agentOpenid TEXT , agentAccountName TEXT , agentHomePage TEXT , agentPersonUid INTEGER NOT NULL , statementMasterChangeSeqNum INTEGER NOT NULL , statementLocalChangeSeqNum INTEGER NOT NULL , statementLastChangedBy INTEGER NOT NULL , agentLct INTEGER NOT NULL , agentUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_69); var element_70 = 'CREATE TABLE IF NOT EXISTS StateEntity ( stateId TEXT , agentUid INTEGER NOT NULL , activityId TEXT , registration TEXT , isIsactive INTEGER NOT NULL , timestamp INTEGER NOT NULL , stateMasterChangeSeqNum INTEGER NOT NULL , stateLocalChangeSeqNum INTEGER NOT NULL , stateLastChangedBy INTEGER NOT NULL , stateLct INTEGER NOT NULL , stateUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_70); var element_71 = 'CREATE TABLE IF NOT EXISTS StateContentEntity ( stateContentStateUid INTEGER NOT NULL , stateContentKey TEXT , stateContentValue TEXT , isIsactive INTEGER NOT NULL , stateContentMasterChangeSeqNum INTEGER NOT NULL , stateContentLocalChangeSeqNum INTEGER NOT NULL , stateContentLastChangedBy INTEGER NOT NULL , stateContentLct INTEGER NOT NULL , stateContentUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_71); var element_72 = 'CREATE TABLE IF NOT EXISTS XLangMapEntry ( verbLangMapUid INTEGER NOT NULL , objectLangMapUid INTEGER NOT NULL , languageLangMapUid INTEGER NOT NULL , languageVariantLangMapUid INTEGER NOT NULL , valueLangMap TEXT , statementLangMapMasterCsn INTEGER NOT NULL , statementLangMapLocalCsn INTEGER NOT NULL , statementLangMapLcb INTEGER NOT NULL , statementLangMapLct INTEGER NOT NULL , statementLangMapUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_72); var element_73 = 'CREATE INDEX index_XLangMapEntry_verbLangMapUid ON XLangMapEntry (verbLangMapUid)'; _stmtList.add_11rb$(element_73); var element_74 = 'CREATE TABLE IF NOT EXISTS SyncNode ( nodeClientId INTEGER PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_74); var element_75 = 'CREATE TABLE IF NOT EXISTS LocallyAvailableContainer ( laContainerUid INTEGER PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_75); var element_76 = 'CREATE TABLE IF NOT EXISTS ContainerETag ( ceContainerUid INTEGER PRIMARY KEY NOT NULL , cetag TEXT )'; _stmtList.add_11rb$(element_76); var element_77 = 'CREATE TABLE IF NOT EXISTS School ( schoolName TEXT , schoolDesc TEXT , schoolAddress TEXT , schoolActive INTEGER NOT NULL , schoolPhoneNumber TEXT , schoolGender INTEGER NOT NULL , schoolHolidayCalendarUid INTEGER NOT NULL , schoolFeatures INTEGER NOT NULL , schoolLocationLong REAL NOT NULL , schoolLocationLatt REAL NOT NULL , schoolEmailAddress TEXT , schoolTeachersPersonGroupUid INTEGER NOT NULL , schoolStudentsPersonGroupUid INTEGER NOT NULL , schoolPendingStudentsPersonGroupUid INTEGER NOT NULL , schoolCode TEXT , schoolMasterChangeSeqNum INTEGER NOT NULL , schoolLocalChangeSeqNum INTEGER NOT NULL , schoolLastChangedBy INTEGER NOT NULL , schoolLct INTEGER NOT NULL , schoolTimeZone TEXT , schoolUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_77); var element_78 = 'CREATE TABLE IF NOT EXISTS SchoolMember ( schoolMemberPersonUid INTEGER NOT NULL , schoolMemberSchoolUid INTEGER NOT NULL , schoolMemberJoinDate INTEGER NOT NULL , schoolMemberLeftDate INTEGER NOT NULL , schoolMemberRole INTEGER NOT NULL , schoolMemberActive INTEGER NOT NULL , schoolMemberLocalChangeSeqNum INTEGER NOT NULL , schoolMemberMasterChangeSeqNum INTEGER NOT NULL , schoolMemberLastChangedBy INTEGER NOT NULL , schoolMemberLct INTEGER NOT NULL , schoolMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_78); var element_79 = 'CREATE INDEX index_SchoolMember_schoolMemberSchoolUid_schoolMemberActive_schoolMemberRole ON SchoolMember (schoolMemberSchoolUid, schoolMemberActive, schoolMemberRole)'; _stmtList.add_11rb$(element_79); var element_80 = 'CREATE INDEX index_SchoolMember_schoolMemberPersonUid ON SchoolMember (schoolMemberPersonUid)'; _stmtList.add_11rb$(element_80); var element_81 = 'CREATE INDEX index_SchoolMember_schoolMemberSchoolUid ON SchoolMember (schoolMemberSchoolUid)'; _stmtList.add_11rb$(element_81); var element_82 = 'CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid INTEGER NOT NULL , commentsPublic INTEGER NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid INTEGER NOT NULL , commentsToPersonUid INTEGER NOT NULL , commentSubmitterUid INTEGER NOT NULL , commentsFlagged INTEGER NOT NULL , commentsInActive INTEGER NOT NULL , commentsDateTimeAdded INTEGER NOT NULL , commentsDateTimeUpdated INTEGER NOT NULL , commentsMCSN INTEGER NOT NULL , commentsLCSN INTEGER NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct INTEGER NOT NULL , commentsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_82); var element_83 = 'CREATE TABLE IF NOT EXISTS Report ( reportOwnerUid INTEGER NOT NULL , xAxis INTEGER NOT NULL , reportDateRangeSelection INTEGER NOT NULL , fromDate INTEGER NOT NULL , fromRelTo INTEGER NOT NULL , fromRelOffSet INTEGER NOT NULL , fromRelUnit INTEGER NOT NULL , toDate INTEGER NOT NULL , toRelTo INTEGER NOT NULL , toRelOffSet INTEGER NOT NULL , toRelUnit INTEGER NOT NULL , reportTitle TEXT , reportDescription TEXT , reportSeries TEXT , reportInactive INTEGER NOT NULL , isTemplate INTEGER NOT NULL , priority INTEGER NOT NULL , reportTitleId INTEGER NOT NULL , reportDescId INTEGER NOT NULL , reportMasterChangeSeqNum INTEGER NOT NULL , reportLocalChangeSeqNum INTEGER NOT NULL , reportLastChangedBy INTEGER NOT NULL , reportLct INTEGER NOT NULL , reportUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_83); var element_84 = 'CREATE TABLE IF NOT EXISTS Site ( sitePcsn INTEGER NOT NULL , siteLcsn INTEGER NOT NULL , siteLcb INTEGER NOT NULL , siteLct INTEGER NOT NULL , siteName TEXT , guestLogin INTEGER NOT NULL , registrationAllowed INTEGER NOT NULL , authSalt TEXT , siteUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_84); var element_85 = 'CREATE TABLE IF NOT EXISTS ContainerImportJob ( cijContainerUid INTEGER NOT NULL , cijUri TEXT , cijImportMode INTEGER NOT NULL , cijContainerBaseDir TEXT , cijContentEntryUid INTEGER NOT NULL , cijMimeType TEXT , cijSessionId TEXT , cijJobStatus INTEGER NOT NULL , cijBytesSoFar INTEGER NOT NULL , cijImportCompleted INTEGER NOT NULL , cijContentLength INTEGER NOT NULL , cijContainerEntryFileUids TEXT , cijConversionParams TEXT , cijUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_85); var element_86 = 'CREATE TABLE IF NOT EXISTS LearnerGroup ( learnerGroupName TEXT , learnerGroupDescription TEXT , learnerGroupActive INTEGER NOT NULL , learnerGroupMCSN INTEGER NOT NULL , learnerGroupCSN INTEGER NOT NULL , learnerGroupLCB INTEGER NOT NULL , learnerGroupLct INTEGER NOT NULL , learnerGroupUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_86); var element_87 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMember ( learnerGroupMemberPersonUid INTEGER NOT NULL , learnerGroupMemberLgUid INTEGER NOT NULL , learnerGroupMemberRole INTEGER NOT NULL , learnerGroupMemberActive INTEGER NOT NULL , learnerGroupMemberMCSN INTEGER NOT NULL , learnerGroupMemberCSN INTEGER NOT NULL , learnerGroupMemberLCB INTEGER NOT NULL , learnerGroupMemberLct INTEGER NOT NULL , learnerGroupMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_87); var element_88 = 'CREATE TABLE IF NOT EXISTS GroupLearningSession ( groupLearningSessionContentUid INTEGER NOT NULL , groupLearningSessionLearnerGroupUid INTEGER NOT NULL , groupLearningSessionInactive INTEGER NOT NULL , groupLearningSessionMCSN INTEGER NOT NULL , groupLearningSessionCSN INTEGER NOT NULL , groupLearningSessionLCB INTEGER NOT NULL , groupLearningSessionLct INTEGER NOT NULL , groupLearningSessionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_88); var element_89 = 'CREATE TABLE IF NOT EXISTS SiteTerms ( termsHtml TEXT , sTermsLang TEXT , sTermsLangUid INTEGER NOT NULL , sTermsActive INTEGER NOT NULL , sTermsLastChangedBy INTEGER NOT NULL , sTermsPrimaryCsn INTEGER NOT NULL , sTermsLocalCsn INTEGER NOT NULL , sTermsLct INTEGER NOT NULL , sTermsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_89); var element_90 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoin ( ccjContentEntryUid INTEGER NOT NULL , ccjClazzUid INTEGER NOT NULL , ccjActive INTEGER NOT NULL , ccjLocalChangeSeqNum INTEGER NOT NULL , ccjMasterChangeSeqNum INTEGER NOT NULL , ccjLastChangedBy INTEGER NOT NULL , ccjLct INTEGER NOT NULL , ccjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_90); var element_91 = 'CREATE INDEX index_ClazzContentJoin_ccjContentEntryUid ON ClazzContentJoin (ccjContentEntryUid)'; _stmtList.add_11rb$(element_91); var element_92 = 'CREATE TABLE IF NOT EXISTS PersonParentJoin ( ppjPcsn INTEGER NOT NULL , ppjLcsn INTEGER NOT NULL , ppjLcb INTEGER NOT NULL , ppjLct INTEGER NOT NULL , ppjParentPersonUid INTEGER NOT NULL , ppjMinorPersonUid INTEGER NOT NULL , ppjRelationship INTEGER NOT NULL , ppjEmail TEXT , ppjPhone TEXT , ppjInactive INTEGER NOT NULL , ppjStatus INTEGER NOT NULL , ppjApprovalTiemstamp INTEGER NOT NULL , ppjApprovalIpAddr TEXT , ppjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_92); var element_93 = 'CREATE TABLE IF NOT EXISTS ScopedGrant ( sgPcsn INTEGER NOT NULL , sgLcsn INTEGER NOT NULL , sgLcb INTEGER NOT NULL , sgLct INTEGER NOT NULL , sgTableId INTEGER NOT NULL , sgEntityUid INTEGER NOT NULL , sgPermissions INTEGER NOT NULL , sgGroupUid INTEGER NOT NULL , sgIndex INTEGER NOT NULL , sgFlags INTEGER NOT NULL , sgUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_93); var element_94 = 'CREATE INDEX idx_group_to_entity ON ScopedGrant (sgGroupUid, sgPermissions, sgTableId, sgEntityUid)'; _stmtList.add_11rb$(element_94); var element_95 = 'CREATE INDEX idx_entity_to_group ON ScopedGrant (sgTableId, sgEntityUid, sgPermissions, sgGroupUid)'; _stmtList.add_11rb$(element_95); var element_96 = 'CREATE TABLE IF NOT EXISTS ErrorReport ( errPcsn INTEGER NOT NULL , errLcsn INTEGER NOT NULL , errLcb INTEGER NOT NULL , errLct INTEGER NOT NULL , severity INTEGER NOT NULL , timestamp INTEGER NOT NULL , presenterUri TEXT , appVersion TEXT , versionCode INTEGER NOT NULL , errorCode INTEGER NOT NULL , operatingSys TEXT , osVersion TEXT , stackTrace TEXT , message TEXT , errUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_96); var element_97 = 'CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid INTEGER NOT NULL DEFAULT 0 , caActive INTEGER NOT NULL , caClassCommentEnabled INTEGER NOT NULL , caPrivateCommentsEnabled INTEGER NOT NULL DEFAULT 1 , caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission INTEGER NOT NULL DEFAULT 1 , caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission INTEGER NOT NULL DEFAULT 1 , caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid INTEGER NOT NULL DEFAULT 0 , caClazzUid INTEGER NOT NULL , caLocalChangeSeqNum INTEGER NOT NULL , caMasterChangeSeqNum INTEGER NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct INTEGER NOT NULL , caUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_97); var element_98 = 'CREATE INDEX index_ClazzAssignment_caClazzUid ON ClazzAssignment (caClazzUid)'; _stmtList.add_11rb$(element_98); var element_99 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid INTEGER NOT NULL , cacjAssignmentUid INTEGER NOT NULL , cacjActive INTEGER NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN INTEGER NOT NULL , cacjLCSN INTEGER NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct INTEGER NOT NULL , cacjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_99); var element_100 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid INTEGER NOT NULL , casSubmitterUid INTEGER NOT NULL , casSubmitterPersonUid INTEGER NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp INTEGER NOT NULL , casUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_100); var element_101 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid INTEGER NOT NULL , casaMimeType TEXT , casaFileName TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp INTEGER NOT NULL , casaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_101); var element_102 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid INTEGER NOT NULL , camSubmitterUid INTEGER NOT NULL , camMark REAL NOT NULL , camPenalty INTEGER NOT NULL , camLct INTEGER NOT NULL , camUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_102); var element_103 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid INTEGER NOT NULL , cacheContentEntryUid INTEGER NOT NULL , cacheClazzAssignmentUid INTEGER NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty REAL NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete INTEGER NOT NULL , cacheSuccess INTEGER NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked INTEGER NOT NULL , cacheUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_103); var element_104 = 'CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)'; _stmtList.add_11rb$(element_104); var element_105 = 'CREATE TABLE IF NOT EXISTS PersonAuth2 ( pauthUid INTEGER PRIMARY KEY NOT NULL , pauthMechanism TEXT , pauthAuth TEXT , pauthLcsn INTEGER NOT NULL , pauthPcsn INTEGER NOT NULL , pauthLcb INTEGER NOT NULL , pauthLct INTEGER NOT NULL )'; _stmtList.add_11rb$(element_105); var element_106 = 'CREATE TABLE IF NOT EXISTS UserSession ( usPcsn INTEGER NOT NULL , usLcsn INTEGER NOT NULL , usLcb INTEGER NOT NULL , usLct INTEGER NOT NULL , usPersonUid INTEGER NOT NULL , usClientNodeId INTEGER NOT NULL , usStartTime INTEGER NOT NULL , usEndTime INTEGER NOT NULL , usStatus INTEGER NOT NULL , usReason INTEGER NOT NULL , usAuth TEXT , usSessionType INTEGER NOT NULL , usUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_106); var element_107 = 'CREATE INDEX person_status_node_idx ON UserSession (usPersonUid, usStatus, usClientNodeId)'; _stmtList.add_11rb$(element_107); var element_108 = 'CREATE INDEX node_status_person_idx ON UserSession (usClientNodeId, usStatus, usPersonUid)'; _stmtList.add_11rb$(element_108); var element_109 = 'CREATE TABLE IF NOT EXISTS ContentJob ( toUri TEXT , cjProgress INTEGER NOT NULL , cjTotal INTEGER NOT NULL , cjNotificationTitle TEXT , cjIsMeteredAllowed INTEGER NOT NULL , params TEXT , cjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_109); var element_110 = 'CREATE TABLE IF NOT EXISTS ContentJobItem ( cjiJobUid INTEGER NOT NULL , sourceUri TEXT , cjiIsLeaf INTEGER NOT NULL , cjiContentEntryUid INTEGER NOT NULL , cjiParentContentEntryUid INTEGER NOT NULL , cjiContainerUid INTEGER NOT NULL , cjiItemProgress INTEGER NOT NULL , cjiItemTotal INTEGER NOT NULL , cjiRecursiveProgress INTEGER NOT NULL , cjiRecursiveTotal INTEGER NOT NULL , cjiStatus INTEGER NOT NULL , cjiRecursiveStatus INTEGER NOT NULL , cjiConnectivityNeeded INTEGER NOT NULL , cjiPluginId INTEGER NOT NULL , cjiAttemptCount INTEGER NOT NULL , cjiParentCjiUid INTEGER NOT NULL , cjiServerJobId INTEGER NOT NULL , cjiStartTime INTEGER NOT NULL , cjiFinishTime INTEGER NOT NULL , cjiUploadSessionUid TEXT , cjiContentDeletedOnCancellation INTEGER NOT NULL , cjiContainerProcessed INTEGER NOT NULL , cjiUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_110); var element_111 = 'CREATE INDEX index_ContentJobItem_cjiContentEntryUid_cjiFinishTime ON ContentJobItem (cjiContentEntryUid, cjiFinishTime)'; _stmtList.add_11rb$(element_111); var element_112 = 'CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid INTEGER NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate INTEGER NOT NULL , cbDeadlineDate INTEGER NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate INTEGER NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid INTEGER NOT NULL , cbActive INTEGER NOT NULL , cbHidden INTEGER NOT NULL , cbEntityUid INTEGER NOT NULL , cbLct INTEGER NOT NULL , cbUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_112); var element_113 = 'CREATE INDEX index_CourseBlock_cbClazzUid ON CourseBlock (cbClazzUid)'; _stmtList.add_11rb$(element_113); var element_114 = 'CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct INTEGER NOT NULL , ctUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_114); var element_115 = 'CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive INTEGER NOT NULL , cgsClazzUid INTEGER NOT NULL , cgsLct INTEGER NOT NULL , cgsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_115); var element_116 = 'CREATE INDEX index_CourseGroupSet_cgsClazzUid ON CourseGroupSet (cgsClazzUid)'; _stmtList.add_11rb$(element_116); var element_117 = 'CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid INTEGER NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid INTEGER NOT NULL , cgmLct INTEGER NOT NULL , cgmUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_117); var element_118 = 'CREATE TABLE IF NOT EXISTS SqliteChangeSeqNums ( sCsnTableId INTEGER PRIMARY KEY NOT NULL , sCsnNextLocal INTEGER NOT NULL , sCsnNextPrimary INTEGER NOT NULL )'; _stmtList.add_11rb$(element_118); var element_119 = 'CREATE INDEX index_SqliteChangeSeqNums_sCsnNextLocal ON SqliteChangeSeqNums (sCsnNextLocal)'; _stmtList.add_11rb$(element_119); var element_120 = 'CREATE INDEX index_SqliteChangeSeqNums_sCsnNextPrimary ON SqliteChangeSeqNums (sCsnNextPrimary)'; _stmtList.add_11rb$(element_120); var element_121 = 'CREATE TABLE IF NOT EXISTS UpdateNotification ( pnDeviceId INTEGER NOT NULL , pnTableId INTEGER NOT NULL , pnTimestamp INTEGER NOT NULL , pnUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_121); var element_122 = 'CREATE UNIQUE INDEX index_UpdateNotification_pnDeviceId_pnTableId ON UpdateNotification (pnDeviceId, pnTableId)'; _stmtList.add_11rb$(element_122); var element_123 = 'CREATE INDEX index_UpdateNotification_pnDeviceId_pnTimestamp ON UpdateNotification (pnDeviceId, pnTimestamp)'; _stmtList.add_11rb$(element_123); var element_124 = 'CREATE TABLE IF NOT EXISTS ChangeLog ( chTableId INTEGER NOT NULL , chEntityPk INTEGER NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )'; _stmtList.add_11rb$(element_124); var element_125 = 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaUri TEXT , zaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_125); var element_126 = 'CREATE TABLE IF NOT EXISTS DoorNode ( auth TEXT , rel INTEGER NOT NULL DEFAULT 2 , nodeId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_126); var element_127 = 'CREATE TABLE IF NOT EXISTS ReplicationStatus ( tableId INTEGER NOT NULL , priority INTEGER NOT NULL , nodeId INTEGER NOT NULL , lastRemoteChangeTime INTEGER NOT NULL , lastFetchReplicationCompleteTime INTEGER NOT NULL , lastLocalChangeTime INTEGER NOT NULL , lastSendReplicationCompleteTime INTEGER NOT NULL , repStatusId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_127); var element_128 = 'CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)'; _stmtList.add_11rb$(element_128); var element_129 = 'CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk INTEGER NOT NULL , clVersionId INTEGER NOT NULL DEFAULT 0 , clDestination INTEGER NOT NULL , clPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (clPk, clDestination) )'; _stmtList.add_11rb$(element_129); var element_130 = 'CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId)'; _stmtList.add_11rb$(element_130); var element_131 = 'CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending)'; _stmtList.add_11rb$(element_131); var element_132 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk INTEGER NOT NULL , clarVersionId INTEGER NOT NULL DEFAULT 0 , clarDestination INTEGER NOT NULL , clarPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (clarPk, clarDestination) )'; _stmtList.add_11rb$(element_132); var element_133 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId)'; _stmtList.add_11rb$(element_133); var element_134 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending)'; _stmtList.add_11rb$(element_134); var element_135 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk INTEGER NOT NULL , casVersionId INTEGER NOT NULL DEFAULT 0 , casDestination INTEGER NOT NULL , casPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casPk, casDestination) )'; _stmtList.add_11rb$(element_135); var element_136 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)'; _stmtList.add_11rb$(element_136); var element_137 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)'; _stmtList.add_11rb$(element_137); var element_138 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk INTEGER NOT NULL , casaVersionId INTEGER NOT NULL DEFAULT 0 , casaDestination INTEGER NOT NULL , casaPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casaPk, casaDestination) )'; _stmtList.add_11rb$(element_138); var element_139 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)'; _stmtList.add_11rb$(element_139); var element_140 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)'; _stmtList.add_11rb$(element_140); var element_141 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk INTEGER NOT NULL , camVersionId INTEGER NOT NULL DEFAULT 0 , camDestination INTEGER NOT NULL , camPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (camPk, camDestination) )'; _stmtList.add_11rb$(element_141); var element_142 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)'; _stmtList.add_11rb$(element_142); var element_143 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)'; _stmtList.add_11rb$(element_143); var element_144 = 'CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk INTEGER NOT NULL , cbVersionId INTEGER NOT NULL DEFAULT 0 , cbDestination INTEGER NOT NULL , cbPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cbPk, cbDestination) )'; _stmtList.add_11rb$(element_144); var element_145 = 'CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)'; _stmtList.add_11rb$(element_145); var element_146 = 'CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)'; _stmtList.add_11rb$(element_146); var element_147 = 'CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk INTEGER NOT NULL , ctVersionId INTEGER NOT NULL DEFAULT 0 , ctDestination INTEGER NOT NULL , ctPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ctPk, ctDestination) )'; _stmtList.add_11rb$(element_147); var element_148 = 'CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)'; _stmtList.add_11rb$(element_148); var element_149 = 'CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)'; _stmtList.add_11rb$(element_149); var element_150 = 'CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk INTEGER NOT NULL , cgsVersionId INTEGER NOT NULL DEFAULT 0 , cgsDestination INTEGER NOT NULL , cgsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgsPk, cgsDestination) )'; _stmtList.add_11rb$(element_150); var element_151 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)'; _stmtList.add_11rb$(element_151); var element_152 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)'; _stmtList.add_11rb$(element_152); var element_153 = 'CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk INTEGER NOT NULL , cgmVersionId INTEGER NOT NULL DEFAULT 0 , cgmDestination INTEGER NOT NULL , cgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgmPk, cgmDestination) )'; _stmtList.add_11rb$(element_153); var element_154 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)'; _stmtList.add_11rb$(element_154); var element_155 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)'; _stmtList.add_11rb$(element_155); var element_156 = 'CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk INTEGER NOT NULL , scheduleVersionId INTEGER NOT NULL DEFAULT 0 , scheduleDestination INTEGER NOT NULL , schedulePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (schedulePk, scheduleDestination) )'; _stmtList.add_11rb$(element_156); var element_157 = 'CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId)'; _stmtList.add_11rb$(element_157); var element_158 = 'CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending)'; _stmtList.add_11rb$(element_158); var element_159 = 'CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk INTEGER NOT NULL , hcVersionId INTEGER NOT NULL DEFAULT 0 , hcDestination INTEGER NOT NULL , hcPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (hcPk, hcDestination) )'; _stmtList.add_11rb$(element_159); var element_160 = 'CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId)'; _stmtList.add_11rb$(element_160); var element_161 = 'CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending)'; _stmtList.add_11rb$(element_161); var element_162 = 'CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk INTEGER NOT NULL , holidayVersionId INTEGER NOT NULL DEFAULT 0 , holidayDestination INTEGER NOT NULL , holidayPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (holidayPk, holidayDestination) )'; _stmtList.add_11rb$(element_162); var element_163 = 'CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId)'; _stmtList.add_11rb$(element_163); var element_164 = 'CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending)'; _stmtList.add_11rb$(element_164); var element_165 = 'CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk INTEGER NOT NULL , personVersionId INTEGER NOT NULL DEFAULT 0 , personDestination INTEGER NOT NULL , personPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (personPk, personDestination) )'; _stmtList.add_11rb$(element_165); var element_166 = 'CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId)'; _stmtList.add_11rb$(element_166); var element_167 = 'CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending)'; _stmtList.add_11rb$(element_167); var element_168 = 'CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk INTEGER NOT NULL , clazzVersionId INTEGER NOT NULL DEFAULT 0 , clazzDestination INTEGER NOT NULL , clazzPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (clazzPk, clazzDestination) )'; _stmtList.add_11rb$(element_168); var element_169 = 'CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId)'; _stmtList.add_11rb$(element_169); var element_170 = 'CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending)'; _stmtList.add_11rb$(element_170); var element_171 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk INTEGER NOT NULL , ceVersionId INTEGER NOT NULL DEFAULT 0 , ceDestination INTEGER NOT NULL , cePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_171); var element_172 = 'CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_172); var element_173 = 'CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_173); var element_174 = 'CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk INTEGER NOT NULL , lrVersionId INTEGER NOT NULL DEFAULT 0 , lrDestination INTEGER NOT NULL , lrPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lrPk, lrDestination) )'; _stmtList.add_11rb$(element_174); var element_175 = 'CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId)'; _stmtList.add_11rb$(element_175); var element_176 = 'CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending)'; _stmtList.add_11rb$(element_176); var element_177 = 'CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk INTEGER NOT NULL , ceVersionId INTEGER NOT NULL DEFAULT 0 , ceDestination INTEGER NOT NULL , cePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_177); var element_178 = 'CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_178); var element_179 = 'CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_179); var element_180 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk INTEGER NOT NULL , ceccjVersionId INTEGER NOT NULL DEFAULT 0 , ceccjDestination INTEGER NOT NULL , ceccjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ceccjPk, ceccjDestination) )'; _stmtList.add_11rb$(element_180); var element_181 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId)'; _stmtList.add_11rb$(element_181); var element_182 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending)'; _stmtList.add_11rb$(element_182); var element_183 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk INTEGER NOT NULL , cepcjVersionId INTEGER NOT NULL DEFAULT 0 , cepcjDestination INTEGER NOT NULL , cepcjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cepcjPk, cepcjDestination) )'; _stmtList.add_11rb$(element_183); var element_184 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId)'; _stmtList.add_11rb$(element_184); var element_185 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending)'; _stmtList.add_11rb$(element_185); var element_186 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk INTEGER NOT NULL , cerejVersionId INTEGER NOT NULL DEFAULT 0 , cerejDestination INTEGER NOT NULL , cerejPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cerejPk, cerejDestination) )'; _stmtList.add_11rb$(element_186); var element_187 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId)'; _stmtList.add_11rb$(element_187); var element_188 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending)'; _stmtList.add_11rb$(element_188); var element_189 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk INTEGER NOT NULL , ccsVersionId INTEGER NOT NULL DEFAULT 0 , ccsDestination INTEGER NOT NULL , ccsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ccsPk, ccsDestination) )'; _stmtList.add_11rb$(element_189); var element_190 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId)'; _stmtList.add_11rb$(element_190); var element_191 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending)'; _stmtList.add_11rb$(element_191); var element_192 = 'CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk INTEGER NOT NULL , ccVersionId INTEGER NOT NULL DEFAULT 0 , ccDestination INTEGER NOT NULL , ccPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ccPk, ccDestination) )'; _stmtList.add_11rb$(element_192); var element_193 = 'CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId)'; _stmtList.add_11rb$(element_193); var element_194 = 'CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending)'; _stmtList.add_11rb$(element_194); var element_195 = 'CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk INTEGER NOT NULL , languageVersionId INTEGER NOT NULL DEFAULT 0 , languageDestination INTEGER NOT NULL , languagePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (languagePk, languageDestination) )'; _stmtList.add_11rb$(element_195); var element_196 = 'CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId)'; _stmtList.add_11rb$(element_196); var element_197 = 'CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending)'; _stmtList.add_11rb$(element_197); var element_198 = 'CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk INTEGER NOT NULL , lvVersionId INTEGER NOT NULL DEFAULT 0 , lvDestination INTEGER NOT NULL , lvPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lvPk, lvDestination) )'; _stmtList.add_11rb$(element_198); var element_199 = 'CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId)'; _stmtList.add_11rb$(element_199); var element_200 = 'CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending)'; _stmtList.add_11rb$(element_200); var element_201 = 'CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk INTEGER NOT NULL , pgVersionId INTEGER NOT NULL DEFAULT 0 , pgDestination INTEGER NOT NULL , pgPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (pgPk, pgDestination) )'; _stmtList.add_11rb$(element_201); var element_202 = 'CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId)'; _stmtList.add_11rb$(element_202); var element_203 = 'CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending)'; _stmtList.add_11rb$(element_203); var element_204 = 'CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk INTEGER NOT NULL , pgmVersionId INTEGER NOT NULL DEFAULT 0 , pgmDestination INTEGER NOT NULL , pgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (pgmPk, pgmDestination) )'; _stmtList.add_11rb$(element_204); var element_205 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId)'; _stmtList.add_11rb$(element_205); var element_206 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending)'; _stmtList.add_11rb$(element_206); var element_207 = 'CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk INTEGER NOT NULL , ppVersionId INTEGER NOT NULL DEFAULT 0 , ppDestination INTEGER NOT NULL , ppPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ppPk, ppDestination) )'; _stmtList.add_11rb$(element_207); var element_208 = 'CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId)'; _stmtList.add_11rb$(element_208); var element_209 = 'CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending)'; _stmtList.add_11rb$(element_209); var element_210 = 'CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk INTEGER NOT NULL , containerVersionId INTEGER NOT NULL DEFAULT 0 , containerDestination INTEGER NOT NULL , containerPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (containerPk, containerDestination) )'; _stmtList.add_11rb$(element_210); var element_211 = 'CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId)'; _stmtList.add_11rb$(element_211); var element_212 = 'CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending)'; _stmtList.add_11rb$(element_212); var element_213 = 'CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk INTEGER NOT NULL , veVersionId INTEGER NOT NULL DEFAULT 0 , veDestination INTEGER NOT NULL , vePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (vePk, veDestination) )'; _stmtList.add_11rb$(element_213); var element_214 = 'CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId)'; _stmtList.add_11rb$(element_214); var element_215 = 'CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending)'; _stmtList.add_11rb$(element_215); var element_216 = 'CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk INTEGER NOT NULL , xoeVersionId INTEGER NOT NULL DEFAULT 0 , xoeDestination INTEGER NOT NULL , xoePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (xoePk, xoeDestination) )'; _stmtList.add_11rb$(element_216); var element_217 = 'CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId)'; _stmtList.add_11rb$(element_217); var element_218 = 'CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending)'; _stmtList.add_11rb$(element_218); var element_219 = 'CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk INTEGER NOT NULL , seVersionId INTEGER NOT NULL DEFAULT 0 , seDestination INTEGER NOT NULL , sePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_219); var element_220 = 'CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_220); var element_221 = 'CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_221); var element_222 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk INTEGER NOT NULL , cxosjVersionId INTEGER NOT NULL DEFAULT 0 , cxosjDestination INTEGER NOT NULL , cxosjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cxosjPk, cxosjDestination) )'; _stmtList.add_11rb$(element_222); var element_223 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId)'; _stmtList.add_11rb$(element_223); var element_224 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending)'; _stmtList.add_11rb$(element_224); var element_225 = 'CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk INTEGER NOT NULL , aeVersionId INTEGER NOT NULL DEFAULT 0 , aeDestination INTEGER NOT NULL , aePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (aePk, aeDestination) )'; _stmtList.add_11rb$(element_225); var element_226 = 'CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId)'; _stmtList.add_11rb$(element_226); var element_227 = 'CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending)'; _stmtList.add_11rb$(element_227); var element_228 = 'CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk INTEGER NOT NULL , seVersionId INTEGER NOT NULL DEFAULT 0 , seDestination INTEGER NOT NULL , sePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_228); var element_229 = 'CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_229); var element_230 = 'CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_230); var element_231 = 'CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk INTEGER NOT NULL , sceVersionId INTEGER NOT NULL DEFAULT 0 , sceDestination INTEGER NOT NULL , scePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (scePk, sceDestination) )'; _stmtList.add_11rb$(element_231); var element_232 = 'CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId)'; _stmtList.add_11rb$(element_232); var element_233 = 'CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending)'; _stmtList.add_11rb$(element_233); var element_234 = 'CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk INTEGER NOT NULL , xlmeVersionId INTEGER NOT NULL DEFAULT 0 , xlmeDestination INTEGER NOT NULL , xlmePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (xlmePk, xlmeDestination) )'; _stmtList.add_11rb$(element_234); var element_235 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId)'; _stmtList.add_11rb$(element_235); var element_236 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending)'; _stmtList.add_11rb$(element_236); var element_237 = 'CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk INTEGER NOT NULL , schoolVersionId INTEGER NOT NULL DEFAULT 0 , schoolDestination INTEGER NOT NULL , schoolPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (schoolPk, schoolDestination) )'; _stmtList.add_11rb$(element_237); var element_238 = 'CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId)'; _stmtList.add_11rb$(element_238); var element_239 = 'CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending)'; _stmtList.add_11rb$(element_239); var element_240 = 'CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk INTEGER NOT NULL , smVersionId INTEGER NOT NULL DEFAULT 0 , smDestination INTEGER NOT NULL , smPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (smPk, smDestination) )'; _stmtList.add_11rb$(element_240); var element_241 = 'CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId)'; _stmtList.add_11rb$(element_241); var element_242 = 'CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending)'; _stmtList.add_11rb$(element_242); var element_243 = 'CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk INTEGER NOT NULL , commentsVersionId INTEGER NOT NULL DEFAULT 0 , commentsDestination INTEGER NOT NULL , commentsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (commentsPk, commentsDestination) )'; _stmtList.add_11rb$(element_243); var element_244 = 'CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId)'; _stmtList.add_11rb$(element_244); var element_245 = 'CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending)'; _stmtList.add_11rb$(element_245); var element_246 = 'CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk INTEGER NOT NULL , reportVersionId INTEGER NOT NULL DEFAULT 0 , reportDestination INTEGER NOT NULL , reportPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (reportPk, reportDestination) )'; _stmtList.add_11rb$(element_246); var element_247 = 'CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId)'; _stmtList.add_11rb$(element_247); var element_248 = 'CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending)'; _stmtList.add_11rb$(element_248); var element_249 = 'CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk INTEGER NOT NULL , siteVersionId INTEGER NOT NULL DEFAULT 0 , siteDestination INTEGER NOT NULL , sitePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sitePk, siteDestination) )'; _stmtList.add_11rb$(element_249); var element_250 = 'CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId)'; _stmtList.add_11rb$(element_250); var element_251 = 'CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending)'; _stmtList.add_11rb$(element_251); var element_252 = 'CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk INTEGER NOT NULL , lgVersionId INTEGER NOT NULL DEFAULT 0 , lgDestination INTEGER NOT NULL , lgPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lgPk, lgDestination) )'; _stmtList.add_11rb$(element_252); var element_253 = 'CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId)'; _stmtList.add_11rb$(element_253); var element_254 = 'CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending)'; _stmtList.add_11rb$(element_254); var element_255 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk INTEGER NOT NULL , lgmVersionId INTEGER NOT NULL DEFAULT 0 , lgmDestination INTEGER NOT NULL , lgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lgmPk, lgmDestination) )'; _stmtList.add_11rb$(element_255); var element_256 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId)'; _stmtList.add_11rb$(element_256); var element_257 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending)'; _stmtList.add_11rb$(element_257); var element_258 = 'CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk INTEGER NOT NULL , glsVersionId INTEGER NOT NULL DEFAULT 0 , glsDestination INTEGER NOT NULL , glsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (glsPk, glsDestination) )'; _stmtList.add_11rb$(element_258); var element_259 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId)'; _stmtList.add_11rb$(element_259); var element_260 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending)'; _stmtList.add_11rb$(element_260); var element_261 = 'CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk INTEGER NOT NULL , stVersionId INTEGER NOT NULL DEFAULT 0 , stDestination INTEGER NOT NULL , stPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (stPk, stDestination) )'; _stmtList.add_11rb$(element_261); var element_262 = 'CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId)'; _stmtList.add_11rb$(element_262); var element_263 = 'CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending)'; _stmtList.add_11rb$(element_263); var element_264 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk INTEGER NOT NULL , ccjVersionId INTEGER NOT NULL DEFAULT 0 , ccjDestination INTEGER NOT NULL , ccjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ccjPk, ccjDestination) )'; _stmtList.add_11rb$(element_264); var element_265 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId)'; _stmtList.add_11rb$(element_265); var element_266 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending)'; _stmtList.add_11rb$(element_266); var element_267 = 'CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk INTEGER NOT NULL , ppjVersionId INTEGER NOT NULL DEFAULT 0 , ppjDestination INTEGER NOT NULL , ppjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ppjPk, ppjDestination) )'; _stmtList.add_11rb$(element_267); var element_268 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId)'; _stmtList.add_11rb$(element_268); var element_269 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending)'; _stmtList.add_11rb$(element_269); var element_270 = 'CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk INTEGER NOT NULL , sgVersionId INTEGER NOT NULL DEFAULT 0 , sgDestination INTEGER NOT NULL , sgPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sgPk, sgDestination) )'; _stmtList.add_11rb$(element_270); var element_271 = 'CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId)'; _stmtList.add_11rb$(element_271); var element_272 = 'CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending)'; _stmtList.add_11rb$(element_272); var element_273 = 'CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk INTEGER NOT NULL , erVersionId INTEGER NOT NULL DEFAULT 0 , erDestination INTEGER NOT NULL , erPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (erPk, erDestination) )'; _stmtList.add_11rb$(element_273); var element_274 = 'CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId)'; _stmtList.add_11rb$(element_274); var element_275 = 'CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending)'; _stmtList.add_11rb$(element_275); var element_276 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk INTEGER NOT NULL , caVersionId INTEGER NOT NULL DEFAULT 0 , caDestination INTEGER NOT NULL , caPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (caPk, caDestination) )'; _stmtList.add_11rb$(element_276); var element_277 = 'CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId)'; _stmtList.add_11rb$(element_277); var element_278 = 'CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending)'; _stmtList.add_11rb$(element_278); var element_279 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk INTEGER NOT NULL , cacjVersionId INTEGER NOT NULL DEFAULT 0 , cacjDestination INTEGER NOT NULL , cacjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cacjPk, cacjDestination) )'; _stmtList.add_11rb$(element_279); var element_280 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId)'; _stmtList.add_11rb$(element_280); var element_281 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending)'; _stmtList.add_11rb$(element_281); var element_282 = 'CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk INTEGER NOT NULL , paVersionId INTEGER NOT NULL DEFAULT 0 , paDestination INTEGER NOT NULL , paPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (paPk, paDestination) )'; _stmtList.add_11rb$(element_282); var element_283 = 'CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId)'; _stmtList.add_11rb$(element_283); var element_284 = 'CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending)'; _stmtList.add_11rb$(element_284); var element_285 = 'CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk INTEGER NOT NULL , usVersionId INTEGER NOT NULL DEFAULT 0 , usDestination INTEGER NOT NULL , usPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (usPk, usDestination) )'; _stmtList.add_11rb$(element_285); var element_286 = 'CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId)'; _stmtList.add_11rb$(element_286); var element_287 = 'CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending)'; _stmtList.add_11rb$(element_287); var element_288 = 'CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid INTEGER NOT NULL , coursePictureMasterCsn INTEGER NOT NULL , coursePictureLocalCsn INTEGER NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct INTEGER NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp INTEGER NOT NULL , coursePictureMimeType TEXT , coursePictureActive INTEGER NOT NULL , coursePictureUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_288); var element_289 = 'CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk INTEGER NOT NULL , cpVersionId INTEGER NOT NULL DEFAULT 0 , cpDestination INTEGER NOT NULL , cpPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cpPk, cpDestination) )'; _stmtList.add_11rb$(element_289); var element_290 = 'CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)'; _stmtList.add_11rb$(element_290); var element_291 = 'CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)'; _stmtList.add_11rb$(element_291); var element_292 = 'CREATE TABLE IF NOT EXISTS ContentEntryPicture ( cepContentEntryUid INTEGER NOT NULL , cepUri TEXT , cepMd5 TEXT , cepFileSize INTEGER NOT NULL , cepTimestamp INTEGER NOT NULL , cepMimeType TEXT , cepActive INTEGER NOT NULL , cepUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_292); var element_293 = 'CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate ( cepPk INTEGER NOT NULL , cepVersionId INTEGER NOT NULL DEFAULT 0 , cepDestination INTEGER NOT NULL , cepPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cepPk, cepDestination) )'; _stmtList.add_11rb$(element_293); var element_294 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId ON ContentEntryPictureReplicate (cepPk, cepDestination, cepVersionId)'; _stmtList.add_11rb$(element_294); var element_295 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepDestination_cepPending ON ContentEntryPictureReplicate (cepDestination, cepPending)'; _stmtList.add_11rb$(element_295); var element_296 = 'CREATE TABLE IF NOT EXISTS Chat ( chatStartDate INTEGER NOT NULL , chatTitle TEXT , chatGroup INTEGER NOT NULL , chatLct INTEGER NOT NULL , chatUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_296); var element_297 = 'CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid INTEGER NOT NULL , chatMemberPersonUid INTEGER NOT NULL , chatMemberJoinedDate INTEGER NOT NULL , chatMemberLeftDate INTEGER NOT NULL , chatMemberLct INTEGER NOT NULL , chatMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_297); var element_298 = 'CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid INTEGER NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid INTEGER NOT NULL , messageText TEXT , messageTimestamp INTEGER NOT NULL , messageClazzUid INTEGER NOT NULL , messageLct INTEGER NOT NULL , messageUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_298); var element_299 = 'CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk INTEGER NOT NULL , messageVersionId INTEGER NOT NULL DEFAULT 0 , messageDestination INTEGER NOT NULL , messagePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messagePk, messageDestination) )'; _stmtList.add_11rb$(element_299); var element_300 = 'CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)'; _stmtList.add_11rb$(element_300); var element_301 = 'CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)'; _stmtList.add_11rb$(element_301); var element_302 = 'CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk INTEGER NOT NULL , chatVersionId INTEGER NOT NULL DEFAULT 0 , chatDestination INTEGER NOT NULL , chatPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatPk, chatDestination) )'; _stmtList.add_11rb$(element_302); var element_303 = 'CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)'; _stmtList.add_11rb$(element_303); var element_304 = 'CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)'; _stmtList.add_11rb$(element_304); var element_305 = 'CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk INTEGER NOT NULL , chatMemberVersionId INTEGER NOT NULL DEFAULT 0 , chatMemberDestination INTEGER NOT NULL , chatMemberPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatMemberPk, chatMemberDestination) )'; _stmtList.add_11rb$(element_305); var element_306 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)'; _stmtList.add_11rb$(element_306); var element_307 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)'; _stmtList.add_11rb$(element_307); var element_308 = 'CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid INTEGER NOT NULL , messageReadMessageUid INTEGER NOT NULL , messageReadEntityUid INTEGER NOT NULL , messageReadLct INTEGER NOT NULL , messageReadUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_308); var element_309 = 'CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk INTEGER NOT NULL , messageReadVersionId INTEGER NOT NULL DEFAULT 0 , messageReadDestination INTEGER NOT NULL , messageReadPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messageReadPk, messageReadDestination) )'; _stmtList.add_11rb$(element_309); var element_310 = 'CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)'; _stmtList.add_11rb$(element_310); var element_311 = 'CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)'; _stmtList.add_11rb$(element_311); var element_312 = 'CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid INTEGER NOT NULL , courseDiscussionActive INTEGER NOT NULL , courseDiscussionLct INTEGER NOT NULL , courseDiscussionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_312); var element_313 = 'CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk INTEGER NOT NULL , courseDiscussionVersionId INTEGER NOT NULL DEFAULT 0 , courseDiscussionDestination INTEGER NOT NULL , courseDiscussionPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )'; _stmtList.add_11rb$(element_313); var element_314 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)'; _stmtList.add_11rb$(element_314); var element_315 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)'; _stmtList.add_11rb$(element_315); var element_316 = 'CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate INTEGER NOT NULL , discussionTopicCourseDiscussionUid INTEGER NOT NULL , discussionTopicVisible INTEGER NOT NULL , discussionTopicArchive INTEGER NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid INTEGER NOT NULL , discussionTopicLct INTEGER NOT NULL , discussionTopicUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_316); var element_317 = 'CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk INTEGER NOT NULL , discussionTopicVersionId INTEGER NOT NULL DEFAULT 0 , discussionTopicDestination INTEGER NOT NULL , discussionTopicPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )'; _stmtList.add_11rb$(element_317); var element_318 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)'; _stmtList.add_11rb$(element_318); var element_319 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)'; _stmtList.add_11rb$(element_319); var element_320 = 'CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate INTEGER NOT NULL , discussionPostDiscussionTopicUid INTEGER NOT NULL , discussionPostVisible INTEGER NOT NULL , discussionPostArchive INTEGER NOT NULL , discussionPostStartedPersonUid INTEGER NOT NULL , discussionPostClazzUid INTEGER NOT NULL , discussionPostLct INTEGER NOT NULL , discussionPostUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_320); var element_321 = 'CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk INTEGER NOT NULL , discussionPostVersionId INTEGER NOT NULL DEFAULT 0 , discussionPostDestination INTEGER NOT NULL , discussionPostPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionPostPk, discussionPostDestination) )'; _stmtList.add_11rb$(element_321); var element_322 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)'; _stmtList.add_11rb$(element_322); var element_323 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)'; _stmtList.add_11rb$(element_323); var element_324 = ' CREATE TRIGGER ch_ins_14 AFTER INSERT ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END '; _stmtList.add_11rb$(element_324); var element_325 = ' CREATE TRIGGER ch_upd_14 AFTER UPDATE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END '; _stmtList.add_11rb$(element_325); var element_326 = ' CREATE TRIGGER ch_del_14 AFTER DELETE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, OLD.clazzLogUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = OLD.clazzLogUid); END '; _stmtList.add_11rb$(element_326); var element_327 = 'CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid '; _stmtList.add_11rb$(element_327); var element_328 = ' CREATE TRIGGER clazzlog_remote_insert_ins INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) /*psql ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime */; END '; _stmtList.add_11rb$(element_328); var element_329 = ' CREATE TRIGGER ch_ins_15 AFTER INSERT ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_329); var element_330 = ' CREATE TRIGGER ch_upd_15 AFTER UPDATE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_330); var element_331 = ' CREATE TRIGGER ch_del_15 AFTER DELETE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, OLD.clazzLogAttendanceRecordUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = OLD.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_331); var element_332 = 'CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid '; _stmtList.add_11rb$(element_332); var element_333 = ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_ins INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) /*psql ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime */; END '; _stmtList.add_11rb$(element_333); var element_334 = ' CREATE TRIGGER ch_ins_21 AFTER INSERT ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END '; _stmtList.add_11rb$(element_334); var element_335 = ' CREATE TRIGGER ch_upd_21 AFTER UPDATE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END '; _stmtList.add_11rb$(element_335); var element_336 = ' CREATE TRIGGER ch_del_21 AFTER DELETE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, OLD.scheduleUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = OLD.scheduleUid); END '; _stmtList.add_11rb$(element_336); var element_337 = 'CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid '; _stmtList.add_11rb$(element_337); var element_338 = ' CREATE TRIGGER schedule_remote_insert_ins INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) /*psql ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive */; END '; _stmtList.add_11rb$(element_338); var element_339 = ' CREATE TRIGGER ch_ins_28 AFTER INSERT ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END '; _stmtList.add_11rb$(element_339); var element_340 = ' CREATE TRIGGER ch_upd_28 AFTER UPDATE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END '; _stmtList.add_11rb$(element_340); var element_341 = ' CREATE TRIGGER ch_del_28 AFTER DELETE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, OLD.umCalendarUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = OLD.umCalendarUid); END '; _stmtList.add_11rb$(element_341); var element_342 = 'CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid '; _stmtList.add_11rb$(element_342); var element_343 = ' CREATE TRIGGER holidaycalendar_remote_insert_ins INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW BEGIN REPLACE INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) /*psql ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct */; END '; _stmtList.add_11rb$(element_343); var element_344 = ' CREATE TRIGGER ch_ins_99 AFTER INSERT ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END '; _stmtList.add_11rb$(element_344); var element_345 = ' CREATE TRIGGER ch_upd_99 AFTER UPDATE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END '; _stmtList.add_11rb$(element_345); var element_346 = ' CREATE TRIGGER ch_del_99 AFTER DELETE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, OLD.holUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = OLD.holUid); END '; _stmtList.add_11rb$(element_346); var element_347 = 'CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid '; _stmtList.add_11rb$(element_347); var element_348 = ' CREATE TRIGGER holiday_remote_insert_ins INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) /*psql ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName */; END '; _stmtList.add_11rb$(element_348); var element_349 = ' CREATE TRIGGER ch_ins_9 AFTER INSERT ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END '; _stmtList.add_11rb$(element_349); var element_350 = ' CREATE TRIGGER ch_upd_9 AFTER UPDATE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END '; _stmtList.add_11rb$(element_350); var element_351 = ' CREATE TRIGGER ch_del_9 AFTER DELETE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, OLD.personUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = OLD.personUid); END '; _stmtList.add_11rb$(element_351); var element_352 = 'CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid '; _stmtList.add_11rb$(element_352); var element_353 = ' CREATE TRIGGER person_remote_insert_ins INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) /*psql ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType */; END '; _stmtList.add_11rb$(element_353); var element_354 = ' CREATE TRIGGER ch_ins_6 AFTER INSERT ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END '; _stmtList.add_11rb$(element_354); var element_355 = ' CREATE TRIGGER ch_upd_6 AFTER UPDATE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END '; _stmtList.add_11rb$(element_355); var element_356 = ' CREATE TRIGGER ch_del_6 AFTER DELETE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, OLD.clazzUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = OLD.clazzUid); END '; _stmtList.add_11rb$(element_356); var element_357 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; _stmtList.add_11rb$(element_357); var element_358 = ' CREATE TRIGGER clazz_remote_insert_ins INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) /*psql ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode */; END '; _stmtList.add_11rb$(element_358); var element_359 = ' CREATE TRIGGER ch_ins_65 AFTER INSERT ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_359); var element_360 = ' CREATE TRIGGER ch_upd_65 AFTER UPDATE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_360); var element_361 = ' CREATE TRIGGER ch_del_65 AFTER DELETE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, OLD.clazzEnrolmentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = OLD.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_361); var element_362 = 'CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid '; _stmtList.add_11rb$(element_362); var element_363 = ' CREATE TRIGGER clazzenrolment_remote_insert_ins INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) /*psql ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct */; END '; _stmtList.add_11rb$(element_363); var element_364 = ' CREATE TRIGGER ch_ins_410 AFTER INSERT ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END '; _stmtList.add_11rb$(element_364); var element_365 = ' CREATE TRIGGER ch_upd_410 AFTER UPDATE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END '; _stmtList.add_11rb$(element_365); var element_366 = ' CREATE TRIGGER ch_del_410 AFTER DELETE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, OLD.leavingReasonUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = OLD.leavingReasonUid); END '; _stmtList.add_11rb$(element_366); var element_367 = 'CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid '; _stmtList.add_11rb$(element_367); var element_368 = ' CREATE TRIGGER leavingreason_remote_insert_ins INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) /*psql ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct */; END '; _stmtList.add_11rb$(element_368); var element_369 = ' CREATE TRIGGER ch_ins_42 AFTER INSERT ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END '; _stmtList.add_11rb$(element_369); var element_370 = ' CREATE TRIGGER ch_upd_42 AFTER UPDATE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END '; _stmtList.add_11rb$(element_370); var element_371 = ' CREATE TRIGGER ch_del_42 AFTER DELETE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, OLD.contentEntryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = OLD.contentEntryUid); END '; _stmtList.add_11rb$(element_371); var element_372 = 'CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid '; _stmtList.add_11rb$(element_372); var element_373 = ' CREATE TRIGGER contententry_remote_insert_ins INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) /*psql ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct*/; END '; _stmtList.add_11rb$(element_373); var element_374 = ' CREATE TRIGGER ch_ins_3 AFTER INSERT ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END '; _stmtList.add_11rb$(element_374); var element_375 = ' CREATE TRIGGER ch_upd_3 AFTER UPDATE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END '; _stmtList.add_11rb$(element_375); var element_376 = ' CREATE TRIGGER ch_del_3 AFTER DELETE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, OLD.ceccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = OLD.ceccjUid); END '; _stmtList.add_11rb$(element_376); var element_377 = 'CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid '; _stmtList.add_11rb$(element_377); var element_378 = ' CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) /*psql ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct */; END '; _stmtList.add_11rb$(element_378); var element_379 = ' CREATE TRIGGER ch_ins_7 AFTER INSERT ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END '; _stmtList.add_11rb$(element_379); var element_380 = ' CREATE TRIGGER ch_upd_7 AFTER UPDATE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END '; _stmtList.add_11rb$(element_380); var element_381 = ' CREATE TRIGGER ch_del_7 AFTER DELETE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, OLD.cepcjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = OLD.cepcjUid); END '; _stmtList.add_11rb$(element_381); var element_382 = 'CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid '; _stmtList.add_11rb$(element_382); var element_383 = ' CREATE TRIGGER contententryparentchildjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) /*psql ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct */; END '; _stmtList.add_11rb$(element_383); var element_384 = ' CREATE TRIGGER ch_ins_8 AFTER INSERT ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END '; _stmtList.add_11rb$(element_384); var element_385 = ' CREATE TRIGGER ch_upd_8 AFTER UPDATE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END '; _stmtList.add_11rb$(element_385); var element_386 = ' CREATE TRIGGER ch_del_8 AFTER DELETE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, OLD.cerejUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = OLD.cerejUid); END '; _stmtList.add_11rb$(element_386); var element_387 = 'CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid '; _stmtList.add_11rb$(element_387); var element_388 = ' CREATE TRIGGER contententryrelatedentryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) /*psql ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct */; END '; _stmtList.add_11rb$(element_388); var element_389 = ' CREATE TRIGGER ch_ins_2 AFTER INSERT ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_389); var element_390 = ' CREATE TRIGGER ch_upd_2 AFTER UPDATE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_390); var element_391 = ' CREATE TRIGGER ch_del_2 AFTER DELETE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, OLD.contentCategorySchemaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = OLD.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_391); var element_392 = 'CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid '; _stmtList.add_11rb$(element_392); var element_393 = ' CREATE TRIGGER contentcategoryschema_remote_insert_ins INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) /*psql ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct */; END '; _stmtList.add_11rb$(element_393); var element_394 = ' CREATE TRIGGER ch_ins_1 AFTER INSERT ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END '; _stmtList.add_11rb$(element_394); var element_395 = ' CREATE TRIGGER ch_upd_1 AFTER UPDATE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END '; _stmtList.add_11rb$(element_395); var element_396 = ' CREATE TRIGGER ch_del_1 AFTER DELETE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, OLD.contentCategoryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = OLD.contentCategoryUid); END '; _stmtList.add_11rb$(element_396); var element_397 = 'CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid '; _stmtList.add_11rb$(element_397); var element_398 = ' CREATE TRIGGER contentcategory_remote_insert_ins INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) /*psql ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct */; END '; _stmtList.add_11rb$(element_398); var element_399 = ' CREATE TRIGGER ch_ins_13 AFTER INSERT ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END '; _stmtList.add_11rb$(element_399); var element_400 = ' CREATE TRIGGER ch_upd_13 AFTER UPDATE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END '; _stmtList.add_11rb$(element_400); var element_401 = ' CREATE TRIGGER ch_del_13 AFTER DELETE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, OLD.langUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = OLD.langUid); END '; _stmtList.add_11rb$(element_401); var element_402 = 'CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid '; _stmtList.add_11rb$(element_402); var element_403 = ' CREATE TRIGGER language_remote_insert_ins INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) /*psql ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct */; END '; _stmtList.add_11rb$(element_403); var element_404 = ' CREATE TRIGGER ch_ins_10 AFTER INSERT ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END '; _stmtList.add_11rb$(element_404); var element_405 = ' CREATE TRIGGER ch_upd_10 AFTER UPDATE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END '; _stmtList.add_11rb$(element_405); var element_406 = ' CREATE TRIGGER ch_del_10 AFTER DELETE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, OLD.langVariantUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = OLD.langVariantUid); END '; _stmtList.add_11rb$(element_406); var element_407 = 'CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid '; _stmtList.add_11rb$(element_407); var element_408 = ' CREATE TRIGGER languagevariant_remote_insert_ins INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) /*psql ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct */; END '; _stmtList.add_11rb$(element_408); var element_409 = ' CREATE TRIGGER ch_ins_43 AFTER INSERT ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END '; _stmtList.add_11rb$(element_409); var element_410 = ' CREATE TRIGGER ch_upd_43 AFTER UPDATE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END '; _stmtList.add_11rb$(element_410); var element_411 = ' CREATE TRIGGER ch_del_43 AFTER DELETE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, OLD.groupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = OLD.groupUid); END '; _stmtList.add_11rb$(element_411); var element_412 = 'CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid '; _stmtList.add_11rb$(element_412); var element_413 = ' CREATE TRIGGER persongroup_remote_insert_ins INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) /*psql ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag */; END '; _stmtList.add_11rb$(element_413); var element_414 = ' CREATE TRIGGER ch_ins_44 AFTER INSERT ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END '; _stmtList.add_11rb$(element_414); var element_415 = ' CREATE TRIGGER ch_upd_44 AFTER UPDATE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END '; _stmtList.add_11rb$(element_415); var element_416 = ' CREATE TRIGGER ch_del_44 AFTER DELETE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, OLD.groupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = OLD.groupMemberUid); END '; _stmtList.add_11rb$(element_416); var element_417 = 'CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid '; _stmtList.add_11rb$(element_417); var element_418 = ' CREATE TRIGGER persongroupmember_remote_insert_ins INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) /*psql ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct */; END '; _stmtList.add_11rb$(element_418); var element_419 = ' CREATE TRIGGER ch_ins_50 AFTER INSERT ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END '; _stmtList.add_11rb$(element_419); var element_420 = ' CREATE TRIGGER ch_upd_50 AFTER UPDATE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END '; _stmtList.add_11rb$(element_420); var element_421 = ' CREATE TRIGGER ch_del_50 AFTER DELETE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, OLD.personPictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = OLD.personPictureUid); END '; _stmtList.add_11rb$(element_421); var element_422 = 'CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid '; _stmtList.add_11rb$(element_422); var element_423 = ' CREATE TRIGGER personpicture_remote_insert_ins INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) /*psql ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive */; END '; _stmtList.add_11rb$(element_423); var element_424 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_PersonPicture\n | AFTER UPDATE ON PersonPicture FOR EACH ROW WHEN\n | OLD.personPictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_424); var element_425 = ' CREATE TRIGGER ch_ins_51 AFTER INSERT ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END '; _stmtList.add_11rb$(element_425); var element_426 = ' CREATE TRIGGER ch_upd_51 AFTER UPDATE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END '; _stmtList.add_11rb$(element_426); var element_427 = ' CREATE TRIGGER ch_del_51 AFTER DELETE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, OLD.containerUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = OLD.containerUid); END '; _stmtList.add_11rb$(element_427); var element_428 = 'CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid '; _stmtList.add_11rb$(element_428); var element_429 = ' CREATE TRIGGER container_remote_insert_ins INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) /*psql ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries */; END '; _stmtList.add_11rb$(element_429); var element_430 = ' CREATE TRIGGER ch_ins_62 AFTER INSERT ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END '; _stmtList.add_11rb$(element_430); var element_431 = ' CREATE TRIGGER ch_upd_62 AFTER UPDATE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END '; _stmtList.add_11rb$(element_431); var element_432 = ' CREATE TRIGGER ch_del_62 AFTER DELETE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, OLD.verbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = OLD.verbUid); END '; _stmtList.add_11rb$(element_432); var element_433 = 'CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid '; _stmtList.add_11rb$(element_433); var element_434 = ' CREATE TRIGGER verbentity_remote_insert_ins INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) /*psql ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct */; END '; _stmtList.add_11rb$(element_434); var element_435 = ' CREATE TRIGGER ch_ins_64 AFTER INSERT ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END '; _stmtList.add_11rb$(element_435); var element_436 = ' CREATE TRIGGER ch_upd_64 AFTER UPDATE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END '; _stmtList.add_11rb$(element_436); var element_437 = ' CREATE TRIGGER ch_del_64 AFTER DELETE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, OLD.xObjectUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = OLD.xObjectUid); END '; _stmtList.add_11rb$(element_437); var element_438 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; _stmtList.add_11rb$(element_438); var element_439 = ' CREATE TRIGGER xobjectentity_remote_insert_ins INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) /*psql ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct */; END '; _stmtList.add_11rb$(element_439); var element_440 = ' CREATE TRIGGER ch_ins_60 AFTER INSERT ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END '; _stmtList.add_11rb$(element_440); var element_441 = ' CREATE TRIGGER ch_upd_60 AFTER UPDATE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END '; _stmtList.add_11rb$(element_441); var element_442 = ' CREATE TRIGGER ch_del_60 AFTER DELETE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, OLD.statementUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = OLD.statementUid); END '; _stmtList.add_11rb$(element_442); var element_443 = 'CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid '; _stmtList.add_11rb$(element_443); var element_444 = ' CREATE TRIGGER statemententity_remote_insert_ins INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) /*psql ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid */; END '; _stmtList.add_11rb$(element_444); var element_445 = ' CREATE TRIGGER ch_ins_66 AFTER INSERT ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_445); var element_446 = ' CREATE TRIGGER ch_upd_66 AFTER UPDATE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_446); var element_447 = ' CREATE TRIGGER ch_del_66 AFTER DELETE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, OLD.contextXObjectStatementJoinUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = OLD.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_447); var element_448 = 'CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid '; _stmtList.add_11rb$(element_448); var element_449 = ' CREATE TRIGGER contextxobjectstatementjoin_remote_insert_ins INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) /*psql ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct */; END '; _stmtList.add_11rb$(element_449); var element_450 = ' CREATE TRIGGER ch_ins_68 AFTER INSERT ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END '; _stmtList.add_11rb$(element_450); var element_451 = ' CREATE TRIGGER ch_upd_68 AFTER UPDATE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END '; _stmtList.add_11rb$(element_451); var element_452 = ' CREATE TRIGGER ch_del_68 AFTER DELETE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, OLD.agentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = OLD.agentUid); END '; _stmtList.add_11rb$(element_452); var element_453 = 'CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid '; _stmtList.add_11rb$(element_453); var element_454 = ' CREATE TRIGGER agententity_remote_insert_ins INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) /*psql ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct*/; END '; _stmtList.add_11rb$(element_454); var element_455 = ' CREATE TRIGGER ch_ins_70 AFTER INSERT ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END '; _stmtList.add_11rb$(element_455); var element_456 = ' CREATE TRIGGER ch_upd_70 AFTER UPDATE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END '; _stmtList.add_11rb$(element_456); var element_457 = ' CREATE TRIGGER ch_del_70 AFTER DELETE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, OLD.stateUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = OLD.stateUid); END '; _stmtList.add_11rb$(element_457); var element_458 = 'CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid '; _stmtList.add_11rb$(element_458); var element_459 = ' CREATE TRIGGER stateentity_remote_insert_ins INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) /*psql ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct */; END '; _stmtList.add_11rb$(element_459); var element_460 = ' CREATE TRIGGER ch_ins_72 AFTER INSERT ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END '; _stmtList.add_11rb$(element_460); var element_461 = ' CREATE TRIGGER ch_upd_72 AFTER UPDATE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END '; _stmtList.add_11rb$(element_461); var element_462 = ' CREATE TRIGGER ch_del_72 AFTER DELETE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, OLD.stateContentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = OLD.stateContentUid); END '; _stmtList.add_11rb$(element_462); var element_463 = 'CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid '; _stmtList.add_11rb$(element_463); var element_464 = ' CREATE TRIGGER statecontententity_remote_insert_ins INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) /*psql ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct */; END '; _stmtList.add_11rb$(element_464); var element_465 = ' CREATE TRIGGER ch_ins_74 AFTER INSERT ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END '; _stmtList.add_11rb$(element_465); var element_466 = ' CREATE TRIGGER ch_upd_74 AFTER UPDATE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END '; _stmtList.add_11rb$(element_466); var element_467 = ' CREATE TRIGGER ch_del_74 AFTER DELETE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, OLD.statementLangMapUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = OLD.statementLangMapUid); END '; _stmtList.add_11rb$(element_467); var element_468 = 'CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid '; _stmtList.add_11rb$(element_468); var element_469 = ' CREATE TRIGGER xlangmapentry_remote_insert_ins INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) /*psql ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct */; END '; _stmtList.add_11rb$(element_469); var element_470 = ' CREATE TRIGGER ch_ins_164 AFTER INSERT ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END '; _stmtList.add_11rb$(element_470); var element_471 = ' CREATE TRIGGER ch_upd_164 AFTER UPDATE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END '; _stmtList.add_11rb$(element_471); var element_472 = ' CREATE TRIGGER ch_del_164 AFTER DELETE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, OLD.schoolUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = OLD.schoolUid); END '; _stmtList.add_11rb$(element_472); var element_473 = 'CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid '; _stmtList.add_11rb$(element_473); var element_474 = ' CREATE TRIGGER school_remote_insert_ins INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW BEGIN REPLACE INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) /*psql ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone */; END '; _stmtList.add_11rb$(element_474); var element_475 = ' CREATE TRIGGER ch_ins_200 AFTER INSERT ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END '; _stmtList.add_11rb$(element_475); var element_476 = ' CREATE TRIGGER ch_upd_200 AFTER UPDATE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END '; _stmtList.add_11rb$(element_476); var element_477 = ' CREATE TRIGGER ch_del_200 AFTER DELETE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, OLD.schoolMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = OLD.schoolMemberUid); END '; _stmtList.add_11rb$(element_477); var element_478 = 'CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid '; _stmtList.add_11rb$(element_478); var element_479 = ' CREATE TRIGGER schoolmember_remote_insert_ins INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) /*psql ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct */; END '; _stmtList.add_11rb$(element_479); var element_480 = ' CREATE TRIGGER ch_ins_208 AFTER INSERT ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END '; _stmtList.add_11rb$(element_480); var element_481 = ' CREATE TRIGGER ch_upd_208 AFTER UPDATE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END '; _stmtList.add_11rb$(element_481); var element_482 = ' CREATE TRIGGER ch_del_208 AFTER DELETE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, OLD.commentsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = OLD.commentsUid); END '; _stmtList.add_11rb$(element_482); var element_483 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; _stmtList.add_11rb$(element_483); var element_484 = ' CREATE TRIGGER comments_remote_insert_ins INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) /*psql ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct */; END '; _stmtList.add_11rb$(element_484); var element_485 = ' CREATE TRIGGER ch_ins_101 AFTER INSERT ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; _stmtList.add_11rb$(element_485); var element_486 = ' CREATE TRIGGER ch_upd_101 AFTER UPDATE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; _stmtList.add_11rb$(element_486); var element_487 = ' CREATE TRIGGER ch_del_101 AFTER DELETE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, OLD.reportUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = OLD.reportUid); END '; _stmtList.add_11rb$(element_487); var element_488 = 'CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid '; _stmtList.add_11rb$(element_488); var element_489 = ' CREATE TRIGGER report_remote_insert_ins INSTEAD OF INSERT ON Report_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Report(reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES (NEW.reportUid, NEW.reportOwnerUid, NEW.xAxis, NEW.reportDateRangeSelection, NEW.fromDate, NEW.fromRelTo, NEW.fromRelOffSet, NEW.fromRelUnit, NEW.toDate, NEW.toRelTo, NEW.toRelOffSet, NEW.toRelUnit, NEW.reportTitle, NEW.reportDescription, NEW.reportSeries, NEW.reportInactive, NEW.isTemplate, NEW.priority, NEW.reportTitleId, NEW.reportDescId, NEW.reportMasterChangeSeqNum, NEW.reportLocalChangeSeqNum, NEW.reportLastChangedBy, NEW.reportLct) /*psql ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = EXCLUDED.reportOwnerUid, xAxis = EXCLUDED.xAxis, reportDateRangeSelection = EXCLUDED.reportDateRangeSelection, fromDate = EXCLUDED.fromDate, fromRelTo = EXCLUDED.fromRelTo, fromRelOffSet = EXCLUDED.fromRelOffSet, fromRelUnit = EXCLUDED.fromRelUnit, toDate = EXCLUDED.toDate, toRelTo = EXCLUDED.toRelTo, toRelOffSet = EXCLUDED.toRelOffSet, toRelUnit = EXCLUDED.toRelUnit, reportTitle = EXCLUDED.reportTitle, reportDescription = EXCLUDED.reportDescription, reportSeries = EXCLUDED.reportSeries, reportInactive = EXCLUDED.reportInactive, isTemplate = EXCLUDED.isTemplate, priority = EXCLUDED.priority, reportTitleId = EXCLUDED.reportTitleId, reportDescId = EXCLUDED.reportDescId, reportMasterChangeSeqNum = EXCLUDED.reportMasterChangeSeqNum, reportLocalChangeSeqNum = EXCLUDED.reportLocalChangeSeqNum, reportLastChangedBy = EXCLUDED.reportLastChangedBy, reportLct = EXCLUDED.reportLct */; END '; _stmtList.add_11rb$(element_489); var element_490 = ' CREATE TRIGGER ch_ins_189 AFTER INSERT ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END '; _stmtList.add_11rb$(element_490); var element_491 = ' CREATE TRIGGER ch_upd_189 AFTER UPDATE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END '; _stmtList.add_11rb$(element_491); var element_492 = ' CREATE TRIGGER ch_del_189 AFTER DELETE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, OLD.siteUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = OLD.siteUid); END '; _stmtList.add_11rb$(element_492); var element_493 = 'CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid '; _stmtList.add_11rb$(element_493); var element_494 = ' CREATE TRIGGER site_remote_insert_ins INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) /*psql ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt*/; END '; _stmtList.add_11rb$(element_494); var element_495 = ' CREATE TRIGGER ch_ins_301 AFTER INSERT ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END '; _stmtList.add_11rb$(element_495); var element_496 = ' CREATE TRIGGER ch_upd_301 AFTER UPDATE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END '; _stmtList.add_11rb$(element_496); var element_497 = ' CREATE TRIGGER ch_del_301 AFTER DELETE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, OLD.learnerGroupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = OLD.learnerGroupUid); END '; _stmtList.add_11rb$(element_497); var element_498 = 'CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid '; _stmtList.add_11rb$(element_498); var element_499 = ' CREATE TRIGGER learnergroup_remote_insert_ins INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) /*psql ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct */; END '; _stmtList.add_11rb$(element_499); var element_500 = ' CREATE TRIGGER ch_ins_300 AFTER INSERT ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_500); var element_501 = ' CREATE TRIGGER ch_upd_300 AFTER UPDATE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_501); var element_502 = ' CREATE TRIGGER ch_del_300 AFTER DELETE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, OLD.learnerGroupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = OLD.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_502); var element_503 = 'CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid '; _stmtList.add_11rb$(element_503); var element_504 = ' CREATE TRIGGER learnergroupmember_remote_insert_ins INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) /*psql ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct */; END '; _stmtList.add_11rb$(element_504); var element_505 = ' CREATE TRIGGER ch_ins_302 AFTER INSERT ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_505); var element_506 = ' CREATE TRIGGER ch_upd_302 AFTER UPDATE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_506); var element_507 = ' CREATE TRIGGER ch_del_302 AFTER DELETE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, OLD.groupLearningSessionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = OLD.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_507); var element_508 = 'CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid '; _stmtList.add_11rb$(element_508); var element_509 = ' CREATE TRIGGER grouplearningsession_remote_insert_ins INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) /*psql ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct */; END '; _stmtList.add_11rb$(element_509); var element_510 = ' CREATE TRIGGER ch_ins_272 AFTER INSERT ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END '; _stmtList.add_11rb$(element_510); var element_511 = ' CREATE TRIGGER ch_upd_272 AFTER UPDATE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END '; _stmtList.add_11rb$(element_511); var element_512 = ' CREATE TRIGGER ch_del_272 AFTER DELETE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, OLD.sTermsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = OLD.sTermsUid); END '; _stmtList.add_11rb$(element_512); var element_513 = 'CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid '; _stmtList.add_11rb$(element_513); var element_514 = ' CREATE TRIGGER siteterms_remote_insert_ins INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) /*psql ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct */; END '; _stmtList.add_11rb$(element_514); var element_515 = ' CREATE TRIGGER ch_ins_134 AFTER INSERT ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END '; _stmtList.add_11rb$(element_515); var element_516 = ' CREATE TRIGGER ch_upd_134 AFTER UPDATE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END '; _stmtList.add_11rb$(element_516); var element_517 = ' CREATE TRIGGER ch_del_134 AFTER DELETE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, OLD.ccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = OLD.ccjUid); END '; _stmtList.add_11rb$(element_517); var element_518 = 'CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid '; _stmtList.add_11rb$(element_518); var element_519 = ' CREATE TRIGGER clazzcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) /*psql ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct */; END '; _stmtList.add_11rb$(element_519); var element_520 = ' CREATE TRIGGER ch_ins_512 AFTER INSERT ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END '; _stmtList.add_11rb$(element_520); var element_521 = ' CREATE TRIGGER ch_upd_512 AFTER UPDATE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END '; _stmtList.add_11rb$(element_521); var element_522 = ' CREATE TRIGGER ch_del_512 AFTER DELETE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, OLD.ppjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = OLD.ppjUid); END '; _stmtList.add_11rb$(element_522); var element_523 = 'CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid '; _stmtList.add_11rb$(element_523); var element_524 = ' CREATE TRIGGER personparentjoin_remote_insert_ins INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) /*psql ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr */; END '; _stmtList.add_11rb$(element_524); var element_525 = ' CREATE TRIGGER ch_ins_48 AFTER INSERT ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END '; _stmtList.add_11rb$(element_525); var element_526 = ' CREATE TRIGGER ch_upd_48 AFTER UPDATE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END '; _stmtList.add_11rb$(element_526); var element_527 = ' CREATE TRIGGER ch_del_48 AFTER DELETE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, OLD.sgUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = OLD.sgUid); END '; _stmtList.add_11rb$(element_527); var element_528 = 'CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid '; _stmtList.add_11rb$(element_528); var element_529 = ' CREATE TRIGGER sg_remote_insert_ins INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) /*psql ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions */ ; END '; _stmtList.add_11rb$(element_529); var element_530 = ' CREATE TRIGGER ch_ins_419 AFTER INSERT ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END '; _stmtList.add_11rb$(element_530); var element_531 = ' CREATE TRIGGER ch_upd_419 AFTER UPDATE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END '; _stmtList.add_11rb$(element_531); var element_532 = ' CREATE TRIGGER ch_del_419 AFTER DELETE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, OLD.errUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = OLD.errUid); END '; _stmtList.add_11rb$(element_532); var element_533 = 'CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid '; _stmtList.add_11rb$(element_533); var element_534 = ' CREATE TRIGGER errorreport_remote_insert_ins INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) /*psql ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message */; END '; _stmtList.add_11rb$(element_534); var element_535 = ' CREATE TRIGGER ch_ins_520 AFTER INSERT ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END '; _stmtList.add_11rb$(element_535); var element_536 = ' CREATE TRIGGER ch_upd_520 AFTER UPDATE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END '; _stmtList.add_11rb$(element_536); var element_537 = ' CREATE TRIGGER ch_del_520 AFTER DELETE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, OLD.caUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = OLD.caUid); END '; _stmtList.add_11rb$(element_537); var element_538 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; _stmtList.add_11rb$(element_538); var element_539 = ' CREATE TRIGGER clazzassignment_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) /*psql ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct */; END '; _stmtList.add_11rb$(element_539); var element_540 = ' CREATE TRIGGER ch_ins_521 AFTER INSERT ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; _stmtList.add_11rb$(element_540); var element_541 = ' CREATE TRIGGER ch_upd_521 AFTER UPDATE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; _stmtList.add_11rb$(element_541); var element_542 = ' CREATE TRIGGER ch_del_521 AFTER DELETE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, OLD.cacjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = OLD.cacjUid); END '; _stmtList.add_11rb$(element_542); var element_543 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; _stmtList.add_11rb$(element_543); var element_544 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive,cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjWeight, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) /*psql ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjWeight = EXCLUDED.cacjWeight, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct */; END '; _stmtList.add_11rb$(element_544); var element_545 = ' CREATE TRIGGER ch_ins_522 AFTER INSERT ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END '; _stmtList.add_11rb$(element_545); var element_546 = ' CREATE TRIGGER ch_upd_522 AFTER UPDATE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END '; _stmtList.add_11rb$(element_546); var element_547 = ' CREATE TRIGGER ch_del_522 AFTER DELETE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, OLD.casUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = OLD.casUid); END '; _stmtList.add_11rb$(element_547); var element_548 = 'CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid '; _stmtList.add_11rb$(element_548); var element_549 = ' CREATE TRIGGER courseassignmentsubmission_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) /*psql ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp */; END '; _stmtList.add_11rb$(element_549); var element_550 = ' CREATE TRIGGER ch_ins_90 AFTER INSERT ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END '; _stmtList.add_11rb$(element_550); var element_551 = ' CREATE TRIGGER ch_upd_90 AFTER UPDATE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END '; _stmtList.add_11rb$(element_551); var element_552 = ' CREATE TRIGGER ch_del_90 AFTER DELETE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, OLD.casaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = OLD.casaUid); END '; _stmtList.add_11rb$(element_552); var element_553 = 'CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid '; _stmtList.add_11rb$(element_553); var element_554 = ' CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType,casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaFileName, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) /*psql ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaFileName = EXCLUDED.casaFileName, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp */; END '; _stmtList.add_11rb$(element_554); var element_555 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_CourseAssignmentSubmissionAttachment\n | AFTER UPDATE ON CourseAssignmentSubmissionAttachment FOR EACH ROW WHEN\n | OLD.casaMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_555); var element_556 = ' CREATE TRIGGER ch_ins_523 AFTER INSERT ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END '; _stmtList.add_11rb$(element_556); var element_557 = ' CREATE TRIGGER ch_upd_523 AFTER UPDATE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END '; _stmtList.add_11rb$(element_557); var element_558 = ' CREATE TRIGGER ch_del_523 AFTER DELETE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, OLD.camUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = OLD.camUid); END '; _stmtList.add_11rb$(element_558); var element_559 = 'CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid '; _stmtList.add_11rb$(element_559); var element_560 = ' CREATE TRIGGER courseassignmentmark_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) /*psql ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct */; END '; _stmtList.add_11rb$(element_560); var element_561 = ' CREATE TRIGGER ch_ins_678 AFTER INSERT ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END '; _stmtList.add_11rb$(element_561); var element_562 = ' CREATE TRIGGER ch_upd_678 AFTER UPDATE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END '; _stmtList.add_11rb$(element_562); var element_563 = ' CREATE TRIGGER ch_del_678 AFTER DELETE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, OLD.pauthUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = OLD.pauthUid); END '; _stmtList.add_11rb$(element_563); var element_564 = 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid '; _stmtList.add_11rb$(element_564); var element_565 = ' CREATE TRIGGER personauth2_remote_insert_ins INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) /*psql ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct */; END '; _stmtList.add_11rb$(element_565); var element_566 = ' CREATE TRIGGER ch_ins_679 AFTER INSERT ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END '; _stmtList.add_11rb$(element_566); var element_567 = ' CREATE TRIGGER ch_upd_679 AFTER UPDATE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END '; _stmtList.add_11rb$(element_567); var element_568 = ' CREATE TRIGGER ch_del_679 AFTER DELETE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, OLD.usUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = OLD.usUid); END '; _stmtList.add_11rb$(element_568); var element_569 = 'CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid '; _stmtList.add_11rb$(element_569); var element_570 = ' CREATE TRIGGER usersession_remote_insert_ins INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) /*psql ON CONFLICT (usUid) DO UPDATE SET usPcsn = EXCLUDED.usPcsn, usLcsn = EXCLUDED.usLcsn, usLcb = EXCLUDED.usLcb, usLct = EXCLUDED.usLct, usPersonUid = EXCLUDED.usPersonUid, usClientNodeId = EXCLUDED.usClientNodeId, usStartTime = EXCLUDED.usStartTime, usEndTime = EXCLUDED.usEndTime, usStatus = EXCLUDED.usStatus, usReason = EXCLUDED.usReason, usAuth = EXCLUDED.usAuth, usSessionType = EXCLUDED.usSessionType */; END '; _stmtList.add_11rb$(element_570); var element_571 = ' CREATE TRIGGER ch_ins_124 AFTER INSERT ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END '; _stmtList.add_11rb$(element_571); var element_572 = ' CREATE TRIGGER ch_upd_124 AFTER UPDATE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END '; _stmtList.add_11rb$(element_572); var element_573 = ' CREATE TRIGGER ch_del_124 AFTER DELETE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, OLD.cbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = OLD.cbUid); END '; _stmtList.add_11rb$(element_573); var element_574 = 'CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid '; _stmtList.add_11rb$(element_574); var element_575 = ' CREATE TRIGGER courseblock_remote_insert_ins INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) /*psql ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct */; END '; _stmtList.add_11rb$(element_575); var element_576 = ' CREATE TRIGGER ch_ins_450 AFTER INSERT ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END '; _stmtList.add_11rb$(element_576); var element_577 = ' CREATE TRIGGER ch_upd_450 AFTER UPDATE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END '; _stmtList.add_11rb$(element_577); var element_578 = ' CREATE TRIGGER ch_del_450 AFTER DELETE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, OLD.ctUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = OLD.ctUid); END '; _stmtList.add_11rb$(element_578); var element_579 = 'CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid '; _stmtList.add_11rb$(element_579); var element_580 = ' CREATE TRIGGER courseterminology_remote_insert_ins INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) /*psql ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct */; END '; _stmtList.add_11rb$(element_580); var element_581 = ' CREATE TRIGGER ch_ins_242 AFTER INSERT ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END '; _stmtList.add_11rb$(element_581); var element_582 = ' CREATE TRIGGER ch_upd_242 AFTER UPDATE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END '; _stmtList.add_11rb$(element_582); var element_583 = ' CREATE TRIGGER ch_del_242 AFTER DELETE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, OLD.cgsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = OLD.cgsUid); END '; _stmtList.add_11rb$(element_583); var element_584 = 'CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid '; _stmtList.add_11rb$(element_584); var element_585 = ' CREATE TRIGGER coursegroupset_remote_insert_ins INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) /*psql ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct */; END '; _stmtList.add_11rb$(element_585); var element_586 = ' CREATE TRIGGER ch_ins_243 AFTER INSERT ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END '; _stmtList.add_11rb$(element_586); var element_587 = ' CREATE TRIGGER ch_upd_243 AFTER UPDATE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END '; _stmtList.add_11rb$(element_587); var element_588 = ' CREATE TRIGGER ch_del_243 AFTER DELETE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, OLD.cgmUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = OLD.cgmUid); END '; _stmtList.add_11rb$(element_588); var element_589 = 'CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid '; _stmtList.add_11rb$(element_589); var element_590 = ' CREATE TRIGGER coursegroupmember_remote_insert_ins INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) /*psql ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct */; END '; _stmtList.add_11rb$(element_590); var element_591 = ' CREATE TRIGGER ch_ins_125 AFTER INSERT ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END '; _stmtList.add_11rb$(element_591); var element_592 = ' CREATE TRIGGER ch_upd_125 AFTER UPDATE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END '; _stmtList.add_11rb$(element_592); var element_593 = ' CREATE TRIGGER ch_del_125 AFTER DELETE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, OLD.coursePictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = OLD.coursePictureUid); END '; _stmtList.add_11rb$(element_593); var element_594 = 'CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid '; _stmtList.add_11rb$(element_594); var element_595 = ' CREATE TRIGGER coursepicture_remote_insert_ins INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) /*psql ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive */; END '; _stmtList.add_11rb$(element_595); var element_596 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_CoursePicture\n | AFTER UPDATE ON CoursePicture FOR EACH ROW WHEN\n | OLD.coursePictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_596); var element_597 = ' CREATE TRIGGER ch_ins_138 AFTER INSERT ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END '; _stmtList.add_11rb$(element_597); var element_598 = ' CREATE TRIGGER ch_upd_138 AFTER UPDATE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END '; _stmtList.add_11rb$(element_598); var element_599 = ' CREATE TRIGGER ch_del_138 AFTER DELETE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, OLD.cepUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = OLD.cepUid); END '; _stmtList.add_11rb$(element_599); var element_600 = 'CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid '; _stmtList.add_11rb$(element_600); var element_601 = ' CREATE TRIGGER ceppicture_remote_insert_ins INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) /*psql ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive */; END '; _stmtList.add_11rb$(element_601); var element_602 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_ContentEntryPicture\n | AFTER UPDATE ON ContentEntryPicture FOR EACH ROW WHEN\n | OLD.cepMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_602); var element_603 = ' CREATE TRIGGER ch_ins_127 AFTER INSERT ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END '; _stmtList.add_11rb$(element_603); var element_604 = ' CREATE TRIGGER ch_upd_127 AFTER UPDATE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END '; _stmtList.add_11rb$(element_604); var element_605 = ' CREATE TRIGGER ch_del_127 AFTER DELETE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, OLD.chatUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = OLD.chatUid); END '; _stmtList.add_11rb$(element_605); var element_606 = 'CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid '; _stmtList.add_11rb$(element_606); var element_607 = ' CREATE TRIGGER chat_remote_insert_ins INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) /*psql ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct */ ; END '; _stmtList.add_11rb$(element_607); var element_608 = ' CREATE TRIGGER ch_ins_128 AFTER INSERT ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END '; _stmtList.add_11rb$(element_608); var element_609 = ' CREATE TRIGGER ch_upd_128 AFTER UPDATE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END '; _stmtList.add_11rb$(element_609); var element_610 = ' CREATE TRIGGER ch_del_128 AFTER DELETE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, OLD.chatMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = OLD.chatMemberUid); END '; _stmtList.add_11rb$(element_610); var element_611 = 'CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid '; _stmtList.add_11rb$(element_611); var element_612 = ' CREATE TRIGGER chatmember_remote_insert_ins INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) /*psql ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct */ ; END '; _stmtList.add_11rb$(element_612); var element_613 = ' CREATE TRIGGER ch_ins_126 AFTER INSERT ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END '; _stmtList.add_11rb$(element_613); var element_614 = ' CREATE TRIGGER ch_upd_126 AFTER UPDATE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END '; _stmtList.add_11rb$(element_614); var element_615 = ' CREATE TRIGGER ch_del_126 AFTER DELETE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, OLD.messageUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = OLD.messageUid); END '; _stmtList.add_11rb$(element_615); var element_616 = 'CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid '; _stmtList.add_11rb$(element_616); var element_617 = ' CREATE TRIGGER message_remote_insert_ins INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) /*psql ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct */ ; END '; _stmtList.add_11rb$(element_617); var element_618 = ' CREATE TRIGGER ch_ins_129 AFTER INSERT ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END '; _stmtList.add_11rb$(element_618); var element_619 = ' CREATE TRIGGER ch_upd_129 AFTER UPDATE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END '; _stmtList.add_11rb$(element_619); var element_620 = ' CREATE TRIGGER ch_del_129 AFTER DELETE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, OLD.messageReadUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = OLD.messageReadUid); END '; _stmtList.add_11rb$(element_620); var element_621 = 'CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid '; _stmtList.add_11rb$(element_621); var element_622 = ' CREATE TRIGGER messageread_remote_insert_ins INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW BEGIN REPLACE INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) /*psql ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct */ ; END '; _stmtList.add_11rb$(element_622); var element_623 = ' CREATE TRIGGER ch_ins_130 AFTER INSERT ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END '; _stmtList.add_11rb$(element_623); var element_624 = ' CREATE TRIGGER ch_upd_130 AFTER UPDATE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END '; _stmtList.add_11rb$(element_624); var element_625 = ' CREATE TRIGGER ch_del_130 AFTER DELETE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, OLD.courseDiscussionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = OLD.courseDiscussionUid); END '; _stmtList.add_11rb$(element_625); var element_626 = 'CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid '; _stmtList.add_11rb$(element_626); var element_627 = ' CREATE TRIGGER coursediscussion_remote_insert_ins INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) /*psql ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct */ ; END '; _stmtList.add_11rb$(element_627); var element_628 = ' CREATE TRIGGER ch_ins_131 AFTER INSERT ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END '; _stmtList.add_11rb$(element_628); var element_629 = ' CREATE TRIGGER ch_upd_131 AFTER UPDATE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END '; _stmtList.add_11rb$(element_629); var element_630 = ' CREATE TRIGGER ch_del_131 AFTER DELETE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, OLD.discussionTopicUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = OLD.discussionTopicUid); END '; _stmtList.add_11rb$(element_630); var element_631 = 'CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid '; _stmtList.add_11rb$(element_631); var element_632 = ' CREATE TRIGGER discussiontopic_remote_insert_ins INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) /*psql ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct */ ; END '; _stmtList.add_11rb$(element_632); var element_633 = ' CREATE TRIGGER ch_ins_132 AFTER INSERT ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END '; _stmtList.add_11rb$(element_633); var element_634 = ' CREATE TRIGGER ch_upd_132 AFTER UPDATE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END '; _stmtList.add_11rb$(element_634); var element_635 = ' CREATE TRIGGER ch_del_132 AFTER DELETE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, OLD.discussionPostUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = OLD.discussionPostUid); END '; _stmtList.add_11rb$(element_635); var element_636 = 'CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid '; _stmtList.add_11rb$(element_636); var element_637 = ' CREATE TRIGGER discussionpost_remote_insert_ins INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) /*psql ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct */ ; END '; _stmtList.add_11rb$(element_637); break; case 2: var element_638 = 'CREATE TABLE IF NOT EXISTS _doorwayinfo (dbVersion int primary key, dbHash varchar(255))'; _stmtList.add_11rb$(element_638); var element_639 = "INSERT INTO _doorwayinfo VALUES (106, '')"; _stmtList.add_11rb$(element_639); var element_640 = 'CREATE TABLE IF NOT EXISTS NetworkNode ( bluetoothMacAddress TEXT , ipAddress TEXT , wifiDirectMacAddress TEXT , deviceWifiDirectName TEXT , endpointUrl TEXT , lastUpdateTimeStamp BIGINT NOT NULL , networkServiceLastUpdated BIGINT NOT NULL , nsdServiceName TEXT , port INTEGER NOT NULL , numFailureCount INTEGER NOT NULL , wifiDirectDeviceStatus INTEGER NOT NULL , groupSsid TEXT , nodeId BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_640); var element_641 = 'CREATE INDEX index_NetworkNode_bluetoothMacAddress ON NetworkNode (bluetoothMacAddress)'; _stmtList.add_11rb$(element_641); var element_642 = 'CREATE INDEX index_NetworkNode_lastUpdateTimeStamp ON NetworkNode (lastUpdateTimeStamp)'; _stmtList.add_11rb$(element_642); var element_643 = 'CREATE TABLE IF NOT EXISTS ClazzLog ( clazzLogClazzUid BIGINT NOT NULL , logDate BIGINT NOT NULL , timeRecorded BIGINT NOT NULL , clazzLogDone BOOL NOT NULL , cancellationNote TEXT , clazzLogCancelled BOOL NOT NULL , clazzLogNumPresent INTEGER NOT NULL , clazzLogNumAbsent INTEGER NOT NULL , clazzLogNumPartial INTEGER NOT NULL , clazzLogScheduleUid BIGINT NOT NULL , clazzLogStatusFlag INTEGER NOT NULL , clazzLogMSQN BIGINT NOT NULL , clazzLogLCSN BIGINT NOT NULL , clazzLogLCB INTEGER NOT NULL , clazzLogLastChangedTime BIGINT NOT NULL , clazzLogUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_643); var element_644 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecord ( clazzLogAttendanceRecordClazzLogUid BIGINT NOT NULL , clazzLogAttendanceRecordPersonUid BIGINT NOT NULL , attendanceStatus INTEGER NOT NULL , clazzLogAttendanceRecordMasterChangeSeqNum BIGINT NOT NULL , clazzLogAttendanceRecordLocalChangeSeqNum BIGINT NOT NULL , clazzLogAttendanceRecordLastChangedBy INTEGER NOT NULL , clazzLogAttendanceRecordLastChangedTime BIGINT NOT NULL , clazzLogAttendanceRecordUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_644); var element_645 = 'CREATE TABLE IF NOT EXISTS Schedule ( sceduleStartTime BIGINT NOT NULL , scheduleEndTime BIGINT NOT NULL , scheduleDay INTEGER NOT NULL , scheduleMonth INTEGER NOT NULL , scheduleFrequency INTEGER NOT NULL , umCalendarUid BIGINT NOT NULL , scheduleClazzUid BIGINT NOT NULL , scheduleMasterChangeSeqNum BIGINT NOT NULL , scheduleLocalChangeSeqNum BIGINT NOT NULL , scheduleLastChangedBy INTEGER NOT NULL , scheduleLastChangedTime BIGINT NOT NULL , scheduleActive BOOL NOT NULL , scheduleUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_645); var element_646 = 'CREATE TABLE IF NOT EXISTS DateRange ( dateRangeLocalChangeSeqNum BIGINT NOT NULL , dateRangeMasterChangeSeqNum BIGINT NOT NULL , dateRangLastChangedBy INTEGER NOT NULL , dateRangeLct BIGINT NOT NULL , dateRangeFromDate BIGINT NOT NULL , dateRangeToDate BIGINT NOT NULL , dateRangeUMCalendarUid BIGINT NOT NULL , dateRangeName TEXT , dateRangeDesc TEXT , dateRangeActive BOOL NOT NULL , dateRangeUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_646); var element_647 = 'CREATE TABLE IF NOT EXISTS HolidayCalendar ( umCalendarName TEXT , umCalendarCategory INTEGER NOT NULL , umCalendarActive BOOL NOT NULL , umCalendarMasterChangeSeqNum BIGINT NOT NULL , umCalendarLocalChangeSeqNum BIGINT NOT NULL , umCalendarLastChangedBy INTEGER NOT NULL , umCalendarLct BIGINT NOT NULL , umCalendarUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_647); var element_648 = 'CREATE TABLE IF NOT EXISTS Holiday ( holMasterCsn BIGINT NOT NULL , holLocalCsn BIGINT NOT NULL , holLastModBy INTEGER NOT NULL , holLct BIGINT NOT NULL , holActive BOOL NOT NULL , holHolidayCalendarUid BIGINT NOT NULL , holStartTime BIGINT NOT NULL , holEndTime BIGINT NOT NULL , holName TEXT , holUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_648); var element_649 = 'CREATE TABLE IF NOT EXISTS ScheduledCheck ( checkTime BIGINT NOT NULL , checkType INTEGER NOT NULL , checkUuid TEXT , checkParameters TEXT , scClazzLogUid BIGINT NOT NULL , scheduledCheckMasterCsn BIGINT NOT NULL , scheduledCheckLocalCsn BIGINT NOT NULL , scheduledCheckLastChangedBy INTEGER NOT NULL , scheduledCheckLct BIGINT NOT NULL , scheduledCheckUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_649); var element_650 = 'CREATE TABLE IF NOT EXISTS AuditLog ( auditLogMasterChangeSeqNum BIGINT NOT NULL , auditLogLocalChangeSeqNum BIGINT NOT NULL , auditLogLastChangedBy INTEGER NOT NULL , auditLogLct BIGINT NOT NULL , auditLogActorPersonUid BIGINT NOT NULL , auditLogTableUid INTEGER NOT NULL , auditLogEntityUid BIGINT NOT NULL , auditLogDate BIGINT NOT NULL , notes TEXT , auditLogUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_650); var element_651 = 'CREATE TABLE IF NOT EXISTS CustomField ( customFieldName TEXT , customFieldNameAlt TEXT , customFieldLabelMessageID INTEGER NOT NULL , customFieldIcon TEXT , customFieldIconId INTEGER NOT NULL , actionOnClick TEXT , customFieldType INTEGER NOT NULL , customFieldEntityType INTEGER NOT NULL , customFieldActive BOOL NOT NULL , customFieldDefaultValue TEXT , customFieldMCSN BIGINT NOT NULL , customFieldLCSN BIGINT NOT NULL , customFieldLCB INTEGER NOT NULL , customFieldLct BIGINT NOT NULL , customFieldInputType INTEGER NOT NULL , customFieldUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_651); var element_652 = 'CREATE TABLE IF NOT EXISTS CustomFieldValue ( customFieldValueFieldUid BIGINT NOT NULL , customFieldValueEntityUid BIGINT NOT NULL , customFieldValueValue TEXT , customFieldValueCustomFieldValueOptionUid BIGINT NOT NULL , customFieldValueMCSN BIGINT NOT NULL , customFieldValueLCSN BIGINT NOT NULL , customFieldValueLCB INTEGER NOT NULL , customFieldLct BIGINT NOT NULL , customFieldValueUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_652); var element_653 = 'CREATE TABLE IF NOT EXISTS CustomFieldValueOption ( customFieldValueOptionName TEXT , customFieldValueOptionFieldUid BIGINT NOT NULL , customFieldValueOptionIcon TEXT , customFieldValueOptionMessageId INTEGER NOT NULL , customFieldValueOptionActive BOOL NOT NULL , customFieldValueOptionMCSN BIGINT NOT NULL , customFieldValueOptionLCSN BIGINT NOT NULL , customFieldValueOptionLCB INTEGER NOT NULL , customFieldValueLct BIGINT NOT NULL , customFieldValueOptionUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_653); var element_654 = 'CREATE TABLE IF NOT EXISTS Person ( username TEXT , firstNames TEXT , lastName TEXT , emailAddr TEXT , phoneNum TEXT , gender INTEGER NOT NULL , active BOOL NOT NULL , admin BOOL NOT NULL , personNotes TEXT , fatherName TEXT , fatherNumber TEXT , motherName TEXT , motherNum TEXT , dateOfBirth BIGINT NOT NULL , personAddress TEXT , personOrgId TEXT , personGroupUid BIGINT NOT NULL , personMasterChangeSeqNum BIGINT NOT NULL , personLocalChangeSeqNum BIGINT NOT NULL , personLastChangedBy INTEGER NOT NULL , personLct BIGINT NOT NULL , personCountry TEXT , personType INTEGER NOT NULL DEFAULT 0 , personUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_654); var element_655 = 'CREATE TABLE IF NOT EXISTS Clazz ( clazzName TEXT , clazzDesc TEXT , attendanceAverage FLOAT NOT NULL , clazzHolidayUMCalendarUid BIGINT NOT NULL , clazzScheuleUMCalendarUid BIGINT NOT NULL , isClazzActive BOOL NOT NULL , clazzLocationUid BIGINT NOT NULL , clazzStartTime BIGINT NOT NULL , clazzEndTime BIGINT NOT NULL , clazzFeatures BIGINT NOT NULL , clazzSchoolUid BIGINT NOT NULL , clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 , clazzTerminologyUid BIGINT NOT NULL DEFAULT 25966 , clazzMasterChangeSeqNum BIGINT NOT NULL , clazzLocalChangeSeqNum BIGINT NOT NULL , clazzLastChangedBy INTEGER NOT NULL , clazzLct BIGINT NOT NULL , clazzTimeZone TEXT , clazzStudentsPersonGroupUid BIGINT NOT NULL , clazzTeachersPersonGroupUid BIGINT NOT NULL , clazzPendingStudentsPersonGroupUid BIGINT NOT NULL , clazzParentsPersonGroupUid BIGINT NOT NULL , clazzCode TEXT , clazzUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_655); var element_656 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolment ( clazzEnrolmentPersonUid BIGINT NOT NULL , clazzEnrolmentClazzUid BIGINT NOT NULL , clazzEnrolmentDateJoined BIGINT NOT NULL , clazzEnrolmentDateLeft BIGINT NOT NULL , clazzEnrolmentRole INTEGER NOT NULL , clazzEnrolmentAttendancePercentage FLOAT NOT NULL , clazzEnrolmentActive BOOL NOT NULL , clazzEnrolmentLeavingReasonUid BIGINT NOT NULL , clazzEnrolmentOutcome INTEGER NOT NULL , clazzEnrolmentLocalChangeSeqNum BIGINT NOT NULL , clazzEnrolmentMasterChangeSeqNum BIGINT NOT NULL , clazzEnrolmentLastChangedBy INTEGER NOT NULL , clazzEnrolmentLct BIGINT NOT NULL , clazzEnrolmentUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_656); var element_657 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentPersonUid_clazzEnrolmentClazzUid ON ClazzEnrolment (clazzEnrolmentPersonUid, clazzEnrolmentClazzUid)'; _stmtList.add_11rb$(element_657); var element_658 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentPersonUid ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentPersonUid)'; _stmtList.add_11rb$(element_658); var element_659 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentRole ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentRole)'; _stmtList.add_11rb$(element_659); var element_660 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentPersonUid ON ClazzEnrolment (clazzEnrolmentPersonUid)'; _stmtList.add_11rb$(element_660); var element_661 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid ON ClazzEnrolment (clazzEnrolmentClazzUid)'; _stmtList.add_11rb$(element_661); var element_662 = 'CREATE TABLE IF NOT EXISTS LeavingReason ( leavingReasonTitle TEXT , leavingReasonMCSN BIGINT NOT NULL , leavingReasonCSN BIGINT NOT NULL , leavingReasonLCB INTEGER NOT NULL , leavingReasonLct BIGINT NOT NULL , leavingReasonUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_662); var element_663 = 'CREATE TABLE IF NOT EXISTS ContentEntry ( title TEXT , description TEXT , entryId TEXT , author TEXT , publisher TEXT , licenseType INTEGER NOT NULL , licenseName TEXT , licenseUrl TEXT , sourceUrl TEXT , thumbnailUrl TEXT , lastModified BIGINT NOT NULL , primaryLanguageUid BIGINT NOT NULL , languageVariantUid BIGINT NOT NULL , contentFlags INTEGER NOT NULL , leaf BOOL NOT NULL , publik BOOL NOT NULL , ceInactive BOOL NOT NULL , completionCriteria INTEGER NOT NULL , minScore INTEGER NOT NULL , contentTypeFlag INTEGER NOT NULL , contentOwner BIGINT NOT NULL , contentEntryLocalChangeSeqNum BIGINT NOT NULL , contentEntryMasterChangeSeqNum BIGINT NOT NULL , contentEntryLastChangedBy INTEGER NOT NULL , contentEntryLct BIGINT NOT NULL , contentEntryUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_663); var element_664 = 'CREATE INDEX index_ContentEntry_primaryLanguageUid ON ContentEntry (primaryLanguageUid)'; _stmtList.add_11rb$(element_664); var element_665 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoin ( ceccjContentEntryUid BIGINT NOT NULL , ceccjContentCategoryUid BIGINT NOT NULL , ceccjLocalChangeSeqNum BIGINT NOT NULL , ceccjMasterChangeSeqNum BIGINT NOT NULL , ceccjLastChangedBy INTEGER NOT NULL , ceccjLct BIGINT NOT NULL , ceccjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_665); var element_666 = 'CREATE INDEX index_ContentEntryContentCategoryJoin_ceccjContentEntryUid ON ContentEntryContentCategoryJoin (ceccjContentEntryUid)'; _stmtList.add_11rb$(element_666); var element_667 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoin ( cepcjParentContentEntryUid BIGINT NOT NULL , cepcjChildContentEntryUid BIGINT NOT NULL , childIndex INTEGER NOT NULL , cepcjLocalChangeSeqNum BIGINT NOT NULL , cepcjMasterChangeSeqNum BIGINT NOT NULL , cepcjLastChangedBy INTEGER NOT NULL , cepcjLct BIGINT NOT NULL , cepcjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_667); var element_668 = 'CREATE INDEX parent_child ON ContentEntryParentChildJoin (cepcjChildContentEntryUid, cepcjParentContentEntryUid)'; _stmtList.add_11rb$(element_668); var element_669 = 'CREATE INDEX index_ContentEntryParentChildJoin_cepcjParentContentEntryUid ON ContentEntryParentChildJoin (cepcjParentContentEntryUid)'; _stmtList.add_11rb$(element_669); var element_670 = 'CREATE INDEX index_ContentEntryParentChildJoin_cepcjChildContentEntryUid ON ContentEntryParentChildJoin (cepcjChildContentEntryUid)'; _stmtList.add_11rb$(element_670); var element_671 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoin ( cerejContentEntryUid BIGINT NOT NULL , cerejRelatedEntryUid BIGINT NOT NULL , cerejLastChangedBy INTEGER NOT NULL , relType INTEGER NOT NULL , comment TEXT , cerejRelLanguageUid BIGINT NOT NULL , cerejLocalChangeSeqNum BIGINT NOT NULL , cerejMasterChangeSeqNum BIGINT NOT NULL , cerejLct BIGINT NOT NULL , cerejUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_671); var element_672 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchema ( schemaName TEXT , schemaUrl TEXT , contentCategorySchemaLocalChangeSeqNum BIGINT NOT NULL , contentCategorySchemaMasterChangeSeqNum BIGINT NOT NULL , contentCategorySchemaLastChangedBy INTEGER NOT NULL , contentCategorySchemaLct BIGINT NOT NULL , contentCategorySchemaUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_672); var element_673 = 'CREATE TABLE IF NOT EXISTS ContentCategory ( ctnCatContentCategorySchemaUid BIGINT NOT NULL , name TEXT , contentCategoryLocalChangeSeqNum BIGINT NOT NULL , contentCategoryMasterChangeSeqNum BIGINT NOT NULL , contentCategoryLastChangedBy INTEGER NOT NULL , contentCategoryLct BIGINT NOT NULL , contentCategoryUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_673); var element_674 = 'CREATE TABLE IF NOT EXISTS Language ( name TEXT , iso_639_1_standard TEXT , iso_639_2_standard TEXT , iso_639_3_standard TEXT , Language_Type TEXT , languageActive BOOL NOT NULL , langLocalChangeSeqNum BIGINT NOT NULL , langMasterChangeSeqNum BIGINT NOT NULL , langLastChangedBy INTEGER NOT NULL , langLct BIGINT NOT NULL , langUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_674); var element_675 = 'CREATE TABLE IF NOT EXISTS LanguageVariant ( langUid BIGINT NOT NULL , countryCode TEXT , name TEXT , langVariantLocalChangeSeqNum BIGINT NOT NULL , langVariantMasterChangeSeqNum BIGINT NOT NULL , langVariantLastChangedBy INTEGER NOT NULL , langVariantLct BIGINT NOT NULL , langVariantUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_675); var element_676 = 'CREATE TABLE IF NOT EXISTS AccessToken ( token TEXT PRIMARY KEY , accessTokenPersonUid BIGINT NOT NULL , expires BIGINT NOT NULL )'; _stmtList.add_11rb$(element_676); var element_677 = 'CREATE TABLE IF NOT EXISTS PersonAuth ( passwordHash TEXT , personAuthStatus INTEGER NOT NULL , personAuthUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_677); var element_678 = 'CREATE TABLE IF NOT EXISTS Role ( roleName TEXT , roleActive BOOL NOT NULL , roleMasterCsn BIGINT NOT NULL , roleLocalCsn BIGINT NOT NULL , roleLastChangedBy INTEGER NOT NULL , roleLct BIGINT NOT NULL , rolePermissions BIGINT NOT NULL , roleUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_678); var element_679 = 'CREATE INDEX index_Role_rolePermissions ON Role (rolePermissions)'; _stmtList.add_11rb$(element_679); var element_680 = 'CREATE TABLE IF NOT EXISTS EntityRole ( erMasterCsn BIGINT NOT NULL , erLocalCsn BIGINT NOT NULL , erLastChangedBy INTEGER NOT NULL , erLct BIGINT NOT NULL , erTableId INTEGER NOT NULL , erEntityUid BIGINT NOT NULL , erGroupUid BIGINT NOT NULL , erRoleUid BIGINT NOT NULL , erActive BOOL NOT NULL , erUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_680); var element_681 = 'CREATE INDEX index_EntityRole_erGroupUid_erRoleUid_erTableId ON EntityRole (erGroupUid, erRoleUid, erTableId)'; _stmtList.add_11rb$(element_681); var element_682 = 'CREATE INDEX index_EntityRole_erTableId ON EntityRole (erTableId)'; _stmtList.add_11rb$(element_682); var element_683 = 'CREATE INDEX index_EntityRole_erEntityUid ON EntityRole (erEntityUid)'; _stmtList.add_11rb$(element_683); var element_684 = 'CREATE INDEX index_EntityRole_erGroupUid ON EntityRole (erGroupUid)'; _stmtList.add_11rb$(element_684); var element_685 = 'CREATE INDEX index_EntityRole_erRoleUid ON EntityRole (erRoleUid)'; _stmtList.add_11rb$(element_685); var element_686 = 'CREATE TABLE IF NOT EXISTS PersonGroup ( groupMasterCsn BIGINT NOT NULL , groupLocalCsn BIGINT NOT NULL , groupLastChangedBy INTEGER NOT NULL , groupLct BIGINT NOT NULL , groupName TEXT , groupActive BOOL NOT NULL , personGroupFlag INTEGER NOT NULL , groupUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_686); var element_687 = 'CREATE TABLE IF NOT EXISTS PersonGroupMember ( groupMemberActive BOOL NOT NULL , groupMemberPersonUid BIGINT NOT NULL , groupMemberGroupUid BIGINT NOT NULL , groupMemberMasterCsn BIGINT NOT NULL , groupMemberLocalCsn BIGINT NOT NULL , groupMemberLastChangedBy INTEGER NOT NULL , groupMemberLct BIGINT NOT NULL , groupMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_687); var element_688 = 'CREATE INDEX index_PersonGroupMember_groupMemberPersonUid ON PersonGroupMember (groupMemberPersonUid)'; _stmtList.add_11rb$(element_688); var element_689 = 'CREATE INDEX index_PersonGroupMember_groupMemberGroupUid ON PersonGroupMember (groupMemberGroupUid)'; _stmtList.add_11rb$(element_689); var element_690 = 'CREATE TABLE IF NOT EXISTS PersonPicture ( personPicturePersonUid BIGINT NOT NULL , personPictureMasterCsn BIGINT NOT NULL , personPictureLocalCsn BIGINT NOT NULL , personPictureLastChangedBy INTEGER NOT NULL , personPictureLct BIGINT NOT NULL , personPictureUri TEXT , personPictureMd5 TEXT , fileSize INTEGER NOT NULL , picTimestamp BIGINT NOT NULL , mimeType TEXT , personPictureActive BOOL NOT NULL , personPictureUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_690); var element_691 = 'CREATE TABLE IF NOT EXISTS ScrapeQueueItem ( sqiContentEntryParentUid BIGINT NOT NULL , sqiContentEntryUid BIGINT NOT NULL , destDir TEXT , scrapeUrl TEXT , status INTEGER NOT NULL , runId INTEGER NOT NULL , itemType INTEGER NOT NULL , errorCode INTEGER NOT NULL , contentType TEXT , timeAdded BIGINT NOT NULL , timeStarted BIGINT NOT NULL , timeFinished BIGINT NOT NULL , priority INTEGER NOT NULL , overrideEntry BOOL NOT NULL , sqiUid SERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_691); var element_692 = 'CREATE INDEX index_ScrapeQueueItem_status_itemType ON ScrapeQueueItem (status, itemType)'; _stmtList.add_11rb$(element_692); var element_693 = 'CREATE TABLE IF NOT EXISTS ScrapeRun ( scrapeType TEXT , scrapeRunStatus INTEGER NOT NULL , conversionParams TEXT , scrapeRunUid SERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_693); var element_694 = 'CREATE TABLE IF NOT EXISTS ConnectivityStatus ( csUid INTEGER PRIMARY KEY NOT NULL , connectivityState INTEGER NOT NULL , wifiSsid TEXT , connectedOrConnecting BOOL NOT NULL )'; _stmtList.add_11rb$(element_694); var element_695 = 'CREATE TABLE IF NOT EXISTS Container ( cntLocalCsn BIGINT NOT NULL , cntMasterCsn BIGINT NOT NULL , cntLastModBy INTEGER NOT NULL , cntLct BIGINT NOT NULL , fileSize BIGINT NOT NULL , containerContentEntryUid BIGINT NOT NULL , cntLastModified BIGINT NOT NULL , mimeType TEXT , remarks TEXT , mobileOptimized BOOL NOT NULL , cntNumEntries INTEGER NOT NULL , containerUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_695); var element_696 = 'CREATE INDEX cnt_uid_to_most_recent ON Container (containerContentEntryUid, cntLastModified)'; _stmtList.add_11rb$(element_696); var element_697 = 'CREATE INDEX index_Container_cntLastModified ON Container (cntLastModified)'; _stmtList.add_11rb$(element_697); var element_698 = 'CREATE TABLE IF NOT EXISTS ContainerEntry ( ceContainerUid BIGINT NOT NULL , cePath TEXT , ceCefUid BIGINT NOT NULL , ceUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_698); var element_699 = 'CREATE INDEX index_ContainerEntry_ceContainerUid ON ContainerEntry (ceContainerUid)'; _stmtList.add_11rb$(element_699); var element_700 = 'CREATE TABLE IF NOT EXISTS ContainerEntryFile ( cefMd5 TEXT , cefPath TEXT , ceTotalSize BIGINT NOT NULL , ceCompressedSize BIGINT NOT NULL , compression INTEGER NOT NULL , lastModified BIGINT NOT NULL , cefUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_700); var element_701 = 'CREATE INDEX index_ContainerEntryFile_cefMd5 ON ContainerEntryFile (cefMd5)'; _stmtList.add_11rb$(element_701); var element_702 = 'CREATE TABLE IF NOT EXISTS VerbEntity ( urlId TEXT , verbInActive BOOL NOT NULL , verbMasterChangeSeqNum BIGINT NOT NULL , verbLocalChangeSeqNum BIGINT NOT NULL , verbLastChangedBy INTEGER NOT NULL , verbLct BIGINT NOT NULL , verbUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_702); var element_703 = 'CREATE TABLE IF NOT EXISTS XObjectEntity ( objectType TEXT , objectId TEXT , definitionType TEXT , interactionType TEXT , correctResponsePattern TEXT , objectContentEntryUid BIGINT NOT NULL , objectStatementRefUid BIGINT NOT NULL DEFAULT 0 , xObjectMasterChangeSeqNum BIGINT NOT NULL , xObjectocalChangeSeqNum BIGINT NOT NULL , xObjectLastChangedBy INTEGER NOT NULL , xObjectLct BIGINT NOT NULL , xObjectUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_703); var element_704 = 'CREATE TABLE IF NOT EXISTS StatementEntity ( statementId TEXT , statementPersonUid BIGINT NOT NULL , statementVerbUid BIGINT NOT NULL , xObjectUid BIGINT NOT NULL , subStatementActorUid BIGINT NOT NULL , substatementVerbUid BIGINT NOT NULL , subStatementObjectUid BIGINT NOT NULL , agentUid BIGINT NOT NULL , instructorUid BIGINT NOT NULL , authorityUid BIGINT NOT NULL , teamUid BIGINT NOT NULL , resultCompletion BOOL NOT NULL , resultSuccess SMALLINT NOT NULL , resultScoreScaled FLOAT NOT NULL , resultScoreRaw BIGINT NOT NULL , resultScoreMin BIGINT NOT NULL , resultScoreMax BIGINT NOT NULL , resultDuration BIGINT NOT NULL , resultResponse TEXT , timestamp BIGINT NOT NULL , stored BIGINT NOT NULL , contextRegistration TEXT , contextPlatform TEXT , contextStatementId TEXT , fullStatement TEXT , statementMasterChangeSeqNum BIGINT NOT NULL , statementLocalChangeSeqNum BIGINT NOT NULL , statementLastChangedBy INTEGER NOT NULL , statementLct BIGINT NOT NULL , extensionProgress INTEGER NOT NULL , contentEntryRoot BOOL NOT NULL , statementContentEntryUid BIGINT NOT NULL , statementLearnerGroupUid BIGINT NOT NULL , statementClazzUid BIGINT NOT NULL , statementUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_704); var element_705 = 'CREATE INDEX index_StatementEntity_statementContentEntryUid_statementPersonUid_contentEntryRoot_timestamp_statementLocalChangeSeqNum ON StatementEntity (statementContentEntryUid, statementPersonUid, contentEntryRoot, timestamp, statementLocalChangeSeqNum)'; _stmtList.add_11rb$(element_705); var element_706 = 'CREATE INDEX index_StatementEntity_statementPersonUid ON StatementEntity (statementPersonUid)'; _stmtList.add_11rb$(element_706); var element_707 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoin ( contextActivityFlag INTEGER NOT NULL , contextStatementUid BIGINT NOT NULL , contextXObjectUid BIGINT NOT NULL , verbMasterChangeSeqNum BIGINT NOT NULL , verbLocalChangeSeqNum BIGINT NOT NULL , verbLastChangedBy INTEGER NOT NULL , contextXObjectLct BIGINT NOT NULL , contextXObjectStatementJoinUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_707); var element_708 = 'CREATE TABLE IF NOT EXISTS AgentEntity ( agentMbox TEXT , agentMbox_sha1sum TEXT , agentOpenid TEXT , agentAccountName TEXT , agentHomePage TEXT , agentPersonUid BIGINT NOT NULL , statementMasterChangeSeqNum BIGINT NOT NULL , statementLocalChangeSeqNum BIGINT NOT NULL , statementLastChangedBy INTEGER NOT NULL , agentLct BIGINT NOT NULL , agentUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_708); var element_709 = 'CREATE TABLE IF NOT EXISTS StateEntity ( stateId TEXT , agentUid BIGINT NOT NULL , activityId TEXT , registration TEXT , isIsactive BOOL NOT NULL , timestamp BIGINT NOT NULL , stateMasterChangeSeqNum BIGINT NOT NULL , stateLocalChangeSeqNum BIGINT NOT NULL , stateLastChangedBy INTEGER NOT NULL , stateLct BIGINT NOT NULL , stateUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_709); var element_710 = 'CREATE TABLE IF NOT EXISTS StateContentEntity ( stateContentStateUid BIGINT NOT NULL , stateContentKey TEXT , stateContentValue TEXT , isIsactive BOOL NOT NULL , stateContentMasterChangeSeqNum BIGINT NOT NULL , stateContentLocalChangeSeqNum BIGINT NOT NULL , stateContentLastChangedBy INTEGER NOT NULL , stateContentLct BIGINT NOT NULL , stateContentUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_710); var element_711 = 'CREATE TABLE IF NOT EXISTS XLangMapEntry ( verbLangMapUid BIGINT NOT NULL , objectLangMapUid BIGINT NOT NULL , languageLangMapUid BIGINT NOT NULL , languageVariantLangMapUid BIGINT NOT NULL , valueLangMap TEXT , statementLangMapMasterCsn INTEGER NOT NULL , statementLangMapLocalCsn INTEGER NOT NULL , statementLangMapLcb INTEGER NOT NULL , statementLangMapLct BIGINT NOT NULL , statementLangMapUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_711); var element_712 = 'CREATE INDEX index_XLangMapEntry_verbLangMapUid ON XLangMapEntry (verbLangMapUid)'; _stmtList.add_11rb$(element_712); var element_713 = 'CREATE TABLE IF NOT EXISTS SyncNode ( nodeClientId BIGINT PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_713); var element_714 = 'CREATE TABLE IF NOT EXISTS LocallyAvailableContainer ( laContainerUid BIGINT PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_714); var element_715 = 'CREATE TABLE IF NOT EXISTS ContainerETag ( ceContainerUid BIGINT PRIMARY KEY NOT NULL , cetag TEXT )'; _stmtList.add_11rb$(element_715); var element_716 = 'CREATE TABLE IF NOT EXISTS School ( schoolName TEXT , schoolDesc TEXT , schoolAddress TEXT , schoolActive BOOL NOT NULL , schoolPhoneNumber TEXT , schoolGender INTEGER NOT NULL , schoolHolidayCalendarUid BIGINT NOT NULL , schoolFeatures BIGINT NOT NULL , schoolLocationLong DOUBLE PRECISION NOT NULL , schoolLocationLatt DOUBLE PRECISION NOT NULL , schoolEmailAddress TEXT , schoolTeachersPersonGroupUid BIGINT NOT NULL , schoolStudentsPersonGroupUid BIGINT NOT NULL , schoolPendingStudentsPersonGroupUid BIGINT NOT NULL , schoolCode TEXT , schoolMasterChangeSeqNum BIGINT NOT NULL , schoolLocalChangeSeqNum BIGINT NOT NULL , schoolLastChangedBy INTEGER NOT NULL , schoolLct BIGINT NOT NULL , schoolTimeZone TEXT , schoolUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_716); var element_717 = 'CREATE TABLE IF NOT EXISTS SchoolMember ( schoolMemberPersonUid BIGINT NOT NULL , schoolMemberSchoolUid BIGINT NOT NULL , schoolMemberJoinDate BIGINT NOT NULL , schoolMemberLeftDate BIGINT NOT NULL , schoolMemberRole INTEGER NOT NULL , schoolMemberActive BOOL NOT NULL , schoolMemberLocalChangeSeqNum BIGINT NOT NULL , schoolMemberMasterChangeSeqNum BIGINT NOT NULL , schoolMemberLastChangedBy INTEGER NOT NULL , schoolMemberLct BIGINT NOT NULL , schoolMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_717); var element_718 = 'CREATE INDEX index_SchoolMember_schoolMemberSchoolUid_schoolMemberActive_schoolMemberRole ON SchoolMember (schoolMemberSchoolUid, schoolMemberActive, schoolMemberRole)'; _stmtList.add_11rb$(element_718); var element_719 = 'CREATE INDEX index_SchoolMember_schoolMemberPersonUid ON SchoolMember (schoolMemberPersonUid)'; _stmtList.add_11rb$(element_719); var element_720 = 'CREATE INDEX index_SchoolMember_schoolMemberSchoolUid ON SchoolMember (schoolMemberSchoolUid)'; _stmtList.add_11rb$(element_720); var element_721 = 'CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid BIGINT NOT NULL , commentsPublic BOOL NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid BIGINT NOT NULL , commentsToPersonUid BIGINT NOT NULL , commentSubmitterUid BIGINT NOT NULL , commentsFlagged BOOL NOT NULL , commentsInActive BOOL NOT NULL , commentsDateTimeAdded BIGINT NOT NULL , commentsDateTimeUpdated BIGINT NOT NULL , commentsMCSN BIGINT NOT NULL , commentsLCSN BIGINT NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct BIGINT NOT NULL , commentsUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_721); var element_722 = 'CREATE TABLE IF NOT EXISTS Report ( reportOwnerUid BIGINT NOT NULL , xAxis INTEGER NOT NULL , reportDateRangeSelection INTEGER NOT NULL , fromDate BIGINT NOT NULL , fromRelTo INTEGER NOT NULL , fromRelOffSet INTEGER NOT NULL , fromRelUnit INTEGER NOT NULL , toDate BIGINT NOT NULL , toRelTo INTEGER NOT NULL , toRelOffSet INTEGER NOT NULL , toRelUnit INTEGER NOT NULL , reportTitle TEXT , reportDescription TEXT , reportSeries TEXT , reportInactive BOOL NOT NULL , isTemplate BOOL NOT NULL , priority INTEGER NOT NULL , reportTitleId INTEGER NOT NULL , reportDescId INTEGER NOT NULL , reportMasterChangeSeqNum BIGINT NOT NULL , reportLocalChangeSeqNum BIGINT NOT NULL , reportLastChangedBy INTEGER NOT NULL , reportLct BIGINT NOT NULL , reportUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_722); var element_723 = 'CREATE TABLE IF NOT EXISTS Site ( sitePcsn BIGINT NOT NULL , siteLcsn BIGINT NOT NULL , siteLcb INTEGER NOT NULL , siteLct BIGINT NOT NULL , siteName TEXT , guestLogin BOOL NOT NULL , registrationAllowed BOOL NOT NULL , authSalt TEXT , siteUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_723); var element_724 = 'CREATE TABLE IF NOT EXISTS ContainerImportJob ( cijContainerUid BIGINT NOT NULL , cijUri TEXT , cijImportMode INTEGER NOT NULL , cijContainerBaseDir TEXT , cijContentEntryUid BIGINT NOT NULL , cijMimeType TEXT , cijSessionId TEXT , cijJobStatus INTEGER NOT NULL , cijBytesSoFar BIGINT NOT NULL , cijImportCompleted BOOL NOT NULL , cijContentLength BIGINT NOT NULL , cijContainerEntryFileUids TEXT , cijConversionParams TEXT , cijUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_724); var element_725 = 'CREATE TABLE IF NOT EXISTS LearnerGroup ( learnerGroupName TEXT , learnerGroupDescription TEXT , learnerGroupActive BOOL NOT NULL , learnerGroupMCSN BIGINT NOT NULL , learnerGroupCSN BIGINT NOT NULL , learnerGroupLCB INTEGER NOT NULL , learnerGroupLct BIGINT NOT NULL , learnerGroupUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_725); var element_726 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMember ( learnerGroupMemberPersonUid BIGINT NOT NULL , learnerGroupMemberLgUid BIGINT NOT NULL , learnerGroupMemberRole INTEGER NOT NULL , learnerGroupMemberActive BOOL NOT NULL , learnerGroupMemberMCSN BIGINT NOT NULL , learnerGroupMemberCSN BIGINT NOT NULL , learnerGroupMemberLCB INTEGER NOT NULL , learnerGroupMemberLct BIGINT NOT NULL , learnerGroupMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_726); var element_727 = 'CREATE TABLE IF NOT EXISTS GroupLearningSession ( groupLearningSessionContentUid BIGINT NOT NULL , groupLearningSessionLearnerGroupUid BIGINT NOT NULL , groupLearningSessionInactive BOOL NOT NULL , groupLearningSessionMCSN BIGINT NOT NULL , groupLearningSessionCSN BIGINT NOT NULL , groupLearningSessionLCB INTEGER NOT NULL , groupLearningSessionLct BIGINT NOT NULL , groupLearningSessionUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_727); var element_728 = 'CREATE TABLE IF NOT EXISTS SiteTerms ( termsHtml TEXT , sTermsLang TEXT , sTermsLangUid BIGINT NOT NULL , sTermsActive BOOL NOT NULL , sTermsLastChangedBy INTEGER NOT NULL , sTermsPrimaryCsn BIGINT NOT NULL , sTermsLocalCsn BIGINT NOT NULL , sTermsLct BIGINT NOT NULL , sTermsUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_728); var element_729 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoin ( ccjContentEntryUid BIGINT NOT NULL , ccjClazzUid BIGINT NOT NULL , ccjActive BOOL NOT NULL , ccjLocalChangeSeqNum BIGINT NOT NULL , ccjMasterChangeSeqNum BIGINT NOT NULL , ccjLastChangedBy INTEGER NOT NULL , ccjLct BIGINT NOT NULL , ccjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_729); var element_730 = 'CREATE INDEX index_ClazzContentJoin_ccjContentEntryUid ON ClazzContentJoin (ccjContentEntryUid)'; _stmtList.add_11rb$(element_730); var element_731 = 'CREATE TABLE IF NOT EXISTS PersonParentJoin ( ppjPcsn BIGINT NOT NULL , ppjLcsn BIGINT NOT NULL , ppjLcb INTEGER NOT NULL , ppjLct BIGINT NOT NULL , ppjParentPersonUid BIGINT NOT NULL , ppjMinorPersonUid BIGINT NOT NULL , ppjRelationship INTEGER NOT NULL , ppjEmail TEXT , ppjPhone TEXT , ppjInactive BOOL NOT NULL , ppjStatus INTEGER NOT NULL , ppjApprovalTiemstamp BIGINT NOT NULL , ppjApprovalIpAddr TEXT , ppjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_731); var element_732 = 'CREATE TABLE IF NOT EXISTS ScopedGrant ( sgPcsn BIGINT NOT NULL , sgLcsn BIGINT NOT NULL , sgLcb INTEGER NOT NULL , sgLct BIGINT NOT NULL , sgTableId INTEGER NOT NULL , sgEntityUid BIGINT NOT NULL , sgPermissions BIGINT NOT NULL , sgGroupUid BIGINT NOT NULL , sgIndex INTEGER NOT NULL , sgFlags INTEGER NOT NULL , sgUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_732); var element_733 = 'CREATE INDEX idx_group_to_entity ON ScopedGrant (sgGroupUid, sgPermissions, sgTableId, sgEntityUid)'; _stmtList.add_11rb$(element_733); var element_734 = 'CREATE INDEX idx_entity_to_group ON ScopedGrant (sgTableId, sgEntityUid, sgPermissions, sgGroupUid)'; _stmtList.add_11rb$(element_734); var element_735 = 'CREATE TABLE IF NOT EXISTS ErrorReport ( errPcsn BIGINT NOT NULL , errLcsn BIGINT NOT NULL , errLcb INTEGER NOT NULL , errLct BIGINT NOT NULL , severity INTEGER NOT NULL , timestamp BIGINT NOT NULL , presenterUri TEXT , appVersion TEXT , versionCode INTEGER NOT NULL , errorCode INTEGER NOT NULL , operatingSys TEXT , osVersion TEXT , stackTrace TEXT , message TEXT , errUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_735); var element_736 = 'CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid BIGINT NOT NULL DEFAULT 0 , caActive BOOL NOT NULL , caClassCommentEnabled BOOL NOT NULL , caPrivateCommentsEnabled BOOL NOT NULL DEFAULT true, caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission BOOL NOT NULL DEFAULT true, caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission BOOL NOT NULL DEFAULT true, caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid BIGINT NOT NULL DEFAULT 0 , caClazzUid BIGINT NOT NULL , caLocalChangeSeqNum BIGINT NOT NULL , caMasterChangeSeqNum BIGINT NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct BIGINT NOT NULL , caUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_736); var element_737 = 'CREATE INDEX index_ClazzAssignment_caClazzUid ON ClazzAssignment (caClazzUid)'; _stmtList.add_11rb$(element_737); var element_738 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid BIGINT NOT NULL , cacjAssignmentUid BIGINT NOT NULL , cacjActive BOOL NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN BIGINT NOT NULL , cacjLCSN BIGINT NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct BIGINT NOT NULL , cacjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_738); var element_739 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid BIGINT NOT NULL , casSubmitterUid BIGINT NOT NULL , casSubmitterPersonUid BIGINT NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp BIGINT NOT NULL , casUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_739); var element_740 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid BIGINT NOT NULL , casaMimeType TEXT , casaFileName TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp BIGINT NOT NULL , casaUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_740); var element_741 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid BIGINT NOT NULL , camSubmitterUid BIGINT NOT NULL , camMark FLOAT NOT NULL , camPenalty INTEGER NOT NULL , camLct BIGINT NOT NULL , camUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_741); var element_742 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid BIGINT NOT NULL , cacheContentEntryUid BIGINT NOT NULL , cacheClazzAssignmentUid BIGINT NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty FLOAT NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete BOOL NOT NULL , cacheSuccess SMALLINT NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked BIGINT NOT NULL , cacheUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_742); var element_743 = 'CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)'; _stmtList.add_11rb$(element_743); var element_744 = 'CREATE TABLE IF NOT EXISTS PersonAuth2 ( pauthUid BIGINT PRIMARY KEY NOT NULL , pauthMechanism TEXT , pauthAuth TEXT , pauthLcsn BIGINT NOT NULL , pauthPcsn BIGINT NOT NULL , pauthLcb BIGINT NOT NULL , pauthLct BIGINT NOT NULL )'; _stmtList.add_11rb$(element_744); var element_745 = 'CREATE TABLE IF NOT EXISTS UserSession ( usPcsn BIGINT NOT NULL , usLcsn BIGINT NOT NULL , usLcb INTEGER NOT NULL , usLct BIGINT NOT NULL , usPersonUid BIGINT NOT NULL , usClientNodeId BIGINT NOT NULL , usStartTime BIGINT NOT NULL , usEndTime BIGINT NOT NULL , usStatus INTEGER NOT NULL , usReason INTEGER NOT NULL , usAuth TEXT , usSessionType INTEGER NOT NULL , usUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_745); var element_746 = 'CREATE INDEX person_status_node_idx ON UserSession (usPersonUid, usStatus, usClientNodeId)'; _stmtList.add_11rb$(element_746); var element_747 = 'CREATE INDEX node_status_person_idx ON UserSession (usClientNodeId, usStatus, usPersonUid)'; _stmtList.add_11rb$(element_747); var element_748 = 'CREATE TABLE IF NOT EXISTS ContentJob ( toUri TEXT , cjProgress BIGINT NOT NULL , cjTotal BIGINT NOT NULL , cjNotificationTitle TEXT , cjIsMeteredAllowed BOOL NOT NULL , params TEXT , cjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_748); var element_749 = 'CREATE TABLE IF NOT EXISTS ContentJobItem ( cjiJobUid BIGINT NOT NULL , sourceUri TEXT , cjiIsLeaf BOOL NOT NULL , cjiContentEntryUid BIGINT NOT NULL , cjiParentContentEntryUid BIGINT NOT NULL , cjiContainerUid BIGINT NOT NULL , cjiItemProgress BIGINT NOT NULL , cjiItemTotal BIGINT NOT NULL , cjiRecursiveProgress BIGINT NOT NULL , cjiRecursiveTotal BIGINT NOT NULL , cjiStatus INTEGER NOT NULL , cjiRecursiveStatus INTEGER NOT NULL , cjiConnectivityNeeded BOOL NOT NULL , cjiPluginId INTEGER NOT NULL , cjiAttemptCount INTEGER NOT NULL , cjiParentCjiUid BIGINT NOT NULL , cjiServerJobId BIGINT NOT NULL , cjiStartTime BIGINT NOT NULL , cjiFinishTime BIGINT NOT NULL , cjiUploadSessionUid TEXT , cjiContentDeletedOnCancellation BOOL NOT NULL , cjiContainerProcessed BOOL NOT NULL , cjiUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_749); var element_750 = 'CREATE INDEX index_ContentJobItem_cjiContentEntryUid_cjiFinishTime ON ContentJobItem (cjiContentEntryUid, cjiFinishTime)'; _stmtList.add_11rb$(element_750); var element_751 = 'CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid BIGINT NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate BIGINT NOT NULL , cbDeadlineDate BIGINT NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate BIGINT NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid BIGINT NOT NULL , cbActive BOOL NOT NULL , cbHidden BOOL NOT NULL , cbEntityUid BIGINT NOT NULL , cbLct BIGINT NOT NULL , cbUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_751); var element_752 = 'CREATE INDEX index_CourseBlock_cbClazzUid ON CourseBlock (cbClazzUid)'; _stmtList.add_11rb$(element_752); var element_753 = 'CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct BIGINT NOT NULL , ctUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_753); var element_754 = 'CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive BOOL NOT NULL , cgsClazzUid BIGINT NOT NULL , cgsLct BIGINT NOT NULL , cgsUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_754); var element_755 = 'CREATE INDEX index_CourseGroupSet_cgsClazzUid ON CourseGroupSet (cgsClazzUid)'; _stmtList.add_11rb$(element_755); var element_756 = 'CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid BIGINT NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid BIGINT NOT NULL , cgmLct BIGINT NOT NULL , cgmUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_756); var element_757 = 'CREATE TABLE IF NOT EXISTS SqliteChangeSeqNums ( sCsnTableId INTEGER PRIMARY KEY NOT NULL , sCsnNextLocal INTEGER NOT NULL , sCsnNextPrimary INTEGER NOT NULL )'; _stmtList.add_11rb$(element_757); var element_758 = 'CREATE INDEX index_SqliteChangeSeqNums_sCsnNextLocal ON SqliteChangeSeqNums (sCsnNextLocal)'; _stmtList.add_11rb$(element_758); var element_759 = 'CREATE INDEX index_SqliteChangeSeqNums_sCsnNextPrimary ON SqliteChangeSeqNums (sCsnNextPrimary)'; _stmtList.add_11rb$(element_759); var element_760 = 'CREATE TABLE IF NOT EXISTS UpdateNotification ( pnDeviceId INTEGER NOT NULL , pnTableId INTEGER NOT NULL , pnTimestamp BIGINT NOT NULL , pnUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_760); var element_761 = 'CREATE UNIQUE INDEX index_UpdateNotification_pnDeviceId_pnTableId ON UpdateNotification (pnDeviceId, pnTableId)'; _stmtList.add_11rb$(element_761); var element_762 = 'CREATE INDEX index_UpdateNotification_pnDeviceId_pnTimestamp ON UpdateNotification (pnDeviceId, pnTimestamp)'; _stmtList.add_11rb$(element_762); var element_763 = 'CREATE TABLE IF NOT EXISTS ChangeLog ( chTableId INTEGER NOT NULL , chEntityPk BIGINT NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )'; _stmtList.add_11rb$(element_763); var element_764 = 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaUri TEXT , zaUid SERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_764); var element_765 = 'CREATE TABLE IF NOT EXISTS DoorNode ( auth TEXT , rel INTEGER NOT NULL DEFAULT 2 , nodeId BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_765); var element_766 = 'CREATE TABLE IF NOT EXISTS ReplicationStatus ( tableId INTEGER NOT NULL , priority INTEGER NOT NULL , nodeId BIGINT NOT NULL , lastRemoteChangeTime BIGINT NOT NULL , lastFetchReplicationCompleteTime BIGINT NOT NULL , lastLocalChangeTime BIGINT NOT NULL , lastSendReplicationCompleteTime BIGINT NOT NULL , repStatusId SERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_766); var element_767 = 'CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)'; _stmtList.add_11rb$(element_767); var element_768 = 'CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk BIGINT NOT NULL , clVersionId BIGINT NOT NULL DEFAULT 0 , clDestination BIGINT NOT NULL , clPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clPk, clDestination) )'; _stmtList.add_11rb$(element_768); var element_769 = 'CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId)'; _stmtList.add_11rb$(element_769); var element_770 = 'CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending)'; _stmtList.add_11rb$(element_770); var element_771 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk BIGINT NOT NULL , clarVersionId BIGINT NOT NULL DEFAULT 0 , clarDestination BIGINT NOT NULL , clarPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clarPk, clarDestination) )'; _stmtList.add_11rb$(element_771); var element_772 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId)'; _stmtList.add_11rb$(element_772); var element_773 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending)'; _stmtList.add_11rb$(element_773); var element_774 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk BIGINT NOT NULL , casVersionId BIGINT NOT NULL DEFAULT 0 , casDestination BIGINT NOT NULL , casPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casPk, casDestination) )'; _stmtList.add_11rb$(element_774); var element_775 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)'; _stmtList.add_11rb$(element_775); var element_776 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)'; _stmtList.add_11rb$(element_776); var element_777 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk BIGINT NOT NULL , casaVersionId BIGINT NOT NULL DEFAULT 0 , casaDestination BIGINT NOT NULL , casaPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casaPk, casaDestination) )'; _stmtList.add_11rb$(element_777); var element_778 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)'; _stmtList.add_11rb$(element_778); var element_779 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)'; _stmtList.add_11rb$(element_779); var element_780 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk BIGINT NOT NULL , camVersionId BIGINT NOT NULL DEFAULT 0 , camDestination BIGINT NOT NULL , camPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (camPk, camDestination) )'; _stmtList.add_11rb$(element_780); var element_781 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)'; _stmtList.add_11rb$(element_781); var element_782 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)'; _stmtList.add_11rb$(element_782); var element_783 = 'CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk BIGINT NOT NULL , cbVersionId BIGINT NOT NULL DEFAULT 0 , cbDestination BIGINT NOT NULL , cbPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cbPk, cbDestination) )'; _stmtList.add_11rb$(element_783); var element_784 = 'CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)'; _stmtList.add_11rb$(element_784); var element_785 = 'CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)'; _stmtList.add_11rb$(element_785); var element_786 = 'CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk BIGINT NOT NULL , ctVersionId BIGINT NOT NULL DEFAULT 0 , ctDestination BIGINT NOT NULL , ctPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ctPk, ctDestination) )'; _stmtList.add_11rb$(element_786); var element_787 = 'CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)'; _stmtList.add_11rb$(element_787); var element_788 = 'CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)'; _stmtList.add_11rb$(element_788); var element_789 = 'CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk BIGINT NOT NULL , cgsVersionId BIGINT NOT NULL DEFAULT 0 , cgsDestination BIGINT NOT NULL , cgsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgsPk, cgsDestination) )'; _stmtList.add_11rb$(element_789); var element_790 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)'; _stmtList.add_11rb$(element_790); var element_791 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)'; _stmtList.add_11rb$(element_791); var element_792 = 'CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk BIGINT NOT NULL , cgmVersionId BIGINT NOT NULL DEFAULT 0 , cgmDestination BIGINT NOT NULL , cgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgmPk, cgmDestination) )'; _stmtList.add_11rb$(element_792); var element_793 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)'; _stmtList.add_11rb$(element_793); var element_794 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)'; _stmtList.add_11rb$(element_794); var element_795 = 'CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk BIGINT NOT NULL , scheduleVersionId BIGINT NOT NULL DEFAULT 0 , scheduleDestination BIGINT NOT NULL , schedulePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schedulePk, scheduleDestination) )'; _stmtList.add_11rb$(element_795); var element_796 = 'CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId)'; _stmtList.add_11rb$(element_796); var element_797 = 'CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending)'; _stmtList.add_11rb$(element_797); var element_798 = 'CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk BIGINT NOT NULL , hcVersionId BIGINT NOT NULL DEFAULT 0 , hcDestination BIGINT NOT NULL , hcPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (hcPk, hcDestination) )'; _stmtList.add_11rb$(element_798); var element_799 = 'CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId)'; _stmtList.add_11rb$(element_799); var element_800 = 'CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending)'; _stmtList.add_11rb$(element_800); var element_801 = 'CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk BIGINT NOT NULL , holidayVersionId BIGINT NOT NULL DEFAULT 0 , holidayDestination BIGINT NOT NULL , holidayPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (holidayPk, holidayDestination) )'; _stmtList.add_11rb$(element_801); var element_802 = 'CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId)'; _stmtList.add_11rb$(element_802); var element_803 = 'CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending)'; _stmtList.add_11rb$(element_803); var element_804 = 'CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk BIGINT NOT NULL , personVersionId BIGINT NOT NULL DEFAULT 0 , personDestination BIGINT NOT NULL , personPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (personPk, personDestination) )'; _stmtList.add_11rb$(element_804); var element_805 = 'CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId)'; _stmtList.add_11rb$(element_805); var element_806 = 'CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending)'; _stmtList.add_11rb$(element_806); var element_807 = 'CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk BIGINT NOT NULL , clazzVersionId BIGINT NOT NULL DEFAULT 0 , clazzDestination BIGINT NOT NULL , clazzPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clazzPk, clazzDestination) )'; _stmtList.add_11rb$(element_807); var element_808 = 'CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId)'; _stmtList.add_11rb$(element_808); var element_809 = 'CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending)'; _stmtList.add_11rb$(element_809); var element_810 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk BIGINT NOT NULL , ceVersionId BIGINT NOT NULL DEFAULT 0 , ceDestination BIGINT NOT NULL , cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_810); var element_811 = 'CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_811); var element_812 = 'CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_812); var element_813 = 'CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk BIGINT NOT NULL , lrVersionId BIGINT NOT NULL DEFAULT 0 , lrDestination BIGINT NOT NULL , lrPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lrPk, lrDestination) )'; _stmtList.add_11rb$(element_813); var element_814 = 'CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId)'; _stmtList.add_11rb$(element_814); var element_815 = 'CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending)'; _stmtList.add_11rb$(element_815); var element_816 = 'CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk BIGINT NOT NULL , ceVersionId BIGINT NOT NULL DEFAULT 0 , ceDestination BIGINT NOT NULL , cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_816); var element_817 = 'CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_817); var element_818 = 'CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_818); var element_819 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk BIGINT NOT NULL , ceccjVersionId BIGINT NOT NULL DEFAULT 0 , ceccjDestination BIGINT NOT NULL , ceccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ceccjPk, ceccjDestination) )'; _stmtList.add_11rb$(element_819); var element_820 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId)'; _stmtList.add_11rb$(element_820); var element_821 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending)'; _stmtList.add_11rb$(element_821); var element_822 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk BIGINT NOT NULL , cepcjVersionId BIGINT NOT NULL DEFAULT 0 , cepcjDestination BIGINT NOT NULL , cepcjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepcjPk, cepcjDestination) )'; _stmtList.add_11rb$(element_822); var element_823 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId)'; _stmtList.add_11rb$(element_823); var element_824 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending)'; _stmtList.add_11rb$(element_824); var element_825 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk BIGINT NOT NULL , cerejVersionId BIGINT NOT NULL DEFAULT 0 , cerejDestination BIGINT NOT NULL , cerejPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cerejPk, cerejDestination) )'; _stmtList.add_11rb$(element_825); var element_826 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId)'; _stmtList.add_11rb$(element_826); var element_827 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending)'; _stmtList.add_11rb$(element_827); var element_828 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk BIGINT NOT NULL , ccsVersionId BIGINT NOT NULL DEFAULT 0 , ccsDestination BIGINT NOT NULL , ccsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccsPk, ccsDestination) )'; _stmtList.add_11rb$(element_828); var element_829 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId)'; _stmtList.add_11rb$(element_829); var element_830 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending)'; _stmtList.add_11rb$(element_830); var element_831 = 'CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk BIGINT NOT NULL , ccVersionId BIGINT NOT NULL DEFAULT 0 , ccDestination BIGINT NOT NULL , ccPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccPk, ccDestination) )'; _stmtList.add_11rb$(element_831); var element_832 = 'CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId)'; _stmtList.add_11rb$(element_832); var element_833 = 'CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending)'; _stmtList.add_11rb$(element_833); var element_834 = 'CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk BIGINT NOT NULL , languageVersionId BIGINT NOT NULL DEFAULT 0 , languageDestination BIGINT NOT NULL , languagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (languagePk, languageDestination) )'; _stmtList.add_11rb$(element_834); var element_835 = 'CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId)'; _stmtList.add_11rb$(element_835); var element_836 = 'CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending)'; _stmtList.add_11rb$(element_836); var element_837 = 'CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk BIGINT NOT NULL , lvVersionId BIGINT NOT NULL DEFAULT 0 , lvDestination BIGINT NOT NULL , lvPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lvPk, lvDestination) )'; _stmtList.add_11rb$(element_837); var element_838 = 'CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId)'; _stmtList.add_11rb$(element_838); var element_839 = 'CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending)'; _stmtList.add_11rb$(element_839); var element_840 = 'CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk BIGINT NOT NULL , pgVersionId BIGINT NOT NULL DEFAULT 0 , pgDestination BIGINT NOT NULL , pgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgPk, pgDestination) )'; _stmtList.add_11rb$(element_840); var element_841 = 'CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId)'; _stmtList.add_11rb$(element_841); var element_842 = 'CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending)'; _stmtList.add_11rb$(element_842); var element_843 = 'CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk BIGINT NOT NULL , pgmVersionId BIGINT NOT NULL DEFAULT 0 , pgmDestination BIGINT NOT NULL , pgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgmPk, pgmDestination) )'; _stmtList.add_11rb$(element_843); var element_844 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId)'; _stmtList.add_11rb$(element_844); var element_845 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending)'; _stmtList.add_11rb$(element_845); var element_846 = 'CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk BIGINT NOT NULL , ppVersionId BIGINT NOT NULL DEFAULT 0 , ppDestination BIGINT NOT NULL , ppPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppPk, ppDestination) )'; _stmtList.add_11rb$(element_846); var element_847 = 'CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId)'; _stmtList.add_11rb$(element_847); var element_848 = 'CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending)'; _stmtList.add_11rb$(element_848); var element_849 = 'CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk BIGINT NOT NULL , containerVersionId BIGINT NOT NULL DEFAULT 0 , containerDestination BIGINT NOT NULL , containerPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (containerPk, containerDestination) )'; _stmtList.add_11rb$(element_849); var element_850 = 'CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId)'; _stmtList.add_11rb$(element_850); var element_851 = 'CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending)'; _stmtList.add_11rb$(element_851); var element_852 = 'CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk BIGINT NOT NULL , veVersionId BIGINT NOT NULL DEFAULT 0 , veDestination BIGINT NOT NULL , vePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (vePk, veDestination) )'; _stmtList.add_11rb$(element_852); var element_853 = 'CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId)'; _stmtList.add_11rb$(element_853); var element_854 = 'CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending)'; _stmtList.add_11rb$(element_854); var element_855 = 'CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk BIGINT NOT NULL , xoeVersionId BIGINT NOT NULL DEFAULT 0 , xoeDestination BIGINT NOT NULL , xoePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xoePk, xoeDestination) )'; _stmtList.add_11rb$(element_855); var element_856 = 'CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId)'; _stmtList.add_11rb$(element_856); var element_857 = 'CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending)'; _stmtList.add_11rb$(element_857); var element_858 = 'CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk BIGINT NOT NULL , seVersionId BIGINT NOT NULL DEFAULT 0 , seDestination BIGINT NOT NULL , sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_858); var element_859 = 'CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_859); var element_860 = 'CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_860); var element_861 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk BIGINT NOT NULL , cxosjVersionId BIGINT NOT NULL DEFAULT 0 , cxosjDestination BIGINT NOT NULL , cxosjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cxosjPk, cxosjDestination) )'; _stmtList.add_11rb$(element_861); var element_862 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId)'; _stmtList.add_11rb$(element_862); var element_863 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending)'; _stmtList.add_11rb$(element_863); var element_864 = 'CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk BIGINT NOT NULL , aeVersionId BIGINT NOT NULL DEFAULT 0 , aeDestination BIGINT NOT NULL , aePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (aePk, aeDestination) )'; _stmtList.add_11rb$(element_864); var element_865 = 'CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId)'; _stmtList.add_11rb$(element_865); var element_866 = 'CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending)'; _stmtList.add_11rb$(element_866); var element_867 = 'CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk BIGINT NOT NULL , seVersionId BIGINT NOT NULL DEFAULT 0 , seDestination BIGINT NOT NULL , sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_867); var element_868 = 'CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_868); var element_869 = 'CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_869); var element_870 = 'CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk BIGINT NOT NULL , sceVersionId BIGINT NOT NULL DEFAULT 0 , sceDestination BIGINT NOT NULL , scePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (scePk, sceDestination) )'; _stmtList.add_11rb$(element_870); var element_871 = 'CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId)'; _stmtList.add_11rb$(element_871); var element_872 = 'CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending)'; _stmtList.add_11rb$(element_872); var element_873 = 'CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk BIGINT NOT NULL , xlmeVersionId BIGINT NOT NULL DEFAULT 0 , xlmeDestination BIGINT NOT NULL , xlmePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xlmePk, xlmeDestination) )'; _stmtList.add_11rb$(element_873); var element_874 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId)'; _stmtList.add_11rb$(element_874); var element_875 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending)'; _stmtList.add_11rb$(element_875); var element_876 = 'CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk BIGINT NOT NULL , schoolVersionId BIGINT NOT NULL DEFAULT 0 , schoolDestination BIGINT NOT NULL , schoolPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schoolPk, schoolDestination) )'; _stmtList.add_11rb$(element_876); var element_877 = 'CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId)'; _stmtList.add_11rb$(element_877); var element_878 = 'CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending)'; _stmtList.add_11rb$(element_878); var element_879 = 'CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk BIGINT NOT NULL , smVersionId BIGINT NOT NULL DEFAULT 0 , smDestination BIGINT NOT NULL , smPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (smPk, smDestination) )'; _stmtList.add_11rb$(element_879); var element_880 = 'CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId)'; _stmtList.add_11rb$(element_880); var element_881 = 'CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending)'; _stmtList.add_11rb$(element_881); var element_882 = 'CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk BIGINT NOT NULL , commentsVersionId BIGINT NOT NULL DEFAULT 0 , commentsDestination BIGINT NOT NULL , commentsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (commentsPk, commentsDestination) )'; _stmtList.add_11rb$(element_882); var element_883 = 'CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId)'; _stmtList.add_11rb$(element_883); var element_884 = 'CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending)'; _stmtList.add_11rb$(element_884); var element_885 = 'CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk BIGINT NOT NULL , reportVersionId BIGINT NOT NULL DEFAULT 0 , reportDestination BIGINT NOT NULL , reportPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (reportPk, reportDestination) )'; _stmtList.add_11rb$(element_885); var element_886 = 'CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId)'; _stmtList.add_11rb$(element_886); var element_887 = 'CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending)'; _stmtList.add_11rb$(element_887); var element_888 = 'CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk BIGINT NOT NULL , siteVersionId BIGINT NOT NULL DEFAULT 0 , siteDestination BIGINT NOT NULL , sitePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sitePk, siteDestination) )'; _stmtList.add_11rb$(element_888); var element_889 = 'CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId)'; _stmtList.add_11rb$(element_889); var element_890 = 'CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending)'; _stmtList.add_11rb$(element_890); var element_891 = 'CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk BIGINT NOT NULL , lgVersionId BIGINT NOT NULL DEFAULT 0 , lgDestination BIGINT NOT NULL , lgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgPk, lgDestination) )'; _stmtList.add_11rb$(element_891); var element_892 = 'CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId)'; _stmtList.add_11rb$(element_892); var element_893 = 'CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending)'; _stmtList.add_11rb$(element_893); var element_894 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk BIGINT NOT NULL , lgmVersionId BIGINT NOT NULL DEFAULT 0 , lgmDestination BIGINT NOT NULL , lgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgmPk, lgmDestination) )'; _stmtList.add_11rb$(element_894); var element_895 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId)'; _stmtList.add_11rb$(element_895); var element_896 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending)'; _stmtList.add_11rb$(element_896); var element_897 = 'CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk BIGINT NOT NULL , glsVersionId BIGINT NOT NULL DEFAULT 0 , glsDestination BIGINT NOT NULL , glsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (glsPk, glsDestination) )'; _stmtList.add_11rb$(element_897); var element_898 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId)'; _stmtList.add_11rb$(element_898); var element_899 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending)'; _stmtList.add_11rb$(element_899); var element_900 = 'CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk BIGINT NOT NULL , stVersionId BIGINT NOT NULL DEFAULT 0 , stDestination BIGINT NOT NULL , stPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (stPk, stDestination) )'; _stmtList.add_11rb$(element_900); var element_901 = 'CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId)'; _stmtList.add_11rb$(element_901); var element_902 = 'CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending)'; _stmtList.add_11rb$(element_902); var element_903 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk BIGINT NOT NULL , ccjVersionId BIGINT NOT NULL DEFAULT 0 , ccjDestination BIGINT NOT NULL , ccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccjPk, ccjDestination) )'; _stmtList.add_11rb$(element_903); var element_904 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId)'; _stmtList.add_11rb$(element_904); var element_905 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending)'; _stmtList.add_11rb$(element_905); var element_906 = 'CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk BIGINT NOT NULL , ppjVersionId BIGINT NOT NULL DEFAULT 0 , ppjDestination BIGINT NOT NULL , ppjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppjPk, ppjDestination) )'; _stmtList.add_11rb$(element_906); var element_907 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId)'; _stmtList.add_11rb$(element_907); var element_908 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending)'; _stmtList.add_11rb$(element_908); var element_909 = 'CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk BIGINT NOT NULL , sgVersionId BIGINT NOT NULL DEFAULT 0 , sgDestination BIGINT NOT NULL , sgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sgPk, sgDestination) )'; _stmtList.add_11rb$(element_909); var element_910 = 'CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId)'; _stmtList.add_11rb$(element_910); var element_911 = 'CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending)'; _stmtList.add_11rb$(element_911); var element_912 = 'CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk BIGINT NOT NULL , erVersionId BIGINT NOT NULL DEFAULT 0 , erDestination BIGINT NOT NULL , erPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (erPk, erDestination) )'; _stmtList.add_11rb$(element_912); var element_913 = 'CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId)'; _stmtList.add_11rb$(element_913); var element_914 = 'CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending)'; _stmtList.add_11rb$(element_914); var element_915 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk BIGINT NOT NULL , caVersionId BIGINT NOT NULL DEFAULT 0 , caDestination BIGINT NOT NULL , caPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (caPk, caDestination) )'; _stmtList.add_11rb$(element_915); var element_916 = 'CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId)'; _stmtList.add_11rb$(element_916); var element_917 = 'CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending)'; _stmtList.add_11rb$(element_917); var element_918 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk BIGINT NOT NULL , cacjVersionId BIGINT NOT NULL DEFAULT 0 , cacjDestination BIGINT NOT NULL , cacjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cacjPk, cacjDestination) )'; _stmtList.add_11rb$(element_918); var element_919 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId)'; _stmtList.add_11rb$(element_919); var element_920 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending)'; _stmtList.add_11rb$(element_920); var element_921 = 'CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk BIGINT NOT NULL , paVersionId BIGINT NOT NULL DEFAULT 0 , paDestination BIGINT NOT NULL , paPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (paPk, paDestination) )'; _stmtList.add_11rb$(element_921); var element_922 = 'CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId)'; _stmtList.add_11rb$(element_922); var element_923 = 'CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending)'; _stmtList.add_11rb$(element_923); var element_924 = 'CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk BIGINT NOT NULL , usVersionId BIGINT NOT NULL DEFAULT 0 , usDestination BIGINT NOT NULL , usPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (usPk, usDestination) )'; _stmtList.add_11rb$(element_924); var element_925 = 'CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId)'; _stmtList.add_11rb$(element_925); var element_926 = 'CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending)'; _stmtList.add_11rb$(element_926); var element_927 = 'CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid BIGINT NOT NULL , coursePictureMasterCsn BIGINT NOT NULL , coursePictureLocalCsn BIGINT NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct BIGINT NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp BIGINT NOT NULL , coursePictureMimeType TEXT , coursePictureActive BOOL NOT NULL , coursePictureUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_927); var element_928 = 'CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk BIGINT NOT NULL , cpVersionId BIGINT NOT NULL DEFAULT 0 , cpDestination BIGINT NOT NULL , cpPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cpPk, cpDestination) )'; _stmtList.add_11rb$(element_928); var element_929 = 'CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)'; _stmtList.add_11rb$(element_929); var element_930 = 'CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)'; _stmtList.add_11rb$(element_930); var element_931 = 'CREATE TABLE IF NOT EXISTS ContentEntryPicture ( cepContentEntryUid BIGINT NOT NULL , cepUri TEXT , cepMd5 TEXT , cepFileSize INTEGER NOT NULL , cepTimestamp BIGINT NOT NULL , cepMimeType TEXT , cepActive BOOL NOT NULL , cepUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_931); var element_932 = 'CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate ( cepPk BIGINT NOT NULL , cepVersionId BIGINT NOT NULL DEFAULT 0 , cepDestination BIGINT NOT NULL , cepPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepPk, cepDestination) )'; _stmtList.add_11rb$(element_932); var element_933 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId ON ContentEntryPictureReplicate (cepPk, cepDestination, cepVersionId)'; _stmtList.add_11rb$(element_933); var element_934 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepDestination_cepPending ON ContentEntryPictureReplicate (cepDestination, cepPending)'; _stmtList.add_11rb$(element_934); var element_935 = 'CREATE TABLE IF NOT EXISTS Chat ( chatStartDate BIGINT NOT NULL , chatTitle TEXT , chatGroup BOOL NOT NULL , chatLct BIGINT NOT NULL , chatUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_935); var element_936 = 'CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid BIGINT NOT NULL , chatMemberPersonUid BIGINT NOT NULL , chatMemberJoinedDate BIGINT NOT NULL , chatMemberLeftDate BIGINT NOT NULL , chatMemberLct BIGINT NOT NULL , chatMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_936); var element_937 = 'CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid BIGINT NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid BIGINT NOT NULL , messageText TEXT , messageTimestamp BIGINT NOT NULL , messageClazzUid BIGINT NOT NULL , messageLct BIGINT NOT NULL , messageUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_937); var element_938 = 'CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk BIGINT NOT NULL , messageVersionId BIGINT NOT NULL DEFAULT 0 , messageDestination BIGINT NOT NULL , messagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messagePk, messageDestination) )'; _stmtList.add_11rb$(element_938); var element_939 = 'CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)'; _stmtList.add_11rb$(element_939); var element_940 = 'CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)'; _stmtList.add_11rb$(element_940); var element_941 = 'CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk BIGINT NOT NULL , chatVersionId BIGINT NOT NULL DEFAULT 0 , chatDestination BIGINT NOT NULL , chatPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatPk, chatDestination) )'; _stmtList.add_11rb$(element_941); var element_942 = 'CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)'; _stmtList.add_11rb$(element_942); var element_943 = 'CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)'; _stmtList.add_11rb$(element_943); var element_944 = 'CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk BIGINT NOT NULL , chatMemberVersionId BIGINT NOT NULL DEFAULT 0 , chatMemberDestination BIGINT NOT NULL , chatMemberPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatMemberPk, chatMemberDestination) )'; _stmtList.add_11rb$(element_944); var element_945 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)'; _stmtList.add_11rb$(element_945); var element_946 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)'; _stmtList.add_11rb$(element_946); var element_947 = 'CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid BIGINT NOT NULL , messageReadMessageUid BIGINT NOT NULL , messageReadEntityUid BIGINT NOT NULL , messageReadLct BIGINT NOT NULL , messageReadUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_947); var element_948 = 'CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk BIGINT NOT NULL , messageReadVersionId BIGINT NOT NULL DEFAULT 0 , messageReadDestination BIGINT NOT NULL , messageReadPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messageReadPk, messageReadDestination) )'; _stmtList.add_11rb$(element_948); var element_949 = 'CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)'; _stmtList.add_11rb$(element_949); var element_950 = 'CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)'; _stmtList.add_11rb$(element_950); var element_951 = 'CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid BIGINT NOT NULL , courseDiscussionActive BOOL NOT NULL , courseDiscussionLct BIGINT NOT NULL , courseDiscussionUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_951); var element_952 = 'CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk BIGINT NOT NULL , courseDiscussionVersionId BIGINT NOT NULL DEFAULT 0 , courseDiscussionDestination BIGINT NOT NULL , courseDiscussionPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )'; _stmtList.add_11rb$(element_952); var element_953 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)'; _stmtList.add_11rb$(element_953); var element_954 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)'; _stmtList.add_11rb$(element_954); var element_955 = 'CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate BIGINT NOT NULL , discussionTopicCourseDiscussionUid BIGINT NOT NULL , discussionTopicVisible BOOL NOT NULL , discussionTopicArchive BOOL NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid BIGINT NOT NULL , discussionTopicLct BIGINT NOT NULL , discussionTopicUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_955); var element_956 = 'CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk BIGINT NOT NULL , discussionTopicVersionId BIGINT NOT NULL DEFAULT 0 , discussionTopicDestination BIGINT NOT NULL , discussionTopicPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )'; _stmtList.add_11rb$(element_956); var element_957 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)'; _stmtList.add_11rb$(element_957); var element_958 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)'; _stmtList.add_11rb$(element_958); var element_959 = 'CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate BIGINT NOT NULL , discussionPostDiscussionTopicUid BIGINT NOT NULL , discussionPostVisible BOOL NOT NULL , discussionPostArchive BOOL NOT NULL , discussionPostStartedPersonUid BIGINT NOT NULL , discussionPostClazzUid BIGINT NOT NULL , discussionPostLct BIGINT NOT NULL , discussionPostUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_959); var element_960 = 'CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk BIGINT NOT NULL , discussionPostVersionId BIGINT NOT NULL DEFAULT 0 , discussionPostDestination BIGINT NOT NULL , discussionPostPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionPostPk, discussionPostDestination) )'; _stmtList.add_11rb$(element_960); var element_961 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)'; _stmtList.add_11rb$(element_961); var element_962 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)'; _stmtList.add_11rb$(element_962); var element_963 = ' CREATE OR REPLACE FUNCTION ch_upd_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, NEW.clazzLogUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_963); var element_964 = ' CREATE TRIGGER ch_upd_14_trig AFTER UPDATE OR INSERT ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_upd_14_fn(); '; _stmtList.add_11rb$(element_964); var element_965 = ' CREATE OR REPLACE FUNCTION ch_del_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, OLD.clazzLogUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_965); var element_966 = ' CREATE TRIGGER ch_del_14_trig AFTER DELETE ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_del_14_fn(); '; _stmtList.add_11rb$(element_966); var element_967 = 'CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid '; _stmtList.add_11rb$(element_967); var element_968 = "CREATE OR REPLACE FUNCTION clazzlog_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_968); var element_969 = ' CREATE TRIGGER clazzlog_remote_insert_trig INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlog_remote_insert_fn() '; _stmtList.add_11rb$(element_969); var element_970 = ' CREATE OR REPLACE FUNCTION ch_upd_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, NEW.clazzLogAttendanceRecordUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_970); var element_971 = ' CREATE TRIGGER ch_upd_15_trig AFTER UPDATE OR INSERT ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_upd_15_fn(); '; _stmtList.add_11rb$(element_971); var element_972 = ' CREATE OR REPLACE FUNCTION ch_del_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, OLD.clazzLogAttendanceRecordUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_972); var element_973 = ' CREATE TRIGGER ch_del_15_trig AFTER DELETE ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_del_15_fn(); '; _stmtList.add_11rb$(element_973); var element_974 = 'CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid '; _stmtList.add_11rb$(element_974); var element_975 = "CREATE OR REPLACE FUNCTION clazzlogattendancerecord_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_975); var element_976 = ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_trig INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlogattendancerecord_remote_insert_fn() '; _stmtList.add_11rb$(element_976); var element_977 = ' CREATE OR REPLACE FUNCTION ch_upd_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, NEW.scheduleUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_977); var element_978 = ' CREATE TRIGGER ch_upd_21_trig AFTER UPDATE OR INSERT ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_upd_21_fn(); '; _stmtList.add_11rb$(element_978); var element_979 = ' CREATE OR REPLACE FUNCTION ch_del_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, OLD.scheduleUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_979); var element_980 = ' CREATE TRIGGER ch_del_21_trig AFTER DELETE ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_del_21_fn(); '; _stmtList.add_11rb$(element_980); var element_981 = 'CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid '; _stmtList.add_11rb$(element_981); var element_982 = "CREATE OR REPLACE FUNCTION schedule_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_982); var element_983 = ' CREATE TRIGGER schedule_remote_insert_trig INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schedule_remote_insert_fn() '; _stmtList.add_11rb$(element_983); var element_984 = ' CREATE OR REPLACE FUNCTION ch_upd_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, NEW.umCalendarUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_984); var element_985 = ' CREATE TRIGGER ch_upd_28_trig AFTER UPDATE OR INSERT ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_upd_28_fn(); '; _stmtList.add_11rb$(element_985); var element_986 = ' CREATE OR REPLACE FUNCTION ch_del_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, OLD.umCalendarUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_986); var element_987 = ' CREATE TRIGGER ch_del_28_trig AFTER DELETE ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_del_28_fn(); '; _stmtList.add_11rb$(element_987); var element_988 = 'CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid '; _stmtList.add_11rb$(element_988); var element_989 = "CREATE OR REPLACE FUNCTION holidaycalendar_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_989); var element_990 = ' CREATE TRIGGER holidaycalendar_remote_insert_trig INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holidaycalendar_remote_insert_fn() '; _stmtList.add_11rb$(element_990); var element_991 = ' CREATE OR REPLACE FUNCTION ch_upd_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, NEW.holUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_991); var element_992 = ' CREATE TRIGGER ch_upd_99_trig AFTER UPDATE OR INSERT ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_upd_99_fn(); '; _stmtList.add_11rb$(element_992); var element_993 = ' CREATE OR REPLACE FUNCTION ch_del_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, OLD.holUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_993); var element_994 = ' CREATE TRIGGER ch_del_99_trig AFTER DELETE ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_del_99_fn(); '; _stmtList.add_11rb$(element_994); var element_995 = 'CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid '; _stmtList.add_11rb$(element_995); var element_996 = "CREATE OR REPLACE FUNCTION holiday_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_996); var element_997 = ' CREATE TRIGGER holiday_remote_insert_trig INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holiday_remote_insert_fn() '; _stmtList.add_11rb$(element_997); var element_998 = ' CREATE OR REPLACE FUNCTION ch_upd_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, NEW.personUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_998); var element_999 = ' CREATE TRIGGER ch_upd_9_trig AFTER UPDATE OR INSERT ON Person FOR EACH ROW EXECUTE PROCEDURE ch_upd_9_fn(); '; _stmtList.add_11rb$(element_999); var element_1000 = ' CREATE OR REPLACE FUNCTION ch_del_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, OLD.personUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1000); var element_1001 = ' CREATE TRIGGER ch_del_9_trig AFTER DELETE ON Person FOR EACH ROW EXECUTE PROCEDURE ch_del_9_fn(); '; _stmtList.add_11rb$(element_1001); var element_1002 = 'CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid '; _stmtList.add_11rb$(element_1002); var element_1003 = "CREATE OR REPLACE FUNCTION person_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1003); var element_1004 = ' CREATE TRIGGER person_remote_insert_trig INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW EXECUTE PROCEDURE person_remote_insert_fn() '; _stmtList.add_11rb$(element_1004); var element_1005 = ' CREATE OR REPLACE FUNCTION ch_upd_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, NEW.clazzUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1005); var element_1006 = ' CREATE TRIGGER ch_upd_6_trig AFTER UPDATE OR INSERT ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_upd_6_fn(); '; _stmtList.add_11rb$(element_1006); var element_1007 = ' CREATE OR REPLACE FUNCTION ch_del_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, OLD.clazzUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1007); var element_1008 = ' CREATE TRIGGER ch_del_6_trig AFTER DELETE ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_del_6_fn(); '; _stmtList.add_11rb$(element_1008); var element_1009 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; _stmtList.add_11rb$(element_1009); var element_1010 = "CREATE OR REPLACE FUNCTION clazz_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1010); var element_1011 = ' CREATE TRIGGER clazz_remote_insert_trig INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazz_remote_insert_fn() '; _stmtList.add_11rb$(element_1011); var element_1012 = ' CREATE OR REPLACE FUNCTION ch_upd_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, NEW.clazzEnrolmentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1012); var element_1013 = ' CREATE TRIGGER ch_upd_65_trig AFTER UPDATE OR INSERT ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_upd_65_fn(); '; _stmtList.add_11rb$(element_1013); var element_1014 = ' CREATE OR REPLACE FUNCTION ch_del_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, OLD.clazzEnrolmentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1014); var element_1015 = ' CREATE TRIGGER ch_del_65_trig AFTER DELETE ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_del_65_fn(); '; _stmtList.add_11rb$(element_1015); var element_1016 = 'CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid '; _stmtList.add_11rb$(element_1016); var element_1017 = "CREATE OR REPLACE FUNCTION clazzenrolment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1017); var element_1018 = ' CREATE TRIGGER clazzenrolment_remote_insert_trig INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzenrolment_remote_insert_fn() '; _stmtList.add_11rb$(element_1018); var element_1019 = ' CREATE OR REPLACE FUNCTION ch_upd_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, NEW.leavingReasonUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1019); var element_1020 = ' CREATE TRIGGER ch_upd_410_trig AFTER UPDATE OR INSERT ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_upd_410_fn(); '; _stmtList.add_11rb$(element_1020); var element_1021 = ' CREATE OR REPLACE FUNCTION ch_del_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, OLD.leavingReasonUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1021); var element_1022 = ' CREATE TRIGGER ch_del_410_trig AFTER DELETE ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_del_410_fn(); '; _stmtList.add_11rb$(element_1022); var element_1023 = 'CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid '; _stmtList.add_11rb$(element_1023); var element_1024 = "CREATE OR REPLACE FUNCTION leavingreason_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1024); var element_1025 = ' CREATE TRIGGER leavingreason_remote_insert_trig INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW EXECUTE PROCEDURE leavingreason_remote_insert_fn() '; _stmtList.add_11rb$(element_1025); var element_1026 = ' CREATE OR REPLACE FUNCTION ch_upd_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, NEW.contentEntryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1026); var element_1027 = ' CREATE TRIGGER ch_upd_42_trig AFTER UPDATE OR INSERT ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_42_fn(); '; _stmtList.add_11rb$(element_1027); var element_1028 = ' CREATE OR REPLACE FUNCTION ch_del_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, OLD.contentEntryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1028); var element_1029 = ' CREATE TRIGGER ch_del_42_trig AFTER DELETE ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_42_fn(); '; _stmtList.add_11rb$(element_1029); var element_1030 = 'CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid '; _stmtList.add_11rb$(element_1030); var element_1031 = trimMargin("\n |CREATE OR REPLACE FUNCTION contententry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct\n |; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql\n "); _stmtList.add_11rb$(element_1031); var element_1032 = ' CREATE TRIGGER contententry_remote_insert_trig INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententry_remote_insert_fn() '; _stmtList.add_11rb$(element_1032); var element_1033 = ' CREATE OR REPLACE FUNCTION ch_upd_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, NEW.ceccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1033); var element_1034 = ' CREATE TRIGGER ch_upd_3_trig AFTER UPDATE OR INSERT ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_3_fn(); '; _stmtList.add_11rb$(element_1034); var element_1035 = ' CREATE OR REPLACE FUNCTION ch_del_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, OLD.ceccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1035); var element_1036 = ' CREATE TRIGGER ch_del_3_trig AFTER DELETE ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_3_fn(); '; _stmtList.add_11rb$(element_1036); var element_1037 = 'CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid '; _stmtList.add_11rb$(element_1037); var element_1038 = "CREATE OR REPLACE FUNCTION contententrycontentcategoryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1038); var element_1039 = ' CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententrycontentcategoryjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1039); var element_1040 = ' CREATE OR REPLACE FUNCTION ch_upd_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, NEW.cepcjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1040); var element_1041 = ' CREATE TRIGGER ch_upd_7_trig AFTER UPDATE OR INSERT ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_7_fn(); '; _stmtList.add_11rb$(element_1041); var element_1042 = ' CREATE OR REPLACE FUNCTION ch_del_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, OLD.cepcjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1042); var element_1043 = ' CREATE TRIGGER ch_del_7_trig AFTER DELETE ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_7_fn(); '; _stmtList.add_11rb$(element_1043); var element_1044 = 'CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid '; _stmtList.add_11rb$(element_1044); var element_1045 = "CREATE OR REPLACE FUNCTION contententryparentchildjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1045); var element_1046 = ' CREATE TRIGGER contententryparentchildjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryparentchildjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1046); var element_1047 = ' CREATE OR REPLACE FUNCTION ch_upd_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, NEW.cerejUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1047); var element_1048 = ' CREATE TRIGGER ch_upd_8_trig AFTER UPDATE OR INSERT ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_8_fn(); '; _stmtList.add_11rb$(element_1048); var element_1049 = ' CREATE OR REPLACE FUNCTION ch_del_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, OLD.cerejUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1049); var element_1050 = ' CREATE TRIGGER ch_del_8_trig AFTER DELETE ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_8_fn(); '; _stmtList.add_11rb$(element_1050); var element_1051 = 'CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid '; _stmtList.add_11rb$(element_1051); var element_1052 = "CREATE OR REPLACE FUNCTION contententryrelatedentryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1052); var element_1053 = ' CREATE TRIGGER contententryrelatedentryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryrelatedentryjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1053); var element_1054 = ' CREATE OR REPLACE FUNCTION ch_upd_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, NEW.contentCategorySchemaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1054); var element_1055 = ' CREATE TRIGGER ch_upd_2_trig AFTER UPDATE OR INSERT ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_upd_2_fn(); '; _stmtList.add_11rb$(element_1055); var element_1056 = ' CREATE OR REPLACE FUNCTION ch_del_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, OLD.contentCategorySchemaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1056); var element_1057 = ' CREATE TRIGGER ch_del_2_trig AFTER DELETE ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_del_2_fn(); '; _stmtList.add_11rb$(element_1057); var element_1058 = 'CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid '; _stmtList.add_11rb$(element_1058); var element_1059 = "CREATE OR REPLACE FUNCTION contentcategoryschema_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1059); var element_1060 = ' CREATE TRIGGER contentcategoryschema_remote_insert_trig INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategoryschema_remote_insert_fn() '; _stmtList.add_11rb$(element_1060); var element_1061 = ' CREATE OR REPLACE FUNCTION ch_upd_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, NEW.contentCategoryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1061); var element_1062 = ' CREATE TRIGGER ch_upd_1_trig AFTER UPDATE OR INSERT ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_upd_1_fn(); '; _stmtList.add_11rb$(element_1062); var element_1063 = ' CREATE OR REPLACE FUNCTION ch_del_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, OLD.contentCategoryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1063); var element_1064 = ' CREATE TRIGGER ch_del_1_trig AFTER DELETE ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_del_1_fn(); '; _stmtList.add_11rb$(element_1064); var element_1065 = 'CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid '; _stmtList.add_11rb$(element_1065); var element_1066 = "CREATE OR REPLACE FUNCTION contentcategory_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1066); var element_1067 = ' CREATE TRIGGER contentcategory_remote_insert_trig INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategory_remote_insert_fn() '; _stmtList.add_11rb$(element_1067); var element_1068 = ' CREATE OR REPLACE FUNCTION ch_upd_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, NEW.langUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1068); var element_1069 = ' CREATE TRIGGER ch_upd_13_trig AFTER UPDATE OR INSERT ON Language FOR EACH ROW EXECUTE PROCEDURE ch_upd_13_fn(); '; _stmtList.add_11rb$(element_1069); var element_1070 = ' CREATE OR REPLACE FUNCTION ch_del_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, OLD.langUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1070); var element_1071 = ' CREATE TRIGGER ch_del_13_trig AFTER DELETE ON Language FOR EACH ROW EXECUTE PROCEDURE ch_del_13_fn(); '; _stmtList.add_11rb$(element_1071); var element_1072 = 'CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid '; _stmtList.add_11rb$(element_1072); var element_1073 = "CREATE OR REPLACE FUNCTION language_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1073); var element_1074 = ' CREATE TRIGGER language_remote_insert_trig INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW EXECUTE PROCEDURE language_remote_insert_fn() '; _stmtList.add_11rb$(element_1074); var element_1075 = ' CREATE OR REPLACE FUNCTION ch_upd_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, NEW.langVariantUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1075); var element_1076 = ' CREATE TRIGGER ch_upd_10_trig AFTER UPDATE OR INSERT ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_upd_10_fn(); '; _stmtList.add_11rb$(element_1076); var element_1077 = ' CREATE OR REPLACE FUNCTION ch_del_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, OLD.langVariantUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1077); var element_1078 = ' CREATE TRIGGER ch_del_10_trig AFTER DELETE ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_del_10_fn(); '; _stmtList.add_11rb$(element_1078); var element_1079 = 'CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid '; _stmtList.add_11rb$(element_1079); var element_1080 = "CREATE OR REPLACE FUNCTION languagevariant_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1080); var element_1081 = ' CREATE TRIGGER languagevariant_remote_insert_trig INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE languagevariant_remote_insert_fn() '; _stmtList.add_11rb$(element_1081); var element_1082 = ' CREATE OR REPLACE FUNCTION ch_upd_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, NEW.groupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1082); var element_1083 = ' CREATE TRIGGER ch_upd_43_trig AFTER UPDATE OR INSERT ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_43_fn(); '; _stmtList.add_11rb$(element_1083); var element_1084 = ' CREATE OR REPLACE FUNCTION ch_del_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, OLD.groupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1084); var element_1085 = ' CREATE TRIGGER ch_del_43_trig AFTER DELETE ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_43_fn(); '; _stmtList.add_11rb$(element_1085); var element_1086 = 'CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid '; _stmtList.add_11rb$(element_1086); var element_1087 = "CREATE OR REPLACE FUNCTION persongroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1087); var element_1088 = ' CREATE TRIGGER persongroup_remote_insert_trig INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroup_remote_insert_fn() '; _stmtList.add_11rb$(element_1088); var element_1089 = ' CREATE OR REPLACE FUNCTION ch_upd_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, NEW.groupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1089); var element_1090 = ' CREATE TRIGGER ch_upd_44_trig AFTER UPDATE OR INSERT ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_44_fn(); '; _stmtList.add_11rb$(element_1090); var element_1091 = ' CREATE OR REPLACE FUNCTION ch_del_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, OLD.groupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1091); var element_1092 = ' CREATE TRIGGER ch_del_44_trig AFTER DELETE ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_44_fn(); '; _stmtList.add_11rb$(element_1092); var element_1093 = 'CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid '; _stmtList.add_11rb$(element_1093); var element_1094 = "CREATE OR REPLACE FUNCTION persongroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1094); var element_1095 = ' CREATE TRIGGER persongroupmember_remote_insert_trig INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1095); var element_1096 = ' CREATE OR REPLACE FUNCTION ch_upd_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, NEW.personPictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1096); var element_1097 = ' CREATE TRIGGER ch_upd_50_trig AFTER UPDATE OR INSERT ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_50_fn(); '; _stmtList.add_11rb$(element_1097); var element_1098 = ' CREATE OR REPLACE FUNCTION ch_del_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, OLD.personPictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1098); var element_1099 = ' CREATE TRIGGER ch_del_50_trig AFTER DELETE ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_50_fn(); '; _stmtList.add_11rb$(element_1099); var element_1100 = 'CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid '; _stmtList.add_11rb$(element_1100); var element_1101 = "CREATE OR REPLACE FUNCTION personpicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1101); var element_1102 = ' CREATE TRIGGER personpicture_remote_insert_trig INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personpicture_remote_insert_fn() '; _stmtList.add_11rb$(element_1102); var element_1103 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_PersonPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1103); var element_1104 = trimMargin('\n |CREATE TRIGGER attach_PersonPicture_trig\n |AFTER UPDATE ON PersonPicture\n |FOR EACH ROW WHEN (OLD.personPictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_PersonPicture_fn();\n '); _stmtList.add_11rb$(element_1104); var element_1105 = ' CREATE OR REPLACE FUNCTION ch_upd_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, NEW.containerUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1105); var element_1106 = ' CREATE TRIGGER ch_upd_51_trig AFTER UPDATE OR INSERT ON Container FOR EACH ROW EXECUTE PROCEDURE ch_upd_51_fn(); '; _stmtList.add_11rb$(element_1106); var element_1107 = ' CREATE OR REPLACE FUNCTION ch_del_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, OLD.containerUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1107); var element_1108 = ' CREATE TRIGGER ch_del_51_trig AFTER DELETE ON Container FOR EACH ROW EXECUTE PROCEDURE ch_del_51_fn(); '; _stmtList.add_11rb$(element_1108); var element_1109 = 'CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid '; _stmtList.add_11rb$(element_1109); var element_1110 = "CREATE OR REPLACE FUNCTION container_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1110); var element_1111 = ' CREATE TRIGGER container_remote_insert_trig INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW EXECUTE PROCEDURE container_remote_insert_fn() '; _stmtList.add_11rb$(element_1111); var element_1112 = ' CREATE OR REPLACE FUNCTION ch_upd_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, NEW.verbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1112); var element_1113 = ' CREATE TRIGGER ch_upd_62_trig AFTER UPDATE OR INSERT ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_62_fn(); '; _stmtList.add_11rb$(element_1113); var element_1114 = ' CREATE OR REPLACE FUNCTION ch_del_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, OLD.verbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1114); var element_1115 = ' CREATE TRIGGER ch_del_62_trig AFTER DELETE ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_62_fn(); '; _stmtList.add_11rb$(element_1115); var element_1116 = 'CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid '; _stmtList.add_11rb$(element_1116); var element_1117 = "CREATE OR REPLACE FUNCTION verbentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1117); var element_1118 = ' CREATE TRIGGER verbentity_remote_insert_trig INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE verbentity_remote_insert_fn() '; _stmtList.add_11rb$(element_1118); var element_1119 = ' CREATE OR REPLACE FUNCTION ch_upd_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, NEW.xObjectUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1119); var element_1120 = ' CREATE TRIGGER ch_upd_64_trig AFTER UPDATE OR INSERT ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_64_fn(); '; _stmtList.add_11rb$(element_1120); var element_1121 = ' CREATE OR REPLACE FUNCTION ch_del_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, OLD.xObjectUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1121); var element_1122 = ' CREATE TRIGGER ch_del_64_trig AFTER DELETE ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_64_fn(); '; _stmtList.add_11rb$(element_1122); var element_1123 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; _stmtList.add_11rb$(element_1123); var element_1124 = "CREATE OR REPLACE FUNCTION xobjectentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1124); var element_1125 = ' CREATE TRIGGER xobjectentity_remote_insert_trig INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xobjectentity_remote_insert_fn() '; _stmtList.add_11rb$(element_1125); var element_1126 = ' CREATE OR REPLACE FUNCTION ch_upd_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, NEW.statementUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1126); var element_1127 = ' CREATE TRIGGER ch_upd_60_trig AFTER UPDATE OR INSERT ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_60_fn(); '; _stmtList.add_11rb$(element_1127); var element_1128 = ' CREATE OR REPLACE FUNCTION ch_del_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, OLD.statementUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1128); var element_1129 = ' CREATE TRIGGER ch_del_60_trig AFTER DELETE ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_60_fn(); '; _stmtList.add_11rb$(element_1129); var element_1130 = 'CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid '; _stmtList.add_11rb$(element_1130); var element_1131 = "CREATE OR REPLACE FUNCTION statemententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1131); var element_1132 = ' CREATE TRIGGER statemententity_remote_insert_trig INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statemententity_remote_insert_fn() '; _stmtList.add_11rb$(element_1132); var element_1133 = ' CREATE OR REPLACE FUNCTION ch_upd_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, NEW.contextXObjectStatementJoinUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1133); var element_1134 = ' CREATE TRIGGER ch_upd_66_trig AFTER UPDATE OR INSERT ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_66_fn(); '; _stmtList.add_11rb$(element_1134); var element_1135 = ' CREATE OR REPLACE FUNCTION ch_del_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, OLD.contextXObjectStatementJoinUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1135); var element_1136 = ' CREATE TRIGGER ch_del_66_trig AFTER DELETE ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_66_fn(); '; _stmtList.add_11rb$(element_1136); var element_1137 = 'CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid '; _stmtList.add_11rb$(element_1137); var element_1138 = "CREATE OR REPLACE FUNCTION contextxobjectstatementjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1138); var element_1139 = ' CREATE TRIGGER contextxobjectstatementjoin_remote_insert_trig INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contextxobjectstatementjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1139); var element_1140 = ' CREATE OR REPLACE FUNCTION ch_upd_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, NEW.agentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1140); var element_1141 = ' CREATE TRIGGER ch_upd_68_trig AFTER UPDATE OR INSERT ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_68_fn(); '; _stmtList.add_11rb$(element_1141); var element_1142 = ' CREATE OR REPLACE FUNCTION ch_del_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, OLD.agentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1142); var element_1143 = ' CREATE TRIGGER ch_del_68_trig AFTER DELETE ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_68_fn(); '; _stmtList.add_11rb$(element_1143); var element_1144 = 'CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid '; _stmtList.add_11rb$(element_1144); var element_1145 = trimMargin("\n |CREATE OR REPLACE FUNCTION agententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct\n |; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql\n "); _stmtList.add_11rb$(element_1145); var element_1146 = ' CREATE TRIGGER agententity_remote_insert_trig INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE agententity_remote_insert_fn() '; _stmtList.add_11rb$(element_1146); var element_1147 = ' CREATE OR REPLACE FUNCTION ch_upd_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, NEW.stateUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1147); var element_1148 = ' CREATE TRIGGER ch_upd_70_trig AFTER UPDATE OR INSERT ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_70_fn(); '; _stmtList.add_11rb$(element_1148); var element_1149 = ' CREATE OR REPLACE FUNCTION ch_del_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, OLD.stateUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1149); var element_1150 = ' CREATE TRIGGER ch_del_70_trig AFTER DELETE ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_70_fn(); '; _stmtList.add_11rb$(element_1150); var element_1151 = 'CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid '; _stmtList.add_11rb$(element_1151); var element_1152 = "CREATE OR REPLACE FUNCTION stateentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1152); var element_1153 = ' CREATE TRIGGER stateentity_remote_insert_trig INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE stateentity_remote_insert_fn() '; _stmtList.add_11rb$(element_1153); var element_1154 = ' CREATE OR REPLACE FUNCTION ch_upd_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, NEW.stateContentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1154); var element_1155 = ' CREATE TRIGGER ch_upd_72_trig AFTER UPDATE OR INSERT ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_72_fn(); '; _stmtList.add_11rb$(element_1155); var element_1156 = ' CREATE OR REPLACE FUNCTION ch_del_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, OLD.stateContentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1156); var element_1157 = ' CREATE TRIGGER ch_del_72_trig AFTER DELETE ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_72_fn(); '; _stmtList.add_11rb$(element_1157); var element_1158 = 'CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid '; _stmtList.add_11rb$(element_1158); var element_1159 = "CREATE OR REPLACE FUNCTION statecontententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1159); var element_1160 = ' CREATE TRIGGER statecontententity_remote_insert_trig INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statecontententity_remote_insert_fn() '; _stmtList.add_11rb$(element_1160); var element_1161 = ' CREATE OR REPLACE FUNCTION ch_upd_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, NEW.statementLangMapUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1161); var element_1162 = ' CREATE TRIGGER ch_upd_74_trig AFTER UPDATE OR INSERT ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_74_fn(); '; _stmtList.add_11rb$(element_1162); var element_1163 = ' CREATE OR REPLACE FUNCTION ch_del_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, OLD.statementLangMapUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1163); var element_1164 = ' CREATE TRIGGER ch_del_74_trig AFTER DELETE ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_74_fn(); '; _stmtList.add_11rb$(element_1164); var element_1165 = 'CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid '; _stmtList.add_11rb$(element_1165); var element_1166 = "CREATE OR REPLACE FUNCTION xlangmapentry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1166); var element_1167 = ' CREATE TRIGGER xlangmapentry_remote_insert_trig INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xlangmapentry_remote_insert_fn() '; _stmtList.add_11rb$(element_1167); var element_1168 = ' CREATE OR REPLACE FUNCTION ch_upd_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, NEW.schoolUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1168); var element_1169 = ' CREATE TRIGGER ch_upd_164_trig AFTER UPDATE OR INSERT ON School FOR EACH ROW EXECUTE PROCEDURE ch_upd_164_fn(); '; _stmtList.add_11rb$(element_1169); var element_1170 = ' CREATE OR REPLACE FUNCTION ch_del_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, OLD.schoolUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1170); var element_1171 = ' CREATE TRIGGER ch_del_164_trig AFTER DELETE ON School FOR EACH ROW EXECUTE PROCEDURE ch_del_164_fn(); '; _stmtList.add_11rb$(element_1171); var element_1172 = 'CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid '; _stmtList.add_11rb$(element_1172); var element_1173 = "CREATE OR REPLACE FUNCTION school_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1173); var element_1174 = ' CREATE TRIGGER school_remote_insert_trig INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW EXECUTE PROCEDURE school_remote_insert_fn() '; _stmtList.add_11rb$(element_1174); var element_1175 = ' CREATE OR REPLACE FUNCTION ch_upd_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, NEW.schoolMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1175); var element_1176 = ' CREATE TRIGGER ch_upd_200_trig AFTER UPDATE OR INSERT ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_200_fn(); '; _stmtList.add_11rb$(element_1176); var element_1177 = ' CREATE OR REPLACE FUNCTION ch_del_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, OLD.schoolMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1177); var element_1178 = ' CREATE TRIGGER ch_del_200_trig AFTER DELETE ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_del_200_fn(); '; _stmtList.add_11rb$(element_1178); var element_1179 = 'CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid '; _stmtList.add_11rb$(element_1179); var element_1180 = "CREATE OR REPLACE FUNCTION schoolmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1180); var element_1181 = ' CREATE TRIGGER schoolmember_remote_insert_trig INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schoolmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1181); var element_1182 = ' CREATE OR REPLACE FUNCTION ch_upd_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, NEW.commentsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1182); var element_1183 = ' CREATE TRIGGER ch_upd_208_trig AFTER UPDATE OR INSERT ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_upd_208_fn(); '; _stmtList.add_11rb$(element_1183); var element_1184 = ' CREATE OR REPLACE FUNCTION ch_del_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, OLD.commentsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1184); var element_1185 = ' CREATE TRIGGER ch_del_208_trig AFTER DELETE ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_del_208_fn(); '; _stmtList.add_11rb$(element_1185); var element_1186 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; _stmtList.add_11rb$(element_1186); var element_1187 = "CREATE OR REPLACE FUNCTION comments_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1187); var element_1188 = ' CREATE TRIGGER comments_remote_insert_trig INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW EXECUTE PROCEDURE comments_remote_insert_fn() '; _stmtList.add_11rb$(element_1188); var element_1189 = ' CREATE OR REPLACE FUNCTION ch_upd_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, NEW.reportUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1189); var element_1190 = ' CREATE TRIGGER ch_upd_101_trig AFTER UPDATE OR INSERT ON Report FOR EACH ROW EXECUTE PROCEDURE ch_upd_101_fn(); '; _stmtList.add_11rb$(element_1190); var element_1191 = ' CREATE OR REPLACE FUNCTION ch_del_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, OLD.reportUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1191); var element_1192 = ' CREATE TRIGGER ch_del_101_trig AFTER DELETE ON Report FOR EACH ROW EXECUTE PROCEDURE ch_del_101_fn(); '; _stmtList.add_11rb$(element_1192); var element_1193 = 'CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid '; _stmtList.add_11rb$(element_1193); var element_1194 = "CREATE OR REPLACE FUNCTION report_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Report(reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES (NEW.reportUid, NEW.reportOwnerUid, NEW.xAxis, NEW.reportDateRangeSelection, NEW.fromDate, NEW.fromRelTo, NEW.fromRelOffSet, NEW.fromRelUnit, NEW.toDate, NEW.toRelTo, NEW.toRelOffSet, NEW.toRelUnit, NEW.reportTitle, NEW.reportDescription, NEW.reportSeries, NEW.reportInactive, NEW.isTemplate, NEW.priority, NEW.reportTitleId, NEW.reportDescId, NEW.reportMasterChangeSeqNum, NEW.reportLocalChangeSeqNum, NEW.reportLastChangedBy, NEW.reportLct) ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = EXCLUDED.reportOwnerUid, xAxis = EXCLUDED.xAxis, reportDateRangeSelection = EXCLUDED.reportDateRangeSelection, fromDate = EXCLUDED.fromDate, fromRelTo = EXCLUDED.fromRelTo, fromRelOffSet = EXCLUDED.fromRelOffSet, fromRelUnit = EXCLUDED.fromRelUnit, toDate = EXCLUDED.toDate, toRelTo = EXCLUDED.toRelTo, toRelOffSet = EXCLUDED.toRelOffSet, toRelUnit = EXCLUDED.toRelUnit, reportTitle = EXCLUDED.reportTitle, reportDescription = EXCLUDED.reportDescription, reportSeries = EXCLUDED.reportSeries, reportInactive = EXCLUDED.reportInactive, isTemplate = EXCLUDED.isTemplate, priority = EXCLUDED.priority, reportTitleId = EXCLUDED.reportTitleId, reportDescId = EXCLUDED.reportDescId, reportMasterChangeSeqNum = EXCLUDED.reportMasterChangeSeqNum, reportLocalChangeSeqNum = EXCLUDED.reportLocalChangeSeqNum, reportLastChangedBy = EXCLUDED.reportLastChangedBy, reportLct = EXCLUDED.reportLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1194); var element_1195 = ' CREATE TRIGGER report_remote_insert_trig INSTEAD OF INSERT ON Report_ReceiveView FOR EACH ROW EXECUTE PROCEDURE report_remote_insert_fn() '; _stmtList.add_11rb$(element_1195); var element_1196 = ' CREATE OR REPLACE FUNCTION ch_upd_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, NEW.siteUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1196); var element_1197 = ' CREATE TRIGGER ch_upd_189_trig AFTER UPDATE OR INSERT ON Site FOR EACH ROW EXECUTE PROCEDURE ch_upd_189_fn(); '; _stmtList.add_11rb$(element_1197); var element_1198 = ' CREATE OR REPLACE FUNCTION ch_del_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, OLD.siteUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1198); var element_1199 = ' CREATE TRIGGER ch_del_189_trig AFTER DELETE ON Site FOR EACH ROW EXECUTE PROCEDURE ch_del_189_fn(); '; _stmtList.add_11rb$(element_1199); var element_1200 = 'CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid '; _stmtList.add_11rb$(element_1200); var element_1201 = trimMargin("\n |CREATE OR REPLACE FUNCTION site_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt\n |; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql\n "); _stmtList.add_11rb$(element_1201); var element_1202 = ' CREATE TRIGGER site_remote_insert_trig INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW EXECUTE PROCEDURE site_remote_insert_fn() '; _stmtList.add_11rb$(element_1202); var element_1203 = ' CREATE OR REPLACE FUNCTION ch_upd_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, NEW.learnerGroupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1203); var element_1204 = ' CREATE TRIGGER ch_upd_301_trig AFTER UPDATE OR INSERT ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_301_fn(); '; _stmtList.add_11rb$(element_1204); var element_1205 = ' CREATE OR REPLACE FUNCTION ch_del_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, OLD.learnerGroupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1205); var element_1206 = ' CREATE TRIGGER ch_del_301_trig AFTER DELETE ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_301_fn(); '; _stmtList.add_11rb$(element_1206); var element_1207 = 'CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid '; _stmtList.add_11rb$(element_1207); var element_1208 = "CREATE OR REPLACE FUNCTION learnergroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1208); var element_1209 = ' CREATE TRIGGER learnergroup_remote_insert_trig INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroup_remote_insert_fn() '; _stmtList.add_11rb$(element_1209); var element_1210 = ' CREATE OR REPLACE FUNCTION ch_upd_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, NEW.learnerGroupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1210); var element_1211 = ' CREATE TRIGGER ch_upd_300_trig AFTER UPDATE OR INSERT ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_300_fn(); '; _stmtList.add_11rb$(element_1211); var element_1212 = ' CREATE OR REPLACE FUNCTION ch_del_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, OLD.learnerGroupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1212); var element_1213 = ' CREATE TRIGGER ch_del_300_trig AFTER DELETE ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_300_fn(); '; _stmtList.add_11rb$(element_1213); var element_1214 = 'CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid '; _stmtList.add_11rb$(element_1214); var element_1215 = "CREATE OR REPLACE FUNCTION learnergroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1215); var element_1216 = ' CREATE TRIGGER learnergroupmember_remote_insert_trig INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1216); var element_1217 = ' CREATE OR REPLACE FUNCTION ch_upd_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, NEW.groupLearningSessionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1217); var element_1218 = ' CREATE TRIGGER ch_upd_302_trig AFTER UPDATE OR INSERT ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_302_fn(); '; _stmtList.add_11rb$(element_1218); var element_1219 = ' CREATE OR REPLACE FUNCTION ch_del_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, OLD.groupLearningSessionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1219); var element_1220 = ' CREATE TRIGGER ch_del_302_trig AFTER DELETE ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_del_302_fn(); '; _stmtList.add_11rb$(element_1220); var element_1221 = 'CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid '; _stmtList.add_11rb$(element_1221); var element_1222 = "CREATE OR REPLACE FUNCTION grouplearningsession_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1222); var element_1223 = ' CREATE TRIGGER grouplearningsession_remote_insert_trig INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE grouplearningsession_remote_insert_fn() '; _stmtList.add_11rb$(element_1223); var element_1224 = ' CREATE OR REPLACE FUNCTION ch_upd_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, NEW.sTermsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1224); var element_1225 = ' CREATE TRIGGER ch_upd_272_trig AFTER UPDATE OR INSERT ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_upd_272_fn(); '; _stmtList.add_11rb$(element_1225); var element_1226 = ' CREATE OR REPLACE FUNCTION ch_del_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, OLD.sTermsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1226); var element_1227 = ' CREATE TRIGGER ch_del_272_trig AFTER DELETE ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_del_272_fn(); '; _stmtList.add_11rb$(element_1227); var element_1228 = 'CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid '; _stmtList.add_11rb$(element_1228); var element_1229 = "CREATE OR REPLACE FUNCTION siteterms_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1229); var element_1230 = ' CREATE TRIGGER siteterms_remote_insert_trig INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW EXECUTE PROCEDURE siteterms_remote_insert_fn() '; _stmtList.add_11rb$(element_1230); var element_1231 = ' CREATE OR REPLACE FUNCTION ch_upd_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, NEW.ccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1231); var element_1232 = ' CREATE TRIGGER ch_upd_134_trig AFTER UPDATE OR INSERT ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_134_fn(); '; _stmtList.add_11rb$(element_1232); var element_1233 = ' CREATE OR REPLACE FUNCTION ch_del_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, OLD.ccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1233); var element_1234 = ' CREATE TRIGGER ch_del_134_trig AFTER DELETE ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_134_fn(); '; _stmtList.add_11rb$(element_1234); var element_1235 = 'CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid '; _stmtList.add_11rb$(element_1235); var element_1236 = "CREATE OR REPLACE FUNCTION clazzcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1236); var element_1237 = ' CREATE TRIGGER clazzcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzcontentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1237); var element_1238 = ' CREATE OR REPLACE FUNCTION ch_upd_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, NEW.ppjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1238); var element_1239 = ' CREATE TRIGGER ch_upd_512_trig AFTER UPDATE OR INSERT ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_512_fn(); '; _stmtList.add_11rb$(element_1239); var element_1240 = ' CREATE OR REPLACE FUNCTION ch_del_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, OLD.ppjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1240); var element_1241 = ' CREATE TRIGGER ch_del_512_trig AFTER DELETE ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_512_fn(); '; _stmtList.add_11rb$(element_1241); var element_1242 = 'CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid '; _stmtList.add_11rb$(element_1242); var element_1243 = "CREATE OR REPLACE FUNCTION personparentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1243); var element_1244 = ' CREATE TRIGGER personparentjoin_remote_insert_trig INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personparentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1244); var element_1245 = ' CREATE OR REPLACE FUNCTION ch_upd_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, NEW.sgUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1245); var element_1246 = ' CREATE TRIGGER ch_upd_48_trig AFTER UPDATE OR INSERT ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_upd_48_fn(); '; _stmtList.add_11rb$(element_1246); var element_1247 = ' CREATE OR REPLACE FUNCTION ch_del_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, OLD.sgUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1247); var element_1248 = ' CREATE TRIGGER ch_del_48_trig AFTER DELETE ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_del_48_fn(); '; _stmtList.add_11rb$(element_1248); var element_1249 = 'CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid '; _stmtList.add_11rb$(element_1249); var element_1250 = "CREATE OR REPLACE FUNCTION sg_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1250); var element_1251 = ' CREATE TRIGGER sg_remote_insert_trig INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE sg_remote_insert_fn() '; _stmtList.add_11rb$(element_1251); var element_1252 = ' CREATE OR REPLACE FUNCTION ch_upd_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, NEW.errUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1252); var element_1253 = ' CREATE TRIGGER ch_upd_419_trig AFTER UPDATE OR INSERT ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_upd_419_fn(); '; _stmtList.add_11rb$(element_1253); var element_1254 = ' CREATE OR REPLACE FUNCTION ch_del_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, OLD.errUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1254); var element_1255 = ' CREATE TRIGGER ch_del_419_trig AFTER DELETE ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_del_419_fn(); '; _stmtList.add_11rb$(element_1255); var element_1256 = 'CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid '; _stmtList.add_11rb$(element_1256); var element_1257 = "CREATE OR REPLACE FUNCTION errorreport_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1257); var element_1258 = ' CREATE TRIGGER errorreport_remote_insert_trig INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW EXECUTE PROCEDURE errorreport_remote_insert_fn() '; _stmtList.add_11rb$(element_1258); var element_1259 = ' CREATE OR REPLACE FUNCTION ch_upd_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, NEW.caUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1259); var element_1260 = ' CREATE TRIGGER ch_upd_520_trig AFTER UPDATE OR INSERT ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_upd_520_fn(); '; _stmtList.add_11rb$(element_1260); var element_1261 = ' CREATE OR REPLACE FUNCTION ch_del_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, OLD.caUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1261); var element_1262 = ' CREATE TRIGGER ch_del_520_trig AFTER DELETE ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_del_520_fn(); '; _stmtList.add_11rb$(element_1262); var element_1263 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; _stmtList.add_11rb$(element_1263); var element_1264 = "CREATE OR REPLACE FUNCTION clazzassignment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1264); var element_1265 = ' CREATE TRIGGER clazzassignment_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignment_remote_insert_fn() '; _stmtList.add_11rb$(element_1265); var element_1266 = ' CREATE OR REPLACE FUNCTION ch_upd_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, NEW.cacjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1266); var element_1267 = ' CREATE TRIGGER ch_upd_521_trig AFTER UPDATE OR INSERT ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_521_fn(); '; _stmtList.add_11rb$(element_1267); var element_1268 = ' CREATE OR REPLACE FUNCTION ch_del_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, OLD.cacjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1268); var element_1269 = ' CREATE TRIGGER ch_del_521_trig AFTER DELETE ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_521_fn(); '; _stmtList.add_11rb$(element_1269); var element_1270 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; _stmtList.add_11rb$(element_1270); var element_1271 = "CREATE OR REPLACE FUNCTION clazzassignmentcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive,cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjWeight, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjWeight = EXCLUDED.cacjWeight, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1271); var element_1272 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignmentcontentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1272); var element_1273 = ' CREATE OR REPLACE FUNCTION ch_upd_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, NEW.casUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1273); var element_1274 = ' CREATE TRIGGER ch_upd_522_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_upd_522_fn(); '; _stmtList.add_11rb$(element_1274); var element_1275 = ' CREATE OR REPLACE FUNCTION ch_del_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, OLD.casUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1275); var element_1276 = ' CREATE TRIGGER ch_del_522_trig AFTER DELETE ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_del_522_fn(); '; _stmtList.add_11rb$(element_1276); var element_1277 = 'CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid '; _stmtList.add_11rb$(element_1277); var element_1278 = "CREATE OR REPLACE FUNCTION courseassignmentsubmission_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1278); var element_1279 = ' CREATE TRIGGER courseassignmentsubmission_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmission_remote_insert_fn() '; _stmtList.add_11rb$(element_1279); var element_1280 = ' CREATE OR REPLACE FUNCTION ch_upd_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, NEW.casaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1280); var element_1281 = ' CREATE TRIGGER ch_upd_90_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_upd_90_fn(); '; _stmtList.add_11rb$(element_1281); var element_1282 = ' CREATE OR REPLACE FUNCTION ch_del_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, OLD.casaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1282); var element_1283 = ' CREATE TRIGGER ch_del_90_trig AFTER DELETE ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_del_90_fn(); '; _stmtList.add_11rb$(element_1283); var element_1284 = 'CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid '; _stmtList.add_11rb$(element_1284); var element_1285 = "CREATE OR REPLACE FUNCTION courseassignmentsubmissionattachment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType,casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaFileName, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaFileName = EXCLUDED.casaFileName, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1285); var element_1286 = ' CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmissionattachment_remote_insert_fn() '; _stmtList.add_11rb$(element_1286); var element_1287 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_CourseAssignmentSubmissionAttachment_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1287); var element_1288 = trimMargin('\n |CREATE TRIGGER attach_CourseAssignmentSubmissionAttachment_trig\n |AFTER UPDATE ON CourseAssignmentSubmissionAttachment\n |FOR EACH ROW WHEN (OLD.casaMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CourseAssignmentSubmissionAttachment_fn();\n '); _stmtList.add_11rb$(element_1288); var element_1289 = ' CREATE OR REPLACE FUNCTION ch_upd_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, NEW.camUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1289); var element_1290 = ' CREATE TRIGGER ch_upd_523_trig AFTER UPDATE OR INSERT ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_upd_523_fn(); '; _stmtList.add_11rb$(element_1290); var element_1291 = ' CREATE OR REPLACE FUNCTION ch_del_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, OLD.camUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1291); var element_1292 = ' CREATE TRIGGER ch_del_523_trig AFTER DELETE ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_del_523_fn(); '; _stmtList.add_11rb$(element_1292); var element_1293 = 'CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid '; _stmtList.add_11rb$(element_1293); var element_1294 = "CREATE OR REPLACE FUNCTION courseassignmentmark_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1294); var element_1295 = ' CREATE TRIGGER courseassignmentmark_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentmark_remote_insert_fn() '; _stmtList.add_11rb$(element_1295); var element_1296 = ' CREATE OR REPLACE FUNCTION ch_upd_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, NEW.pauthUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1296); var element_1297 = ' CREATE TRIGGER ch_upd_678_trig AFTER UPDATE OR INSERT ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_upd_678_fn(); '; _stmtList.add_11rb$(element_1297); var element_1298 = ' CREATE OR REPLACE FUNCTION ch_del_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, OLD.pauthUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1298); var element_1299 = ' CREATE TRIGGER ch_del_678_trig AFTER DELETE ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_del_678_fn(); '; _stmtList.add_11rb$(element_1299); var element_1300 = 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid '; _stmtList.add_11rb$(element_1300); var element_1301 = "CREATE OR REPLACE FUNCTION personauth2_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1301); var element_1302 = ' CREATE TRIGGER personauth2_remote_insert_trig INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personauth2_remote_insert_fn() '; _stmtList.add_11rb$(element_1302); var element_1303 = ' CREATE OR REPLACE FUNCTION ch_upd_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, NEW.usUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1303); var element_1304 = ' CREATE TRIGGER ch_upd_679_trig AFTER UPDATE OR INSERT ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_679_fn(); '; _stmtList.add_11rb$(element_1304); var element_1305 = ' CREATE OR REPLACE FUNCTION ch_del_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, OLD.usUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1305); var element_1306 = ' CREATE TRIGGER ch_del_679_trig AFTER DELETE ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_del_679_fn(); '; _stmtList.add_11rb$(element_1306); var element_1307 = 'CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid '; _stmtList.add_11rb$(element_1307); var element_1308 = "CREATE OR REPLACE FUNCTION usersession_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) ON CONFLICT (usUid) DO UPDATE SET usPcsn = EXCLUDED.usPcsn, usLcsn = EXCLUDED.usLcsn, usLcb = EXCLUDED.usLcb, usLct = EXCLUDED.usLct, usPersonUid = EXCLUDED.usPersonUid, usClientNodeId = EXCLUDED.usClientNodeId, usStartTime = EXCLUDED.usStartTime, usEndTime = EXCLUDED.usEndTime, usStatus = EXCLUDED.usStatus, usReason = EXCLUDED.usReason, usAuth = EXCLUDED.usAuth, usSessionType = EXCLUDED.usSessionType ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1308); var element_1309 = ' CREATE TRIGGER usersession_remote_insert_trig INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE usersession_remote_insert_fn() '; _stmtList.add_11rb$(element_1309); var element_1310 = ' CREATE OR REPLACE FUNCTION ch_upd_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, NEW.cbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1310); var element_1311 = ' CREATE TRIGGER ch_upd_124_trig AFTER UPDATE OR INSERT ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_upd_124_fn(); '; _stmtList.add_11rb$(element_1311); var element_1312 = ' CREATE OR REPLACE FUNCTION ch_del_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, OLD.cbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1312); var element_1313 = ' CREATE TRIGGER ch_del_124_trig AFTER DELETE ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_del_124_fn(); '; _stmtList.add_11rb$(element_1313); var element_1314 = 'CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid '; _stmtList.add_11rb$(element_1314); var element_1315 = "CREATE OR REPLACE FUNCTION courseblock_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1315); var element_1316 = ' CREATE TRIGGER courseblock_remote_insert_trig INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseblock_remote_insert_fn() '; _stmtList.add_11rb$(element_1316); var element_1317 = ' CREATE OR REPLACE FUNCTION ch_upd_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, NEW.ctUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1317); var element_1318 = ' CREATE TRIGGER ch_upd_450_trig AFTER UPDATE OR INSERT ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_upd_450_fn(); '; _stmtList.add_11rb$(element_1318); var element_1319 = ' CREATE OR REPLACE FUNCTION ch_del_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, OLD.ctUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1319); var element_1320 = ' CREATE TRIGGER ch_del_450_trig AFTER DELETE ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_del_450_fn(); '; _stmtList.add_11rb$(element_1320); var element_1321 = 'CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid '; _stmtList.add_11rb$(element_1321); var element_1322 = "CREATE OR REPLACE FUNCTION courseterminology_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1322); var element_1323 = ' CREATE TRIGGER courseterminology_remote_insert_trig INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseterminology_remote_insert_fn() '; _stmtList.add_11rb$(element_1323); var element_1324 = ' CREATE OR REPLACE FUNCTION ch_upd_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, NEW.cgsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1324); var element_1325 = ' CREATE TRIGGER ch_upd_242_trig AFTER UPDATE OR INSERT ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_upd_242_fn(); '; _stmtList.add_11rb$(element_1325); var element_1326 = ' CREATE OR REPLACE FUNCTION ch_del_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, OLD.cgsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1326); var element_1327 = ' CREATE TRIGGER ch_del_242_trig AFTER DELETE ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_del_242_fn(); '; _stmtList.add_11rb$(element_1327); var element_1328 = 'CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid '; _stmtList.add_11rb$(element_1328); var element_1329 = "CREATE OR REPLACE FUNCTION coursegroupset_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1329); var element_1330 = ' CREATE TRIGGER coursegroupset_remote_insert_trig INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupset_remote_insert_fn() '; _stmtList.add_11rb$(element_1330); var element_1331 = ' CREATE OR REPLACE FUNCTION ch_upd_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, NEW.cgmUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1331); var element_1332 = ' CREATE TRIGGER ch_upd_243_trig AFTER UPDATE OR INSERT ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_243_fn(); '; _stmtList.add_11rb$(element_1332); var element_1333 = ' CREATE OR REPLACE FUNCTION ch_del_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, OLD.cgmUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1333); var element_1334 = ' CREATE TRIGGER ch_del_243_trig AFTER DELETE ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_243_fn(); '; _stmtList.add_11rb$(element_1334); var element_1335 = 'CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid '; _stmtList.add_11rb$(element_1335); var element_1336 = "CREATE OR REPLACE FUNCTION coursegroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1336); var element_1337 = ' CREATE TRIGGER coursegroupmember_remote_insert_trig INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1337); var element_1338 = ' CREATE OR REPLACE FUNCTION ch_upd_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, NEW.coursePictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1338); var element_1339 = ' CREATE TRIGGER ch_upd_125_trig AFTER UPDATE OR INSERT ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_125_fn(); '; _stmtList.add_11rb$(element_1339); var element_1340 = ' CREATE OR REPLACE FUNCTION ch_del_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, OLD.coursePictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1340); var element_1341 = ' CREATE TRIGGER ch_del_125_trig AFTER DELETE ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_del_125_fn(); '; _stmtList.add_11rb$(element_1341); var element_1342 = 'CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid '; _stmtList.add_11rb$(element_1342); var element_1343 = "CREATE OR REPLACE FUNCTION coursepicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1343); var element_1344 = ' CREATE TRIGGER coursepicture_remote_insert_trig INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursepicture_remote_insert_fn() '; _stmtList.add_11rb$(element_1344); var element_1345 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_CoursePicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1345); var element_1346 = trimMargin('\n |CREATE TRIGGER attach_CoursePicture_trig\n |AFTER UPDATE ON CoursePicture\n |FOR EACH ROW WHEN (OLD.coursePictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CoursePicture_fn();\n '); _stmtList.add_11rb$(element_1346); var element_1347 = ' CREATE OR REPLACE FUNCTION ch_upd_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, NEW.cepUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1347); var element_1348 = ' CREATE TRIGGER ch_upd_138_trig AFTER UPDATE OR INSERT ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_138_fn(); '; _stmtList.add_11rb$(element_1348); var element_1349 = ' CREATE OR REPLACE FUNCTION ch_del_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, OLD.cepUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1349); var element_1350 = ' CREATE TRIGGER ch_del_138_trig AFTER DELETE ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_138_fn(); '; _stmtList.add_11rb$(element_1350); var element_1351 = 'CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid '; _stmtList.add_11rb$(element_1351); var element_1352 = "CREATE OR REPLACE FUNCTION ceppicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1352); var element_1353 = ' CREATE TRIGGER ceppicture_remote_insert_trig INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE ceppicture_remote_insert_fn() '; _stmtList.add_11rb$(element_1353); var element_1354 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_ContentEntryPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1354); var element_1355 = trimMargin('\n |CREATE TRIGGER attach_ContentEntryPicture_trig\n |AFTER UPDATE ON ContentEntryPicture\n |FOR EACH ROW WHEN (OLD.cepMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_ContentEntryPicture_fn();\n '); _stmtList.add_11rb$(element_1355); var element_1356 = ' CREATE OR REPLACE FUNCTION ch_upd_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, NEW.chatUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1356); var element_1357 = ' CREATE TRIGGER ch_upd_127_trig AFTER UPDATE OR INSERT ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_upd_127_fn(); '; _stmtList.add_11rb$(element_1357); var element_1358 = ' CREATE OR REPLACE FUNCTION ch_del_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, OLD.chatUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1358); var element_1359 = ' CREATE TRIGGER ch_del_127_trig AFTER DELETE ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_del_127_fn(); '; _stmtList.add_11rb$(element_1359); var element_1360 = 'CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid '; _stmtList.add_11rb$(element_1360); var element_1361 = "CREATE OR REPLACE FUNCTION chat_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1361); var element_1362 = ' CREATE TRIGGER chat_remote_insert_trig INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chat_remote_insert_fn() '; _stmtList.add_11rb$(element_1362); var element_1363 = ' CREATE OR REPLACE FUNCTION ch_upd_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, NEW.chatMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1363); var element_1364 = ' CREATE TRIGGER ch_upd_128_trig AFTER UPDATE OR INSERT ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_128_fn(); '; _stmtList.add_11rb$(element_1364); var element_1365 = ' CREATE OR REPLACE FUNCTION ch_del_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, OLD.chatMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1365); var element_1366 = ' CREATE TRIGGER ch_del_128_trig AFTER DELETE ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_del_128_fn(); '; _stmtList.add_11rb$(element_1366); var element_1367 = 'CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid '; _stmtList.add_11rb$(element_1367); var element_1368 = "CREATE OR REPLACE FUNCTION chatmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1368); var element_1369 = ' CREATE TRIGGER chatmember_remote_insert_trig INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chatmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1369); var element_1370 = ' CREATE OR REPLACE FUNCTION ch_upd_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, NEW.messageUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1370); var element_1371 = ' CREATE TRIGGER ch_upd_126_trig AFTER UPDATE OR INSERT ON Message FOR EACH ROW EXECUTE PROCEDURE ch_upd_126_fn(); '; _stmtList.add_11rb$(element_1371); var element_1372 = ' CREATE OR REPLACE FUNCTION ch_del_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, OLD.messageUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1372); var element_1373 = ' CREATE TRIGGER ch_del_126_trig AFTER DELETE ON Message FOR EACH ROW EXECUTE PROCEDURE ch_del_126_fn(); '; _stmtList.add_11rb$(element_1373); var element_1374 = 'CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid '; _stmtList.add_11rb$(element_1374); var element_1375 = "CREATE OR REPLACE FUNCTION message_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1375); var element_1376 = ' CREATE TRIGGER message_remote_insert_trig INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW EXECUTE PROCEDURE message_remote_insert_fn() '; _stmtList.add_11rb$(element_1376); var element_1377 = ' CREATE OR REPLACE FUNCTION ch_upd_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, NEW.messageReadUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1377); var element_1378 = ' CREATE TRIGGER ch_upd_129_trig AFTER UPDATE OR INSERT ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_upd_129_fn(); '; _stmtList.add_11rb$(element_1378); var element_1379 = ' CREATE OR REPLACE FUNCTION ch_del_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, OLD.messageReadUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1379); var element_1380 = ' CREATE TRIGGER ch_del_129_trig AFTER DELETE ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_del_129_fn(); '; _stmtList.add_11rb$(element_1380); var element_1381 = 'CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid '; _stmtList.add_11rb$(element_1381); var element_1382 = "CREATE OR REPLACE FUNCTION messageread_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1382); var element_1383 = ' CREATE TRIGGER messageread_remote_insert_trig INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW EXECUTE PROCEDURE messageread_remote_insert_fn() '; _stmtList.add_11rb$(element_1383); var element_1384 = ' CREATE OR REPLACE FUNCTION ch_upd_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, NEW.courseDiscussionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1384); var element_1385 = ' CREATE TRIGGER ch_upd_130_trig AFTER UPDATE OR INSERT ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_upd_130_fn(); '; _stmtList.add_11rb$(element_1385); var element_1386 = ' CREATE OR REPLACE FUNCTION ch_del_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, OLD.courseDiscussionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1386); var element_1387 = ' CREATE TRIGGER ch_del_130_trig AFTER DELETE ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_del_130_fn(); '; _stmtList.add_11rb$(element_1387); var element_1388 = 'CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid '; _stmtList.add_11rb$(element_1388); var element_1389 = "CREATE OR REPLACE FUNCTION coursediscussion_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1389); var element_1390 = ' CREATE TRIGGER coursediscussion_remote_insert_trig INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursediscussion_remote_insert_fn() '; _stmtList.add_11rb$(element_1390); var element_1391 = ' CREATE OR REPLACE FUNCTION ch_upd_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, NEW.discussionTopicUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1391); var element_1392 = ' CREATE TRIGGER ch_upd_131_trig AFTER UPDATE OR INSERT ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_upd_131_fn(); '; _stmtList.add_11rb$(element_1392); var element_1393 = ' CREATE OR REPLACE FUNCTION ch_del_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, OLD.discussionTopicUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1393); var element_1394 = ' CREATE TRIGGER ch_del_131_trig AFTER DELETE ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_del_131_fn(); '; _stmtList.add_11rb$(element_1394); var element_1395 = 'CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid '; _stmtList.add_11rb$(element_1395); var element_1396 = "CREATE OR REPLACE FUNCTION discussiontopic_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1396); var element_1397 = ' CREATE TRIGGER discussiontopic_remote_insert_trig INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussiontopic_remote_insert_fn() '; _stmtList.add_11rb$(element_1397); var element_1398 = ' CREATE OR REPLACE FUNCTION ch_upd_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, NEW.discussionPostUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1398); var element_1399 = ' CREATE TRIGGER ch_upd_132_trig AFTER UPDATE OR INSERT ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_upd_132_fn(); '; _stmtList.add_11rb$(element_1399); var element_1400 = ' CREATE OR REPLACE FUNCTION ch_del_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, OLD.discussionPostUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1400); var element_1401 = ' CREATE TRIGGER ch_del_132_trig AFTER DELETE ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_del_132_fn(); '; _stmtList.add_11rb$(element_1401); var element_1402 = 'CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid '; _stmtList.add_11rb$(element_1402); var element_1403 = "CREATE OR REPLACE FUNCTION discussionpost_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1403); var element_1404 = ' CREATE TRIGGER discussionpost_remote_insert_trig INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussionpost_remote_insert_fn() '; _stmtList.add_11rb$(element_1404); break; } return _stmtList; }; UmAppDatabase_JdbcKt.prototype.makeClearAllTablesSql = function () { var _stmtList = ArrayList_init(); var element = 'DELETE FROM NetworkNode'; _stmtList.add_11rb$(element); var element_0 = 'DELETE FROM ClazzLog'; _stmtList.add_11rb$(element_0); var element_1 = 'DELETE FROM ClazzLogAttendanceRecord'; _stmtList.add_11rb$(element_1); var element_2 = 'DELETE FROM Schedule'; _stmtList.add_11rb$(element_2); var element_3 = 'DELETE FROM DateRange'; _stmtList.add_11rb$(element_3); var element_4 = 'DELETE FROM HolidayCalendar'; _stmtList.add_11rb$(element_4); var element_5 = 'DELETE FROM Holiday'; _stmtList.add_11rb$(element_5); var element_6 = 'DELETE FROM ScheduledCheck'; _stmtList.add_11rb$(element_6); var element_7 = 'DELETE FROM AuditLog'; _stmtList.add_11rb$(element_7); var element_8 = 'DELETE FROM CustomField'; _stmtList.add_11rb$(element_8); var element_9 = 'DELETE FROM CustomFieldValue'; _stmtList.add_11rb$(element_9); var element_10 = 'DELETE FROM CustomFieldValueOption'; _stmtList.add_11rb$(element_10); var element_11 = 'DELETE FROM Person'; _stmtList.add_11rb$(element_11); var element_12 = 'DELETE FROM Clazz'; _stmtList.add_11rb$(element_12); var element_13 = 'DELETE FROM ClazzEnrolment'; _stmtList.add_11rb$(element_13); var element_14 = 'DELETE FROM LeavingReason'; _stmtList.add_11rb$(element_14); var element_15 = 'DELETE FROM ContentEntry'; _stmtList.add_11rb$(element_15); var element_16 = 'DELETE FROM ContentEntryContentCategoryJoin'; _stmtList.add_11rb$(element_16); var element_17 = 'DELETE FROM ContentEntryParentChildJoin'; _stmtList.add_11rb$(element_17); var element_18 = 'DELETE FROM ContentEntryRelatedEntryJoin'; _stmtList.add_11rb$(element_18); var element_19 = 'DELETE FROM ContentCategorySchema'; _stmtList.add_11rb$(element_19); var element_20 = 'DELETE FROM ContentCategory'; _stmtList.add_11rb$(element_20); var element_21 = 'DELETE FROM Language'; _stmtList.add_11rb$(element_21); var element_22 = 'DELETE FROM LanguageVariant'; _stmtList.add_11rb$(element_22); var element_23 = 'DELETE FROM AccessToken'; _stmtList.add_11rb$(element_23); var element_24 = 'DELETE FROM PersonAuth'; _stmtList.add_11rb$(element_24); var element_25 = 'DELETE FROM Role'; _stmtList.add_11rb$(element_25); var element_26 = 'DELETE FROM EntityRole'; _stmtList.add_11rb$(element_26); var element_27 = 'DELETE FROM PersonGroup'; _stmtList.add_11rb$(element_27); var element_28 = 'DELETE FROM PersonGroupMember'; _stmtList.add_11rb$(element_28); var element_29 = 'DELETE FROM PersonPicture'; _stmtList.add_11rb$(element_29); var element_30 = 'DELETE FROM ScrapeQueueItem'; _stmtList.add_11rb$(element_30); var element_31 = 'DELETE FROM ScrapeRun'; _stmtList.add_11rb$(element_31); var element_32 = 'DELETE FROM ConnectivityStatus'; _stmtList.add_11rb$(element_32); var element_33 = 'DELETE FROM Container'; _stmtList.add_11rb$(element_33); var element_34 = 'DELETE FROM ContainerEntry'; _stmtList.add_11rb$(element_34); var element_35 = 'DELETE FROM ContainerEntryFile'; _stmtList.add_11rb$(element_35); var element_36 = 'DELETE FROM VerbEntity'; _stmtList.add_11rb$(element_36); var element_37 = 'DELETE FROM XObjectEntity'; _stmtList.add_11rb$(element_37); var element_38 = 'DELETE FROM StatementEntity'; _stmtList.add_11rb$(element_38); var element_39 = 'DELETE FROM ContextXObjectStatementJoin'; _stmtList.add_11rb$(element_39); var element_40 = 'DELETE FROM AgentEntity'; _stmtList.add_11rb$(element_40); var element_41 = 'DELETE FROM StateEntity'; _stmtList.add_11rb$(element_41); var element_42 = 'DELETE FROM StateContentEntity'; _stmtList.add_11rb$(element_42); var element_43 = 'DELETE FROM XLangMapEntry'; _stmtList.add_11rb$(element_43); var element_44 = 'DELETE FROM SyncNode'; _stmtList.add_11rb$(element_44); var element_45 = 'DELETE FROM LocallyAvailableContainer'; _stmtList.add_11rb$(element_45); var element_46 = 'DELETE FROM ContainerETag'; _stmtList.add_11rb$(element_46); var element_47 = 'DELETE FROM School'; _stmtList.add_11rb$(element_47); var element_48 = 'DELETE FROM SchoolMember'; _stmtList.add_11rb$(element_48); var element_49 = 'DELETE FROM Comments'; _stmtList.add_11rb$(element_49); var element_50 = 'DELETE FROM Report'; _stmtList.add_11rb$(element_50); var element_51 = 'DELETE FROM Site'; _stmtList.add_11rb$(element_51); var element_52 = 'DELETE FROM ContainerImportJob'; _stmtList.add_11rb$(element_52); var element_53 = 'DELETE FROM LearnerGroup'; _stmtList.add_11rb$(element_53); var element_54 = 'DELETE FROM LearnerGroupMember'; _stmtList.add_11rb$(element_54); var element_55 = 'DELETE FROM GroupLearningSession'; _stmtList.add_11rb$(element_55); var element_56 = 'DELETE FROM SiteTerms'; _stmtList.add_11rb$(element_56); var element_57 = 'DELETE FROM ClazzContentJoin'; _stmtList.add_11rb$(element_57); var element_58 = 'DELETE FROM PersonParentJoin'; _stmtList.add_11rb$(element_58); var element_59 = 'DELETE FROM ScopedGrant'; _stmtList.add_11rb$(element_59); var element_60 = 'DELETE FROM ErrorReport'; _stmtList.add_11rb$(element_60); var element_61 = 'DELETE FROM ClazzAssignment'; _stmtList.add_11rb$(element_61); var element_62 = 'DELETE FROM ClazzAssignmentContentJoin'; _stmtList.add_11rb$(element_62); var element_63 = 'DELETE FROM CourseAssignmentSubmission'; _stmtList.add_11rb$(element_63); var element_64 = 'DELETE FROM CourseAssignmentSubmissionAttachment'; _stmtList.add_11rb$(element_64); var element_65 = 'DELETE FROM CourseAssignmentMark'; _stmtList.add_11rb$(element_65); var element_66 = 'DELETE FROM ClazzAssignmentRollUp'; _stmtList.add_11rb$(element_66); var element_67 = 'DELETE FROM PersonAuth2'; _stmtList.add_11rb$(element_67); var element_68 = 'DELETE FROM UserSession'; _stmtList.add_11rb$(element_68); var element_69 = 'DELETE FROM ContentJob'; _stmtList.add_11rb$(element_69); var element_70 = 'DELETE FROM ContentJobItem'; _stmtList.add_11rb$(element_70); var element_71 = 'DELETE FROM CourseBlock'; _stmtList.add_11rb$(element_71); var element_72 = 'DELETE FROM CourseTerminology'; _stmtList.add_11rb$(element_72); var element_73 = 'DELETE FROM CourseGroupSet'; _stmtList.add_11rb$(element_73); var element_74 = 'DELETE FROM CourseGroupMember'; _stmtList.add_11rb$(element_74); var element_75 = 'DELETE FROM SqliteChangeSeqNums'; _stmtList.add_11rb$(element_75); var element_76 = 'DELETE FROM UpdateNotification'; _stmtList.add_11rb$(element_76); var element_77 = 'DELETE FROM ChangeLog'; _stmtList.add_11rb$(element_77); var element_78 = 'DELETE FROM ZombieAttachmentData'; _stmtList.add_11rb$(element_78); var element_79 = 'DELETE FROM DoorNode'; _stmtList.add_11rb$(element_79); var element_80 = 'DELETE FROM ReplicationStatus'; _stmtList.add_11rb$(element_80); var element_81 = 'DELETE FROM ClazzLogReplicate'; _stmtList.add_11rb$(element_81); var element_82 = 'DELETE FROM ClazzLogAttendanceRecordReplicate'; _stmtList.add_11rb$(element_82); var element_83 = 'DELETE FROM CourseAssignmentSubmissionReplicate'; _stmtList.add_11rb$(element_83); var element_84 = 'DELETE FROM CourseAssignmentSubmissionAttachmentReplicate'; _stmtList.add_11rb$(element_84); var element_85 = 'DELETE FROM CourseAssignmentMarkReplicate'; _stmtList.add_11rb$(element_85); var element_86 = 'DELETE FROM CourseBlockReplicate'; _stmtList.add_11rb$(element_86); var element_87 = 'DELETE FROM CourseTerminologyReplicate'; _stmtList.add_11rb$(element_87); var element_88 = 'DELETE FROM CourseGroupSetReplicate'; _stmtList.add_11rb$(element_88); var element_89 = 'DELETE FROM CourseGroupMemberReplicate'; _stmtList.add_11rb$(element_89); var element_90 = 'DELETE FROM ScheduleReplicate'; _stmtList.add_11rb$(element_90); var element_91 = 'DELETE FROM HolidayCalendarReplicate'; _stmtList.add_11rb$(element_91); var element_92 = 'DELETE FROM HolidayReplicate'; _stmtList.add_11rb$(element_92); var element_93 = 'DELETE FROM PersonReplicate'; _stmtList.add_11rb$(element_93); var element_94 = 'DELETE FROM ClazzReplicate'; _stmtList.add_11rb$(element_94); var element_95 = 'DELETE FROM ClazzEnrolmentReplicate'; _stmtList.add_11rb$(element_95); var element_96 = 'DELETE FROM LeavingReasonReplicate'; _stmtList.add_11rb$(element_96); var element_97 = 'DELETE FROM ContentEntryReplicate'; _stmtList.add_11rb$(element_97); var element_98 = 'DELETE FROM ContentEntryContentCategoryJoinReplicate'; _stmtList.add_11rb$(element_98); var element_99 = 'DELETE FROM ContentEntryParentChildJoinReplicate'; _stmtList.add_11rb$(element_99); var element_100 = 'DELETE FROM ContentEntryRelatedEntryJoinReplicate'; _stmtList.add_11rb$(element_100); var element_101 = 'DELETE FROM ContentCategorySchemaReplicate'; _stmtList.add_11rb$(element_101); var element_102 = 'DELETE FROM ContentCategoryReplicate'; _stmtList.add_11rb$(element_102); var element_103 = 'DELETE FROM LanguageReplicate'; _stmtList.add_11rb$(element_103); var element_104 = 'DELETE FROM LanguageVariantReplicate'; _stmtList.add_11rb$(element_104); var element_105 = 'DELETE FROM PersonGroupReplicate'; _stmtList.add_11rb$(element_105); var element_106 = 'DELETE FROM PersonGroupMemberReplicate'; _stmtList.add_11rb$(element_106); var element_107 = 'DELETE FROM PersonPictureReplicate'; _stmtList.add_11rb$(element_107); var element_108 = 'DELETE FROM ContainerReplicate'; _stmtList.add_11rb$(element_108); var element_109 = 'DELETE FROM VerbEntityReplicate'; _stmtList.add_11rb$(element_109); var element_110 = 'DELETE FROM XObjectEntityReplicate'; _stmtList.add_11rb$(element_110); var element_111 = 'DELETE FROM StatementEntityReplicate'; _stmtList.add_11rb$(element_111); var element_112 = 'DELETE FROM ContextXObjectStatementJoinReplicate'; _stmtList.add_11rb$(element_112); var element_113 = 'DELETE FROM AgentEntityReplicate'; _stmtList.add_11rb$(element_113); var element_114 = 'DELETE FROM StateEntityReplicate'; _stmtList.add_11rb$(element_114); var element_115 = 'DELETE FROM StateContentEntityReplicate'; _stmtList.add_11rb$(element_115); var element_116 = 'DELETE FROM XLangMapEntryReplicate'; _stmtList.add_11rb$(element_116); var element_117 = 'DELETE FROM SchoolReplicate'; _stmtList.add_11rb$(element_117); var element_118 = 'DELETE FROM SchoolMemberReplicate'; _stmtList.add_11rb$(element_118); var element_119 = 'DELETE FROM CommentsReplicate'; _stmtList.add_11rb$(element_119); var element_120 = 'DELETE FROM ReportReplicate'; _stmtList.add_11rb$(element_120); var element_121 = 'DELETE FROM SiteReplicate'; _stmtList.add_11rb$(element_121); var element_122 = 'DELETE FROM LearnerGroupReplicate'; _stmtList.add_11rb$(element_122); var element_123 = 'DELETE FROM LearnerGroupMemberReplicate'; _stmtList.add_11rb$(element_123); var element_124 = 'DELETE FROM GroupLearningSessionReplicate'; _stmtList.add_11rb$(element_124); var element_125 = 'DELETE FROM SiteTermsReplicate'; _stmtList.add_11rb$(element_125); var element_126 = 'DELETE FROM ClazzContentJoinReplicate'; _stmtList.add_11rb$(element_126); var element_127 = 'DELETE FROM PersonParentJoinReplicate'; _stmtList.add_11rb$(element_127); var element_128 = 'DELETE FROM ScopedGrantReplicate'; _stmtList.add_11rb$(element_128); var element_129 = 'DELETE FROM ErrorReportReplicate'; _stmtList.add_11rb$(element_129); var element_130 = 'DELETE FROM ClazzAssignmentReplicate'; _stmtList.add_11rb$(element_130); var element_131 = 'DELETE FROM ClazzAssignmentContentJoinReplicate'; _stmtList.add_11rb$(element_131); var element_132 = 'DELETE FROM PersonAuth2Replicate'; _stmtList.add_11rb$(element_132); var element_133 = 'DELETE FROM UserSessionReplicate'; _stmtList.add_11rb$(element_133); var element_134 = 'DELETE FROM CoursePicture'; _stmtList.add_11rb$(element_134); var element_135 = 'DELETE FROM CoursePictureReplicate'; _stmtList.add_11rb$(element_135); var element_136 = 'DELETE FROM ContentEntryPicture'; _stmtList.add_11rb$(element_136); var element_137 = 'DELETE FROM ContentEntryPictureReplicate'; _stmtList.add_11rb$(element_137); var element_138 = 'DELETE FROM Chat'; _stmtList.add_11rb$(element_138); var element_139 = 'DELETE FROM ChatMember'; _stmtList.add_11rb$(element_139); var element_140 = 'DELETE FROM Message'; _stmtList.add_11rb$(element_140); var element_141 = 'DELETE FROM MessageReplicate'; _stmtList.add_11rb$(element_141); var element_142 = 'DELETE FROM ChatReplicate'; _stmtList.add_11rb$(element_142); var element_143 = 'DELETE FROM ChatMemberReplicate'; _stmtList.add_11rb$(element_143); var element_144 = 'DELETE FROM MessageRead'; _stmtList.add_11rb$(element_144); var element_145 = 'DELETE FROM MessageReadReplicate'; _stmtList.add_11rb$(element_145); var element_146 = 'DELETE FROM CourseDiscussion'; _stmtList.add_11rb$(element_146); var element_147 = 'DELETE FROM CourseDiscussionReplicate'; _stmtList.add_11rb$(element_147); var element_148 = 'DELETE FROM DiscussionTopic'; _stmtList.add_11rb$(element_148); var element_149 = 'DELETE FROM DiscussionTopicReplicate'; _stmtList.add_11rb$(element_149); var element_150 = 'DELETE FROM DiscussionPost'; _stmtList.add_11rb$(element_150); var element_151 = 'DELETE FROM DiscussionPostReplicate'; _stmtList.add_11rb$(element_151); return _stmtList; }; UmAppDatabase_JdbcKt.prototype.clearAllTables = function () { throw IllegalStateException_init('clearAllTables synchronous not supported on Javascript'); }; function Coroutine$clearAllTablesAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$clearAllTablesAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$clearAllTablesAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$clearAllTablesAsync.prototype.constructor = Coroutine$clearAllTablesAsync; Coroutine$clearAllTablesAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.execSQLBatchAsyncJs_vqirvp$(copyToArray(this.$this.makeClearAllTablesSql()).slice(), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_JdbcKt.prototype.clearAllTablesAsync = function (continuation_0, suspended) { var instance = new Coroutine$clearAllTablesAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UmAppDatabase_JdbcKt$realReplicationNotificationDispatcher$lambda(this$UmAppDatabase_JdbcKt) { return function () { if (equals(this$UmAppDatabase_JdbcKt, get_rootDatabase(this$UmAppDatabase_JdbcKt))) { return new ReplicationNotificationDispatcher(this$UmAppDatabase_JdbcKt, new UmAppDatabase_ReplicationRunOnChangeRunner(this$UmAppDatabase_JdbcKt), coroutines.GlobalScope); } else { return get_replicationNotificationDispatcher(get_rootDatabase(this$UmAppDatabase_JdbcKt)); } }; } function UmAppDatabase_JdbcKt$realNodeIdAuthCache$lambda(this$UmAppDatabase_JdbcKt) { return function () { if (equals(this$UmAppDatabase_JdbcKt, get_rootDatabase(this$UmAppDatabase_JdbcKt))) { var nodeIdAuthCache = new NodeIdAuthCache(this$UmAppDatabase_JdbcKt); nodeIdAuthCache.addNewNodeListener_jgigus$(this$UmAppDatabase_JdbcKt.realReplicationNotificationDispatcher); return nodeIdAuthCache; } else { return get_nodeIdAuthCache(get_rootDatabase(this$UmAppDatabase_JdbcKt)); } }; } function UmAppDatabase_JdbcKt$realPrimaryKeyManager$lambda(this$UmAppDatabase_JdbcKt) { return function () { if (this$UmAppDatabase_JdbcKt.isInTransaction) { throw IllegalStateException_init('doorPrimaryKeyManager must be used on root database ONLY, not transaction wrapper!'); }return new DoorPrimaryKeyManager(doorDatabaseMetadata(getKClass(UmAppDatabase)).replicateEntities.keys); }; } function UmAppDatabase_JdbcKt$_NetworkNodeDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new NetworkNodeDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseBlockDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseBlockDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseTerminologyDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseTerminologyDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseGroupSetDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseGroupSetDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseGroupMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseGroupMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzEnrolmentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzEnrolmentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LeavingReasonDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LeavingReasonDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryContentCategoryJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryContentCategoryJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryParentChildJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryParentChildJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryRelatedEntryJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryRelatedEntryJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzContentJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzContentJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentCategorySchemaDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentCategorySchemaDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentCategoryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentCategoryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LanguageDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LanguageDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LanguageVariantDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LanguageVariantDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScrapeQueueItemDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScrapeQueueItemDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonAuthDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonAuthDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonGroupDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonGroupDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonGroupMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonGroupMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_EntityRoleDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new EntityRoleDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonPictureDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonPictureDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScrapeRunDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScrapeRunDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ConnectivityStatusDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ConnectivityStatusDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerEntryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerEntryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerEntryFileDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerEntryFileDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerETagDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerETagDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_VerbDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new VerbDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_XObjectDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new XObjectDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ReportDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ReportDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerImportJobDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerImportJobDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_StatementDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new StatementDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContextXObjectStatementJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContextXObjectStatementJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_StateDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new StateDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_StateContentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new StateContentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_AgentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new AgentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LearnerGroupDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LearnerGroupDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LearnerGroupMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LearnerGroupMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_GroupLearningSessionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new GroupLearningSessionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzLogAttendanceRecordDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzLogAttendanceRecordDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzLogDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzLogDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CustomFieldDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CustomFieldDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CustomFieldValueDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CustomFieldValueDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CustomFieldValueOptionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CustomFieldValueOptionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScheduleDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScheduleDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScheduledCheckDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScheduledCheckDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_HolidayCalendarDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new HolidayCalendarDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_HolidayDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new HolidayDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SchoolDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SchoolDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_XLangMapEntryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new XLangMapEntryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LocallyAvailableContainerDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LocallyAvailableContainerDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SchoolMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SchoolMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzAssignmentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzAssignmentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzAssignmentContentJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzAssignmentContentJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzAssignmentRollUpDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzAssignmentRollUpDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseAssignmentSubmissionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionAttachmentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseAssignmentSubmissionAttachmentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseAssignmentMarkDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseAssignmentMarkDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CommentsDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CommentsDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SyncNodeDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SyncNodeDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SiteDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SiteDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SiteTermsDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SiteTermsDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonParentJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonParentJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScopedGrantDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScopedGrantDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ErrorReportDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ErrorReportDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonAuth2Dao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonAuth2Dao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_UserSessionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new UserSessionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentJobItemDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentJobItemDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentJobDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentJobDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CoursePictureDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CoursePictureDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryPictureDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryPictureDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ChatDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ChatDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ChatMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ChatMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_MessageDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new MessageDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_MessageReadDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new MessageReadDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseDiscussionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseDiscussionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_DiscussionTopicDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new DiscussionTopicDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_DiscussionPostDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new DiscussionPostDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } UmAppDatabase_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_JdbcKt', interfaces: [DoorDatabaseJdbc, UmAppDatabase]}; function UmAppDatabase_ReplicateWrapper(_db) { UmAppDatabase.call(this); this._db_0 = _db; this._PersonDao_z4p9xw$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonDao$lambda(this)); this._ClazzDao_yxezhz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzDao$lambda(this)); this._CourseBlockDao_i86l99$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseBlockDao$lambda(this)); this._CourseTerminologyDao_f5vdrr$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseTerminologyDao$lambda(this)); this._CourseGroupSetDao_xqwtyb$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseGroupSetDao$lambda(this)); this._CourseGroupMemberDao_q315bl$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseGroupMemberDao$lambda(this)); this._ClazzEnrolmentDao_oy22mt$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzEnrolmentDao$lambda(this)); this._LeavingReasonDao_4srg53$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LeavingReasonDao$lambda(this)); this._ContentEntryDao_bny0zs$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryDao$lambda(this)); this._ContentEntryContentCategoryJoinDao_xqhj8n$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryContentCategoryJoinDao$lambda(this)); this._ContentEntryParentChildJoinDao_z4w8fg$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryParentChildJoinDao$lambda(this)); this._ContentEntryRelatedEntryJoinDao_4n64nr$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryRelatedEntryJoinDao$lambda(this)); this._ClazzContentJoinDao_jtpmiy$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzContentJoinDao$lambda(this)); this._ContentCategorySchemaDao_7v6m4p$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentCategorySchemaDao$lambda(this)); this._ContentCategoryDao_5p3nm0$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentCategoryDao$lambda(this)); this._LanguageDao_4effpz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LanguageDao$lambda(this)); this._LanguageVariantDao_3ts532$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LanguageVariantDao$lambda(this)); this._PersonGroupDao_uoc3q3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonGroupDao$lambda(this)); this._PersonGroupMemberDao_hw3wwl$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonGroupMemberDao$lambda(this)); this._PersonPictureDao_oehixy$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonPictureDao$lambda(this)); this._ContainerDao_y4hlv6$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContainerDao$lambda(this)); this._VerbDao_p6904i$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_VerbDao$lambda(this)); this._XObjectDao_414f3s$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_XObjectDao$lambda(this)); this._ReportDao_f6l1xp$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ReportDao$lambda(this)); this._StatementDao_8blrs0$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_StatementDao$lambda(this)); this._ContextXObjectStatementJoinDao_grco9q$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContextXObjectStatementJoinDao$lambda(this)); this._StateDao_1nkqke$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_StateDao$lambda(this)); this._StateContentDao_yxj9d3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_StateContentDao$lambda(this)); this._AgentDao_4pjncm$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_AgentDao$lambda(this)); this._LearnerGroupDao_d12bg3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LearnerGroupDao$lambda(this)); this._LearnerGroupMemberDao_yxhk6x$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LearnerGroupMemberDao$lambda(this)); this._GroupLearningSessionDao_wyleco$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_GroupLearningSessionDao$lambda(this)); this._ClazzLogAttendanceRecordDao_8wntrv$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzLogAttendanceRecordDao$lambda(this)); this._ClazzLogDao_x9zu45$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzLogDao$lambda(this)); this._ScheduleDao_ctbune$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ScheduleDao$lambda(this)); this._HolidayCalendarDao_ulk4x3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_HolidayCalendarDao$lambda(this)); this._HolidayDao_o65v9l$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_HolidayDao$lambda(this)); this._SchoolDao_mbg6cz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SchoolDao$lambda(this)); this._XLangMapEntryDao_8igs4z$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_XLangMapEntryDao$lambda(this)); this._SchoolMemberDao_t3wkt$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SchoolMemberDao$lambda(this)); this._ClazzAssignmentDao_3ritje$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzAssignmentDao$lambda(this)); this._ClazzAssignmentContentJoinDao_c3dv5p$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzAssignmentContentJoinDao$lambda(this)); this._CourseAssignmentSubmissionDao_3ulqsz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionDao$lambda(this)); this._CourseAssignmentSubmissionAttachmentDao_ib6fwq$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionAttachmentDao$lambda(this)); this._CourseAssignmentMarkDao_m886vg$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseAssignmentMarkDao$lambda(this)); this._CommentsDao_il4mj1$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CommentsDao$lambda(this)); this._SiteDao_j3be4m$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SiteDao$lambda(this)); this._SiteTermsDao_7vhenl$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SiteTermsDao$lambda(this)); this._PersonParentJoinDao_a70e5k$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonParentJoinDao$lambda(this)); this._ScopedGrantDao_wu1qzn$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ScopedGrantDao$lambda(this)); this._ErrorReportDao_yuub65$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ErrorReportDao$lambda(this)); this._PersonAuth2Dao_7mmgyu$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonAuth2Dao$lambda(this)); this._UserSessionDao_9evou4$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_UserSessionDao$lambda(this)); this._CoursePictureDao_3orl8$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CoursePictureDao$lambda(this)); this._ContentEntryPictureDao_j5086u$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryPictureDao$lambda(this)); this._ChatDao_vp405z$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ChatDao$lambda(this)); this._ChatMemberDao_xtv975$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ChatMemberDao$lambda(this)); this._MessageDao_glinco$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_MessageDao$lambda(this)); this._MessageReadDao_n0br0y$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_MessageReadDao$lambda(this)); this._CourseDiscussionDao_2sbhnm$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseDiscussionDao$lambda(this)); this._DiscussionTopicDao_4z0ot4$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_DiscussionTopicDao$lambda(this)); this._DiscussionPostDao_7vrkiv$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_DiscussionPostDao$lambda(this)); } Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'dbVersion', {configurable: true, get: function () { return 106; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'dbName', {configurable: true, get: function () { return 'DoorWrapper for [' + this._db_0.toString() + ']'; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'networkNodeDao', {configurable: true, get: function () { return this._db_0.networkNodeDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonDao', {configurable: true, get: function () { return this._PersonDao_z4p9xw$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personDao', {configurable: true, get: function () { return this._PersonDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzDao', {configurable: true, get: function () { return this._ClazzDao_yxezhz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzDao', {configurable: true, get: function () { return this._ClazzDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao_i86l99$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao_f5vdrr$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao_xqwtyb$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao_q315bl$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao_oy22mt$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LeavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao_4srg53$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'leavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao_bny0zs$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_xqhj8n$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_z4w8fg$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_4n64nr$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao_jtpmiy$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao_7v6m4p$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao_5p3nm0$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LanguageDao', {configurable: true, get: function () { return this._LanguageDao_4effpz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'languageDao', {configurable: true, get: function () { return this._LanguageDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LanguageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao_3ts532$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'languageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scrapeQueueItemDao', {configurable: true, get: function () { return this._db_0.scrapeQueueItemDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personAuthDao', {configurable: true, get: function () { return this._db_0.personAuthDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonGroupDao', {configurable: true, get: function () { return this._PersonGroupDao_uoc3q3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personGroupDao', {configurable: true, get: function () { return this._PersonGroupDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao_hw3wwl$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'entityRoleDao', {configurable: true, get: function () { return this._db_0.entityRoleDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonPictureDao', {configurable: true, get: function () { return this._PersonPictureDao_oehixy$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personPictureDao', {configurable: true, get: function () { return this._PersonPictureDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scrapeRunDao', {configurable: true, get: function () { return this._db_0.scrapeRunDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'connectivityStatusDao', {configurable: true, get: function () { return this._db_0.connectivityStatusDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContainerDao', {configurable: true, get: function () { return this._ContainerDao_y4hlv6$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerDao', {configurable: true, get: function () { return this._ContainerDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerEntryDao', {configurable: true, get: function () { return this._db_0.containerEntryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerEntryFileDao', {configurable: true, get: function () { return this._db_0.containerEntryFileDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerETagDao', {configurable: true, get: function () { return this._db_0.containerETagDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_VerbDao', {configurable: true, get: function () { return this._VerbDao_p6904i$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'verbDao', {configurable: true, get: function () { return this._VerbDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_XObjectDao', {configurable: true, get: function () { return this._XObjectDao_414f3s$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'xObjectDao', {configurable: true, get: function () { return this._XObjectDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ReportDao', {configurable: true, get: function () { return this._ReportDao_f6l1xp$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'reportDao', {configurable: true, get: function () { return this._ReportDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerImportJobDao', {configurable: true, get: function () { return this._db_0.containerImportJobDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_StatementDao', {configurable: true, get: function () { return this._StatementDao_8blrs0$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'statementDao', {configurable: true, get: function () { return this._StatementDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_grco9q$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_StateDao', {configurable: true, get: function () { return this._StateDao_1nkqke$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'stateDao', {configurable: true, get: function () { return this._StateDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_StateContentDao', {configurable: true, get: function () { return this._StateContentDao_yxj9d3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'stateContentDao', {configurable: true, get: function () { return this._StateContentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_AgentDao', {configurable: true, get: function () { return this._AgentDao_4pjncm$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'agentDao', {configurable: true, get: function () { return this._AgentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LearnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao_d12bg3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'learnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LearnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao_yxhk6x$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'learnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_GroupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao_wyleco$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'groupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_8wntrv$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao_x9zu45$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'customFieldDao', {configurable: true, get: function () { return this._db_0.customFieldDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'customFieldValueDao', {configurable: true, get: function () { return this._db_0.customFieldValueDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'customFieldValueOptionDao', {configurable: true, get: function () { return this._db_0.customFieldValueOptionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ScheduleDao', {configurable: true, get: function () { return this._ScheduleDao_ctbune$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scheduleDao', {configurable: true, get: function () { return this._ScheduleDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scheduledCheckDao', {configurable: true, get: function () { return this._db_0.scheduledCheckDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_HolidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao_ulk4x3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'holidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_HolidayDao', {configurable: true, get: function () { return this._HolidayDao_o65v9l$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'holidayDao', {configurable: true, get: function () { return this._HolidayDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SchoolDao', {configurable: true, get: function () { return this._SchoolDao_mbg6cz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'schoolDao', {configurable: true, get: function () { return this._SchoolDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_XLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao_8igs4z$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'xLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'locallyAvailableContainerDao', {configurable: true, get: function () { return this._db_0.locallyAvailableContainerDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SchoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao_t3wkt$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'schoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao_3ritje$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_c3dv5p$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'cacheClazzAssignmentDao', {configurable: true, get: function () { return this._db_0.cacheClazzAssignmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_3ulqsz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_ib6fwq$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_m886vg$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CommentsDao', {configurable: true, get: function () { return this._CommentsDao_il4mj1$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'commentsDao', {configurable: true, get: function () { return this._CommentsDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'syncNodeDao', {configurable: true, get: function () { return this._db_0.syncNodeDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SiteDao', {configurable: true, get: function () { return this._SiteDao_j3be4m$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'siteDao', {configurable: true, get: function () { return this._SiteDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SiteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao_7vhenl$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'siteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao_a70e5k$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ScopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao_wu1qzn$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ErrorReportDao', {configurable: true, get: function () { return this._ErrorReportDao_yuub65$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'errorReportDao', {configurable: true, get: function () { return this._ErrorReportDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao_7mmgyu$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_UserSessionDao', {configurable: true, get: function () { return this._UserSessionDao_9evou4$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'userSessionDao', {configurable: true, get: function () { return this._UserSessionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentJobItemDao', {configurable: true, get: function () { return this._db_0.contentJobItemDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentJobDao', {configurable: true, get: function () { return this._db_0.contentJobDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CoursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao_3orl8$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'coursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao_j5086u$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ChatDao', {configurable: true, get: function () { return this._ChatDao_vp405z$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'chatDao', {configurable: true, get: function () { return this._ChatDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ChatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao_xtv975$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'chatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_MessageDao', {configurable: true, get: function () { return this._MessageDao_glinco$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'messageDao', {configurable: true, get: function () { return this._MessageDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_MessageReadDao', {configurable: true, get: function () { return this._MessageReadDao_n0br0y$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'messageReadDao', {configurable: true, get: function () { return this._MessageReadDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao_2sbhnm$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_DiscussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao_4z0ot4$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'discussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_DiscussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao_7vrkiv$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'discussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'realDatabase', {configurable: true, get: function () { return this._db_0; }}); UmAppDatabase_ReplicateWrapper.prototype.createAllTables = function () { return this._db_0.createAllTables(); }; function Coroutine$clearAllTablesAsync_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$clearAllTablesAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$clearAllTablesAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$clearAllTablesAsync_0.prototype.constructor = Coroutine$clearAllTablesAsync_0; Coroutine$clearAllTablesAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._db_0.clearAllTablesAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicateWrapper.prototype.clearAllTablesAsync = function (continuation_0, suspended) { var instance = new Coroutine$clearAllTablesAsync_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UmAppDatabase_ReplicateWrapper.prototype.clearAllTables = function () { this._db_0.clearAllTables(); }; UmAppDatabase_ReplicateWrapper.prototype.runInTransaction_771g0p$ = function (body) { this._db_0.runInTransaction_771g0p$(body); }; function UmAppDatabase_ReplicateWrapper$_PersonDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseBlockDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseBlockDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseBlockDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseTerminologyDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseTerminologyDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseTerminologyDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseGroupSetDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseGroupSetDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseGroupSetDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseGroupMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseGroupMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseGroupMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzEnrolmentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzEnrolmentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzEnrolmentDao); }; } function UmAppDatabase_ReplicateWrapper$_LeavingReasonDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LeavingReasonDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.leavingReasonDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryContentCategoryJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryContentCategoryJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryContentCategoryJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryParentChildJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryParentChildJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryParentChildJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryRelatedEntryJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryRelatedEntryJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryRelatedEntryJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzContentJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzContentJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzContentJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentCategorySchemaDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentCategorySchemaDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentCategorySchemaDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentCategoryDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentCategoryDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentCategoryDao); }; } function UmAppDatabase_ReplicateWrapper$_LanguageDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LanguageDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.languageDao); }; } function UmAppDatabase_ReplicateWrapper$_LanguageVariantDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LanguageVariantDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.languageVariantDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonGroupDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonGroupDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personGroupDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonGroupMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonGroupMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personGroupMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonPictureDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonPictureDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personPictureDao); }; } function UmAppDatabase_ReplicateWrapper$_ContainerDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContainerDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.containerDao); }; } function UmAppDatabase_ReplicateWrapper$_VerbDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new VerbDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.verbDao); }; } function UmAppDatabase_ReplicateWrapper$_XObjectDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new XObjectDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.xObjectDao); }; } function UmAppDatabase_ReplicateWrapper$_ReportDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ReportDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.reportDao); }; } function UmAppDatabase_ReplicateWrapper$_StatementDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new StatementDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.statementDao); }; } function UmAppDatabase_ReplicateWrapper$_ContextXObjectStatementJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContextXObjectStatementJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contextXObjectStatementJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_StateDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new StateDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.stateDao); }; } function UmAppDatabase_ReplicateWrapper$_StateContentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new StateContentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.stateContentDao); }; } function UmAppDatabase_ReplicateWrapper$_AgentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new AgentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.agentDao); }; } function UmAppDatabase_ReplicateWrapper$_LearnerGroupDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LearnerGroupDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.learnerGroupDao); }; } function UmAppDatabase_ReplicateWrapper$_LearnerGroupMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LearnerGroupMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.learnerGroupMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_GroupLearningSessionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new GroupLearningSessionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.groupLearningSessionDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzLogAttendanceRecordDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzLogAttendanceRecordDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzLogAttendanceRecordDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzLogDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzLogDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzLogDao); }; } function UmAppDatabase_ReplicateWrapper$_ScheduleDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ScheduleDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.scheduleDao); }; } function UmAppDatabase_ReplicateWrapper$_HolidayCalendarDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new HolidayCalendarDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.holidayCalendarDao); }; } function UmAppDatabase_ReplicateWrapper$_HolidayDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new HolidayDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.holidayDao); }; } function UmAppDatabase_ReplicateWrapper$_SchoolDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SchoolDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.schoolDao); }; } function UmAppDatabase_ReplicateWrapper$_XLangMapEntryDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new XLangMapEntryDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.xLangMapEntryDao); }; } function UmAppDatabase_ReplicateWrapper$_SchoolMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SchoolMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.schoolMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzAssignmentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzAssignmentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzAssignmentDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzAssignmentContentJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzAssignmentContentJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzAssignmentContentJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseAssignmentSubmissionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseAssignmentSubmissionDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionAttachmentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseAssignmentSubmissionAttachmentDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseAssignmentMarkDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseAssignmentMarkDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseAssignmentMarkDao); }; } function UmAppDatabase_ReplicateWrapper$_CommentsDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CommentsDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.commentsDao); }; } function UmAppDatabase_ReplicateWrapper$_SiteDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SiteDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.siteDao); }; } function UmAppDatabase_ReplicateWrapper$_SiteTermsDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SiteTermsDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.siteTermsDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonParentJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonParentJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personParentJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ScopedGrantDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ScopedGrantDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.scopedGrantDao); }; } function UmAppDatabase_ReplicateWrapper$_ErrorReportDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ErrorReportDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.errorReportDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonAuth2Dao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonAuth2Dao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personAuth2Dao); }; } function UmAppDatabase_ReplicateWrapper$_UserSessionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new UserSessionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.userSessionDao); }; } function UmAppDatabase_ReplicateWrapper$_CoursePictureDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CoursePictureDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.coursePictureDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryPictureDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryPictureDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryPictureDao); }; } function UmAppDatabase_ReplicateWrapper$_ChatDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ChatDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.chatDao); }; } function UmAppDatabase_ReplicateWrapper$_ChatMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ChatMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.chatMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_MessageDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new MessageDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.messageDao); }; } function UmAppDatabase_ReplicateWrapper$_MessageReadDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new MessageReadDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.messageReadDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseDiscussionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseDiscussionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseDiscussionDao); }; } function UmAppDatabase_ReplicateWrapper$_DiscussionTopicDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new DiscussionTopicDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.discussionTopicDao); }; } function UmAppDatabase_ReplicateWrapper$_DiscussionPostDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new DiscussionPostDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.discussionPostDao); }; } UmAppDatabase_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_ReplicateWrapper', interfaces: [DoorDatabaseReplicateWrapper, UmAppDatabase]}; function UmAppDatabase_ReplicationRunOnChangeRunner(_db) { this._db_0 = _db; } function Coroutine$handleClazzLogChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzLogChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzLogChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzLogChanged_0.prototype.constructor = Coroutine$handleClazzLogChanged_0; Coroutine$handleClazzLogChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzLogDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 14, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzLog'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzLogChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzLogChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzLogAttendanceRecordChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzLogAttendanceRecordChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzLogAttendanceRecordChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzLogAttendanceRecordChanged_0.prototype.constructor = Coroutine$handleClazzLogAttendanceRecordChanged_0; Coroutine$handleClazzLogAttendanceRecordChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzLogAttendanceRecordDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 15, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzLogAttendanceRecord'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzLogAttendanceRecordChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzLogAttendanceRecordChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleScheduleChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleScheduleChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleScheduleChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleScheduleChanged_0.prototype.constructor = Coroutine$handleScheduleChanged_0; Coroutine$handleScheduleChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.scheduleDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 21, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Schedule'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleScheduleChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleScheduleChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleHolidayCalendarChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleHolidayCalendarChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleHolidayCalendarChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleHolidayCalendarChanged_0.prototype.constructor = Coroutine$handleHolidayCalendarChanged_0; Coroutine$handleHolidayCalendarChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.holidayCalendarDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 28, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('HolidayCalendar'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleHolidayCalendarChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleHolidayCalendarChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleHolidayChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleHolidayChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleHolidayChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleHolidayChanged_0.prototype.constructor = Coroutine$handleHolidayChanged_0; Coroutine$handleHolidayChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.holidayDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Holiday'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleHolidayChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleHolidayChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonChanged_0.prototype.constructor = Coroutine$handlePersonChanged_0; Coroutine$handlePersonChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Person'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzChanged_0.prototype.constructor = Coroutine$handleClazzChanged_0; Coroutine$handleClazzChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 6, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Clazz'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzEnrolmentChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzEnrolmentChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzEnrolmentChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzEnrolmentChanged_0.prototype.constructor = Coroutine$handleClazzEnrolmentChanged_0; Coroutine$handleClazzEnrolmentChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzEnrolmentDao.replicateClazzEnrolmentOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 65, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzEnrolment'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzEnrolmentChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzEnrolmentChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLeavingReasonChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLeavingReasonChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLeavingReasonChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLeavingReasonChanged_0.prototype.constructor = Coroutine$handleLeavingReasonChanged_0; Coroutine$handleLeavingReasonChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.leavingReasonDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 410, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LeavingReason'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLeavingReasonChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLeavingReasonChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryChanged_0.prototype.constructor = Coroutine$handleContentEntryChanged_0; Coroutine$handleContentEntryChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 42, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntry'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryContentCategoryJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryContentCategoryJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryContentCategoryJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryContentCategoryJoinChanged_0.prototype.constructor = Coroutine$handleContentEntryContentCategoryJoinChanged_0; Coroutine$handleContentEntryContentCategoryJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryContentCategoryJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 3, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryContentCategoryJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryContentCategoryJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryContentCategoryJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryParentChildJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryParentChildJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryParentChildJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryParentChildJoinChanged_0.prototype.constructor = Coroutine$handleContentEntryParentChildJoinChanged_0; Coroutine$handleContentEntryParentChildJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryParentChildJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 7, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryParentChildJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryParentChildJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryParentChildJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryRelatedEntryJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryRelatedEntryJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryRelatedEntryJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryRelatedEntryJoinChanged_0.prototype.constructor = Coroutine$handleContentEntryRelatedEntryJoinChanged_0; Coroutine$handleContentEntryRelatedEntryJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryRelatedEntryJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 8, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryRelatedEntryJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryRelatedEntryJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryRelatedEntryJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentCategorySchemaChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentCategorySchemaChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentCategorySchemaChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentCategorySchemaChanged_0.prototype.constructor = Coroutine$handleContentCategorySchemaChanged_0; Coroutine$handleContentCategorySchemaChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentCategorySchemaDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 2, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentCategorySchema'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentCategorySchemaChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentCategorySchemaChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentCategoryChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentCategoryChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentCategoryChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentCategoryChanged_0.prototype.constructor = Coroutine$handleContentCategoryChanged_0; Coroutine$handleContentCategoryChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentCategoryDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentCategory'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentCategoryChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentCategoryChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLanguageChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLanguageChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLanguageChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLanguageChanged_0.prototype.constructor = Coroutine$handleLanguageChanged_0; Coroutine$handleLanguageChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.languageDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 13, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Language'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLanguageChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLanguageChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLanguageVariantChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLanguageVariantChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLanguageVariantChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLanguageVariantChanged_0.prototype.constructor = Coroutine$handleLanguageVariantChanged_0; Coroutine$handleLanguageVariantChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.languageVariantDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 10, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LanguageVariant'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLanguageVariantChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLanguageVariantChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonGroupChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonGroupChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonGroupChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonGroupChanged_0.prototype.constructor = Coroutine$handlePersonGroupChanged_0; Coroutine$handlePersonGroupChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: this.state_0 = 5; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: this.state_0 = 6; this.result_0 = deleteFromChangeLog(this.local$$receiver, 43, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return setOf('PersonGroup'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonGroupChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonGroupChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonGroupMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonGroupMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonGroupMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonGroupMemberChanged_0.prototype.constructor = Coroutine$handlePersonGroupMemberChanged_0; Coroutine$handlePersonGroupMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personGroupMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.personGroupMemberDao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = this.local$$receiver.personGroupMemberDao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: this.state_0 = 5; this.result_0 = deleteFromChangeLog(this.local$$receiver, 44, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return setOf('PersonGroupMember'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonGroupMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonGroupMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonPictureChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonPictureChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonPictureChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonPictureChanged_0.prototype.constructor = Coroutine$handlePersonPictureChanged_0; Coroutine$handlePersonPictureChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personPictureDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 50, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('PersonPicture'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonPictureChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonPictureChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContainerChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContainerChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContainerChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContainerChanged_0.prototype.constructor = Coroutine$handleContainerChanged_0; Coroutine$handleContainerChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.containerDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 51, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Container'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContainerChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContainerChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleVerbEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleVerbEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleVerbEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleVerbEntityChanged_0.prototype.constructor = Coroutine$handleVerbEntityChanged_0; Coroutine$handleVerbEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.verbDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 62, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('VerbEntity'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleVerbEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleVerbEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleXObjectEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleXObjectEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleXObjectEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleXObjectEntityChanged_0.prototype.constructor = Coroutine$handleXObjectEntityChanged_0; Coroutine$handleXObjectEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.xObjectDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 64, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('XObjectEntity'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleXObjectEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleXObjectEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleStatementEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleStatementEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleStatementEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleStatementEntityChanged_0.prototype.constructor = Coroutine$handleStatementEntityChanged_0; Coroutine$handleStatementEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.statementDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 60, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('StatementEntity'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleStatementEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleStatementEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContextXObjectStatementJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContextXObjectStatementJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContextXObjectStatementJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContextXObjectStatementJoinChanged_0.prototype.constructor = Coroutine$handleContextXObjectStatementJoinChanged_0; Coroutine$handleContextXObjectStatementJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contextXObjectStatementJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 66, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContextXObjectStatementJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContextXObjectStatementJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContextXObjectStatementJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleAgentEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleAgentEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleAgentEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleAgentEntityChanged_0.prototype.constructor = Coroutine$handleAgentEntityChanged_0; Coroutine$handleAgentEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.agentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 68, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('AgentEntity'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleAgentEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleAgentEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleStateEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleStateEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleStateEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleStateEntityChanged_0.prototype.constructor = Coroutine$handleStateEntityChanged_0; Coroutine$handleStateEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.stateDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 70, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('StateEntity'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleStateEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleStateEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleStateContentEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleStateContentEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleStateContentEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleStateContentEntityChanged_0.prototype.constructor = Coroutine$handleStateContentEntityChanged_0; Coroutine$handleStateContentEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.stateContentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 72, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('StateContentEntity'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleStateContentEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleStateContentEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleXLangMapEntryChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleXLangMapEntryChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleXLangMapEntryChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleXLangMapEntryChanged_0.prototype.constructor = Coroutine$handleXLangMapEntryChanged_0; Coroutine$handleXLangMapEntryChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.xLangMapEntryDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 74, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('XLangMapEntry'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleXLangMapEntryChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleXLangMapEntryChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSchoolChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSchoolChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSchoolChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSchoolChanged_0.prototype.constructor = Coroutine$handleSchoolChanged_0; Coroutine$handleSchoolChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.schoolDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 164, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('School'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSchoolChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSchoolChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSchoolMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSchoolMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSchoolMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSchoolMemberChanged_0.prototype.constructor = Coroutine$handleSchoolMemberChanged_0; Coroutine$handleSchoolMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.schoolMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 200, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('SchoolMember'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSchoolMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSchoolMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCommentsChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCommentsChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCommentsChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCommentsChanged_0.prototype.constructor = Coroutine$handleCommentsChanged_0; Coroutine$handleCommentsChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.commentsDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 208, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Comments'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCommentsChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCommentsChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleReportChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleReportChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleReportChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleReportChanged_0.prototype.constructor = Coroutine$handleReportChanged_0; Coroutine$handleReportChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.reportDao.replicateOnChangeTemplates(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 101, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Report'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleReportChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleReportChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSiteChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSiteChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSiteChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSiteChanged_0.prototype.constructor = Coroutine$handleSiteChanged_0; Coroutine$handleSiteChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.siteDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 189, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Site'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSiteChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSiteChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLearnerGroupChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLearnerGroupChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLearnerGroupChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLearnerGroupChanged_0.prototype.constructor = Coroutine$handleLearnerGroupChanged_0; Coroutine$handleLearnerGroupChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.learnerGroupDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 301, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LearnerGroup'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLearnerGroupChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLearnerGroupChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLearnerGroupMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLearnerGroupMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLearnerGroupMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLearnerGroupMemberChanged_0.prototype.constructor = Coroutine$handleLearnerGroupMemberChanged_0; Coroutine$handleLearnerGroupMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.learnerGroupMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 300, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LearnerGroupMember'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLearnerGroupMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLearnerGroupMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleGroupLearningSessionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleGroupLearningSessionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleGroupLearningSessionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleGroupLearningSessionChanged_0.prototype.constructor = Coroutine$handleGroupLearningSessionChanged_0; Coroutine$handleGroupLearningSessionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.groupLearningSessionDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 302, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('GroupLearningSession'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleGroupLearningSessionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleGroupLearningSessionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSiteTermsChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSiteTermsChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSiteTermsChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSiteTermsChanged_0.prototype.constructor = Coroutine$handleSiteTermsChanged_0; Coroutine$handleSiteTermsChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.siteTermsDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 272, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('SiteTerms'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSiteTermsChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSiteTermsChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzContentJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzContentJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzContentJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzContentJoinChanged_0.prototype.constructor = Coroutine$handleClazzContentJoinChanged_0; Coroutine$handleClazzContentJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzContentJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 134, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzContentJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzContentJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzContentJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonParentJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonParentJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonParentJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonParentJoinChanged_0.prototype.constructor = Coroutine$handlePersonParentJoinChanged_0; Coroutine$handlePersonParentJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personParentJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 512, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('PersonParentJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonParentJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonParentJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleScopedGrantChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleScopedGrantChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleScopedGrantChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleScopedGrantChanged_0.prototype.constructor = Coroutine$handleScopedGrantChanged_0; Coroutine$handleScopedGrantChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: this.state_0 = 5; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: this.state_0 = 6; this.result_0 = deleteFromChangeLog(this.local$$receiver, 48, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return setOf('ScopedGrant'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleScopedGrantChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleScopedGrantChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleErrorReportChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleErrorReportChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleErrorReportChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleErrorReportChanged_0.prototype.constructor = Coroutine$handleErrorReportChanged_0; Coroutine$handleErrorReportChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.errorReportDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 419, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ErrorReport'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleErrorReportChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleErrorReportChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzAssignmentChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzAssignmentChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzAssignmentChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzAssignmentChanged_0.prototype.constructor = Coroutine$handleClazzAssignmentChanged_0; Coroutine$handleClazzAssignmentChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzAssignmentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 520, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzAssignment'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzAssignmentChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzAssignmentChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzAssignmentContentJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzAssignmentContentJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzAssignmentContentJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzAssignmentContentJoinChanged_0.prototype.constructor = Coroutine$handleClazzAssignmentContentJoinChanged_0; Coroutine$handleClazzAssignmentContentJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzAssignmentContentJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 521, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzAssignmentContentJoin'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzAssignmentContentJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzAssignmentContentJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseAssignmentSubmissionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseAssignmentSubmissionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseAssignmentSubmissionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseAssignmentSubmissionChanged_0.prototype.constructor = Coroutine$handleCourseAssignmentSubmissionChanged_0; Coroutine$handleCourseAssignmentSubmissionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseAssignmentSubmissionDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 522, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseAssignmentSubmission'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseAssignmentSubmissionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseAssignmentSubmissionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.prototype.constructor = Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0; Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseAssignmentSubmissionAttachmentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 90, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseAssignmentSubmissionAttachment'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseAssignmentSubmissionAttachmentChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseAssignmentMarkChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseAssignmentMarkChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseAssignmentMarkChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseAssignmentMarkChanged_0.prototype.constructor = Coroutine$handleCourseAssignmentMarkChanged_0; Coroutine$handleCourseAssignmentMarkChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseAssignmentMarkDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 523, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseAssignmentMark'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseAssignmentMarkChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseAssignmentMarkChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonAuth2Changed_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonAuth2Changed_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonAuth2Changed_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonAuth2Changed_0.prototype.constructor = Coroutine$handlePersonAuth2Changed_0; Coroutine$handlePersonAuth2Changed_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personAuth2Dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 678, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('PersonAuth2'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonAuth2Changed_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonAuth2Changed_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleUserSessionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleUserSessionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleUserSessionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleUserSessionChanged_0.prototype.constructor = Coroutine$handleUserSessionChanged_0; Coroutine$handleUserSessionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.userSessionDao.updateReplicationTrackers(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 679, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('UserSession'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleUserSessionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleUserSessionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseBlockChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseBlockChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseBlockChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseBlockChanged_0.prototype.constructor = Coroutine$handleCourseBlockChanged_0; Coroutine$handleCourseBlockChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseBlockDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseBlock'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseBlockChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseBlockChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseTerminologyChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseTerminologyChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseTerminologyChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseTerminologyChanged_0.prototype.constructor = Coroutine$handleCourseTerminologyChanged_0; Coroutine$handleCourseTerminologyChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseTerminologyDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 450, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseTerminology'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseTerminologyChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseTerminologyChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseGroupSetChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseGroupSetChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseGroupSetChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseGroupSetChanged_0.prototype.constructor = Coroutine$handleCourseGroupSetChanged_0; Coroutine$handleCourseGroupSetChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseGroupSetDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 242, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseGroupSet'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseGroupSetChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseGroupSetChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseGroupMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseGroupMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseGroupMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseGroupMemberChanged_0.prototype.constructor = Coroutine$handleCourseGroupMemberChanged_0; Coroutine$handleCourseGroupMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseGroupMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 243, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseGroupMember'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseGroupMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseGroupMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCoursePictureChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCoursePictureChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCoursePictureChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCoursePictureChanged_0.prototype.constructor = Coroutine$handleCoursePictureChanged_0; Coroutine$handleCoursePictureChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.coursePictureDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 125, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CoursePicture'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCoursePictureChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCoursePictureChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryPictureChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryPictureChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryPictureChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryPictureChanged_0.prototype.constructor = Coroutine$handleContentEntryPictureChanged_0; Coroutine$handleContentEntryPictureChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryPictureDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 138, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryPicture'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryPictureChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryPictureChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleChatChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleChatChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleChatChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleChatChanged_0.prototype.constructor = Coroutine$handleChatChanged_0; Coroutine$handleChatChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.chatDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 127, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Chat'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleChatChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleChatChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleChatMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleChatMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleChatMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleChatMemberChanged_0.prototype.constructor = Coroutine$handleChatMemberChanged_0; Coroutine$handleChatMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.chatMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 128, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ChatMember'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleChatMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleChatMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleMessageChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleMessageChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleMessageChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleMessageChanged_0.prototype.constructor = Coroutine$handleMessageChanged_0; Coroutine$handleMessageChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.messageDao.replicateOnChangeChat(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.messageDao.replicateOnChangePosts(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = deleteFromChangeLog(this.local$$receiver, 126, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return setOf('Message'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleMessageChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleMessageChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleMessageReadChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleMessageReadChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleMessageReadChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleMessageReadChanged_0.prototype.constructor = Coroutine$handleMessageReadChanged_0; Coroutine$handleMessageReadChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.messageReadDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 129, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('MessageRead'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleMessageReadChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleMessageReadChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseDiscussionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseDiscussionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseDiscussionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseDiscussionChanged_0.prototype.constructor = Coroutine$handleCourseDiscussionChanged_0; Coroutine$handleCourseDiscussionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseDiscussionDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseDiscussion'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseDiscussionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseDiscussionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleDiscussionTopicChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleDiscussionTopicChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleDiscussionTopicChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleDiscussionTopicChanged_0.prototype.constructor = Coroutine$handleDiscussionTopicChanged_0; Coroutine$handleDiscussionTopicChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.discussionTopicDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('DiscussionTopic'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleDiscussionTopicChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleDiscussionTopicChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleDiscussionPostChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleDiscussionPostChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleDiscussionPostChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleDiscussionPostChanged_0.prototype.constructor = Coroutine$handleDiscussionPostChanged_0; Coroutine$handleDiscussionPostChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.discussionPostDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 132, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('DiscussionPost'); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleDiscussionPostChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleDiscussionPostChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(closure$tableNames_0, closure$_checkPendingNotifications_0, this$UmAppDatabase_ReplicationRunOnChangeRunner_0, _transactionDb_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableNames = closure$tableNames_0; this.local$closure$_checkPendingNotifications = closure$_checkPendingNotifications_0; this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner = this$UmAppDatabase_ReplicationRunOnChangeRunner_0; this.local$_transactionDb = _transactionDb_0; } Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.prototype.constructor = Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: if (this.local$closure$tableNames.contains_11rb$('ClazzLog')) { this.state_0 = 2; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzLogChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 3; continue; case 3: if (this.local$closure$tableNames.contains_11rb$('ClazzLogAttendanceRecord')) { this.state_0 = 4; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzLogAttendanceRecordChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 5; continue; } case 4: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 5; continue; case 5: if (this.local$closure$tableNames.contains_11rb$('Schedule')) { this.state_0 = 6; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleScheduleChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 7; continue; } case 6: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 7; continue; case 7: if (this.local$closure$tableNames.contains_11rb$('HolidayCalendar')) { this.state_0 = 8; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleHolidayCalendarChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 9; continue; } case 8: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 9; continue; case 9: if (this.local$closure$tableNames.contains_11rb$('Holiday')) { this.state_0 = 10; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleHolidayChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 11; continue; } case 10: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 11; continue; case 11: if (this.local$closure$tableNames.contains_11rb$('Person')) { this.state_0 = 12; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 13; continue; } case 12: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 13; continue; case 13: if (this.local$closure$tableNames.contains_11rb$('Clazz')) { this.state_0 = 14; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 15; continue; } case 14: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 15; continue; case 15: if (this.local$closure$tableNames.contains_11rb$('ClazzEnrolment')) { this.state_0 = 16; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzEnrolmentChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 17; continue; } case 16: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 17; continue; case 17: if (this.local$closure$tableNames.contains_11rb$('LeavingReason')) { this.state_0 = 18; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLeavingReasonChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 19; continue; } case 18: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 19; continue; case 19: if (this.local$closure$tableNames.contains_11rb$('ContentEntry')) { this.state_0 = 20; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 21; continue; } case 20: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 21; continue; case 21: if (this.local$closure$tableNames.contains_11rb$('ContentEntryContentCategoryJoin')) { this.state_0 = 22; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryContentCategoryJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 23; continue; } case 22: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 23; continue; case 23: if (this.local$closure$tableNames.contains_11rb$('ContentEntryParentChildJoin')) { this.state_0 = 24; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryParentChildJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 25; continue; } case 24: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 25; continue; case 25: if (this.local$closure$tableNames.contains_11rb$('ContentEntryRelatedEntryJoin')) { this.state_0 = 26; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryRelatedEntryJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 27; continue; } case 26: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 27; continue; case 27: if (this.local$closure$tableNames.contains_11rb$('ContentCategorySchema')) { this.state_0 = 28; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentCategorySchemaChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 29; continue; } case 28: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 29; continue; case 29: if (this.local$closure$tableNames.contains_11rb$('ContentCategory')) { this.state_0 = 30; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentCategoryChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 31; continue; } case 30: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 31; continue; case 31: if (this.local$closure$tableNames.contains_11rb$('Language')) { this.state_0 = 32; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLanguageChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 33; continue; } case 32: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 33; continue; case 33: if (this.local$closure$tableNames.contains_11rb$('LanguageVariant')) { this.state_0 = 34; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLanguageVariantChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 35; continue; } case 34: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 35; continue; case 35: if (this.local$closure$tableNames.contains_11rb$('PersonGroup')) { this.state_0 = 36; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonGroupChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 37; continue; } case 36: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 37; continue; case 37: if (this.local$closure$tableNames.contains_11rb$('PersonGroupMember')) { this.state_0 = 38; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonGroupMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 39; continue; } case 38: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 39; continue; case 39: if (this.local$closure$tableNames.contains_11rb$('PersonPicture')) { this.state_0 = 40; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonPictureChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 41; continue; } case 40: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 41; continue; case 41: if (this.local$closure$tableNames.contains_11rb$('Container')) { this.state_0 = 42; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContainerChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 43; continue; } case 42: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 43; continue; case 43: if (this.local$closure$tableNames.contains_11rb$('VerbEntity')) { this.state_0 = 44; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleVerbEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 45; continue; } case 44: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 45; continue; case 45: if (this.local$closure$tableNames.contains_11rb$('XObjectEntity')) { this.state_0 = 46; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleXObjectEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 47; continue; } case 46: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 47; continue; case 47: if (this.local$closure$tableNames.contains_11rb$('StatementEntity')) { this.state_0 = 48; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleStatementEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 49; continue; } case 48: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 49; continue; case 49: if (this.local$closure$tableNames.contains_11rb$('ContextXObjectStatementJoin')) { this.state_0 = 50; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContextXObjectStatementJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 51; continue; } case 50: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 51; continue; case 51: if (this.local$closure$tableNames.contains_11rb$('AgentEntity')) { this.state_0 = 52; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleAgentEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 53; continue; } case 52: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 53; continue; case 53: if (this.local$closure$tableNames.contains_11rb$('StateEntity')) { this.state_0 = 54; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleStateEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 55; continue; } case 54: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 55; continue; case 55: if (this.local$closure$tableNames.contains_11rb$('StateContentEntity')) { this.state_0 = 56; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleStateContentEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 57; continue; } case 56: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 57; continue; case 57: if (this.local$closure$tableNames.contains_11rb$('XLangMapEntry')) { this.state_0 = 58; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleXLangMapEntryChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 59; continue; } case 58: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 59; continue; case 59: if (this.local$closure$tableNames.contains_11rb$('School')) { this.state_0 = 60; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSchoolChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 61; continue; } case 60: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 61; continue; case 61: if (this.local$closure$tableNames.contains_11rb$('SchoolMember')) { this.state_0 = 62; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSchoolMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 63; continue; } case 62: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 63; continue; case 63: if (this.local$closure$tableNames.contains_11rb$('Comments')) { this.state_0 = 64; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCommentsChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 65; continue; } case 64: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 65; continue; case 65: if (this.local$closure$tableNames.contains_11rb$('Report')) { this.state_0 = 66; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleReportChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 67; continue; } case 66: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 67; continue; case 67: if (this.local$closure$tableNames.contains_11rb$('Site')) { this.state_0 = 68; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSiteChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 69; continue; } case 68: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 69; continue; case 69: if (this.local$closure$tableNames.contains_11rb$('LearnerGroup')) { this.state_0 = 70; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLearnerGroupChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 71; continue; } case 70: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 71; continue; case 71: if (this.local$closure$tableNames.contains_11rb$('LearnerGroupMember')) { this.state_0 = 72; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLearnerGroupMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 73; continue; } case 72: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 73; continue; case 73: if (this.local$closure$tableNames.contains_11rb$('GroupLearningSession')) { this.state_0 = 74; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleGroupLearningSessionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 75; continue; } case 74: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 75; continue; case 75: if (this.local$closure$tableNames.contains_11rb$('SiteTerms')) { this.state_0 = 76; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSiteTermsChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 77; continue; } case 76: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 77; continue; case 77: if (this.local$closure$tableNames.contains_11rb$('ClazzContentJoin')) { this.state_0 = 78; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzContentJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 79; continue; } case 78: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 79; continue; case 79: if (this.local$closure$tableNames.contains_11rb$('PersonParentJoin')) { this.state_0 = 80; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonParentJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 81; continue; } case 80: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 81; continue; case 81: if (this.local$closure$tableNames.contains_11rb$('ScopedGrant')) { this.state_0 = 82; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleScopedGrantChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 83; continue; } case 82: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 83; continue; case 83: if (this.local$closure$tableNames.contains_11rb$('ErrorReport')) { this.state_0 = 84; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleErrorReportChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 85; continue; } case 84: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 85; continue; case 85: if (this.local$closure$tableNames.contains_11rb$('ClazzAssignment')) { this.state_0 = 86; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzAssignmentChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 87; continue; } case 86: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 87; continue; case 87: if (this.local$closure$tableNames.contains_11rb$('ClazzAssignmentContentJoin')) { this.state_0 = 88; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzAssignmentContentJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 89; continue; } case 88: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 89; continue; case 89: if (this.local$closure$tableNames.contains_11rb$('CourseAssignmentSubmission')) { this.state_0 = 90; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseAssignmentSubmissionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 91; continue; } case 90: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 91; continue; case 91: if (this.local$closure$tableNames.contains_11rb$('CourseAssignmentSubmissionAttachment')) { this.state_0 = 92; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseAssignmentSubmissionAttachmentChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 93; continue; } case 92: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 93; continue; case 93: if (this.local$closure$tableNames.contains_11rb$('CourseAssignmentMark')) { this.state_0 = 94; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseAssignmentMarkChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 95; continue; } case 94: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 95; continue; case 95: if (this.local$closure$tableNames.contains_11rb$('PersonAuth2')) { this.state_0 = 96; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonAuth2Changed_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 97; continue; } case 96: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 97; continue; case 97: if (this.local$closure$tableNames.contains_11rb$('UserSession')) { this.state_0 = 98; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleUserSessionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 99; continue; } case 98: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 99; continue; case 99: if (this.local$closure$tableNames.contains_11rb$('CourseBlock')) { this.state_0 = 100; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseBlockChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 101; continue; } case 100: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 101; continue; case 101: if (this.local$closure$tableNames.contains_11rb$('CourseTerminology')) { this.state_0 = 102; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseTerminologyChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 103; continue; } case 102: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 103; continue; case 103: if (this.local$closure$tableNames.contains_11rb$('CourseGroupSet')) { this.state_0 = 104; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseGroupSetChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 105; continue; } case 104: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 105; continue; case 105: if (this.local$closure$tableNames.contains_11rb$('CourseGroupMember')) { this.state_0 = 106; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseGroupMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 107; continue; } case 106: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 107; continue; case 107: if (this.local$closure$tableNames.contains_11rb$('CoursePicture')) { this.state_0 = 108; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCoursePictureChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 109; continue; } case 108: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 109; continue; case 109: if (this.local$closure$tableNames.contains_11rb$('ContentEntryPicture')) { this.state_0 = 110; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryPictureChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 111; continue; } case 110: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 111; continue; case 111: if (this.local$closure$tableNames.contains_11rb$('Chat')) { this.state_0 = 112; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleChatChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 113; continue; } case 112: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 113; continue; case 113: if (this.local$closure$tableNames.contains_11rb$('ChatMember')) { this.state_0 = 114; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleChatMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 115; continue; } case 114: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 115; continue; case 115: if (this.local$closure$tableNames.contains_11rb$('Message')) { this.state_0 = 116; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleMessageChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 117; continue; } case 116: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 117; continue; case 117: if (this.local$closure$tableNames.contains_11rb$('MessageRead')) { this.state_0 = 118; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleMessageReadChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 119; continue; } case 118: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 119; continue; case 119: if (this.local$closure$tableNames.contains_11rb$('CourseDiscussion')) { this.state_0 = 120; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseDiscussionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 121; continue; } case 120: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 121; continue; case 121: if (this.local$closure$tableNames.contains_11rb$('DiscussionTopic')) { this.state_0 = 122; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleDiscussionTopicChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 123; continue; } case 122: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 123; continue; case 123: if (this.local$closure$tableNames.contains_11rb$('DiscussionPost')) { this.state_0 = 124; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleDiscussionPostChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 125; continue; } case 124: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 125; continue; case 125: return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(closure$tableNames_0, closure$_checkPendingNotifications_0, this$UmAppDatabase_ReplicationRunOnChangeRunner_0) { return function (_transactionDb_0, continuation_0, suspended) { var instance = new Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(closure$tableNames_0, closure$_checkPendingNotifications_0, this$UmAppDatabase_ReplicationRunOnChangeRunner_0, _transactionDb_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$runReplicationRunOnChange_ywdfdh$($this, tableNames_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_checkPendingNotifications = void 0; this.local$tableNames = tableNames_0; } Coroutine$runReplicationRunOnChange_ywdfdh$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$runReplicationRunOnChange_ywdfdh$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$runReplicationRunOnChange_ywdfdh$.prototype.constructor = Coroutine$runReplicationRunOnChange_ywdfdh$; Coroutine$runReplicationRunOnChange_ywdfdh$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_checkPendingNotifications = LinkedHashSet_init(); this.state_0 = 2; this.result_0 = withDoorTransactionAsync(this.$this._db_0, getKClass(UmAppDatabase), UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(this.local$tableNames, this.local$_checkPendingNotifications, this.$this), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_checkPendingNotifications; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.runReplicationRunOnChange_ywdfdh$ = function (tableNames_0, continuation_0, suspended) { var instance = new Coroutine$runReplicationRunOnChange_ywdfdh$(this, tableNames_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(closure$newNodeId_0, _transactionDb_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$fnTimeCounter = void 0; this.local$_transactionDb = _transactionDb_0; } Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.prototype.constructor = Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$fnTimeCounter = L0; this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.local$_transactionDb.personDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: napier.Napier.d_82mfvz$('Ran PersonDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.local$_transactionDb.clazzDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: napier.Napier.d_82mfvz$('Ran ClazzDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.local$_transactionDb.courseBlockDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: napier.Napier.d_82mfvz$('Ran CourseBlockDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.local$_transactionDb.courseTerminologyDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: napier.Napier.d_82mfvz$('Ran CourseTerminologyDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 6; this.result_0 = this.local$_transactionDb.courseGroupSetDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: napier.Napier.d_82mfvz$('Ran CourseGroupSetDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 7; this.result_0 = this.local$_transactionDb.courseGroupMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 7: napier.Napier.d_82mfvz$('Ran CourseGroupMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 8; this.result_0 = this.local$_transactionDb.clazzEnrolmentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 8: napier.Napier.d_82mfvz$('Ran ClazzEnrolmentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 9; this.result_0 = this.local$_transactionDb.leavingReasonDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 9: napier.Napier.d_82mfvz$('Ran LeavingReasonDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 10; this.result_0 = this.local$_transactionDb.contentEntryDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 10: napier.Napier.d_82mfvz$('Ran ContentEntryDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 11; this.result_0 = this.local$_transactionDb.contentEntryContentCategoryJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 11: napier.Napier.d_82mfvz$('Ran ContentEntryContentCategoryJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 12; this.result_0 = this.local$_transactionDb.contentEntryParentChildJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 12: napier.Napier.d_82mfvz$('Ran ContentEntryParentChildJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 13; this.result_0 = this.local$_transactionDb.contentEntryRelatedEntryJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 13: napier.Napier.d_82mfvz$('Ran ContentEntryRelatedEntryJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 14; this.result_0 = this.local$_transactionDb.clazzContentJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 14: napier.Napier.d_82mfvz$('Ran ClazzContentJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 15; this.result_0 = this.local$_transactionDb.contentCategorySchemaDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 15: napier.Napier.d_82mfvz$('Ran ContentCategorySchemaDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 16; this.result_0 = this.local$_transactionDb.contentCategoryDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 16: napier.Napier.d_82mfvz$('Ran ContentCategoryDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 17; this.result_0 = this.local$_transactionDb.languageDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 17: napier.Napier.d_82mfvz$('Ran LanguageDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 18; this.result_0 = this.local$_transactionDb.languageVariantDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 18: napier.Napier.d_82mfvz$('Ran LanguageVariantDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 19; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 19: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 20; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 20: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNodeClazzBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 21; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNodePersonBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 21: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNodePersonBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 22; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 22: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNodeSchoolBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 23; this.result_0 = this.local$_transactionDb.personGroupMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 23: napier.Napier.d_82mfvz$('Ran PersonGroupMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 24; this.result_0 = this.local$_transactionDb.personGroupMemberDao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 24: napier.Napier.d_82mfvz$('Ran PersonGroupMemberDao#replicateOnNewNodeClazzBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 25; this.result_0 = this.local$_transactionDb.personGroupMemberDao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 25: napier.Napier.d_82mfvz$('Ran PersonGroupMemberDao#replicateOnNewNodeSchoolBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 26; this.result_0 = this.local$_transactionDb.personPictureDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 26: napier.Napier.d_82mfvz$('Ran PersonPictureDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 27; this.result_0 = this.local$_transactionDb.containerDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 27: napier.Napier.d_82mfvz$('Ran ContainerDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 28; this.result_0 = this.local$_transactionDb.verbDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 28: napier.Napier.d_82mfvz$('Ran VerbDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 29; this.result_0 = this.local$_transactionDb.xObjectDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 29: napier.Napier.d_82mfvz$('Ran XObjectDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 30; this.result_0 = this.local$_transactionDb.reportDao.replicateOnNewNodeTemplates_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 30: napier.Napier.d_82mfvz$('Ran ReportDao#replicateOnNewNodeTemplates in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 31; this.result_0 = this.local$_transactionDb.statementDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 31: napier.Napier.d_82mfvz$('Ran StatementDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 32; this.result_0 = this.local$_transactionDb.contextXObjectStatementJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 32: napier.Napier.d_82mfvz$('Ran ContextXObjectStatementJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 33; this.result_0 = this.local$_transactionDb.stateDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 33: napier.Napier.d_82mfvz$('Ran StateDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 34; this.result_0 = this.local$_transactionDb.stateContentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 34: napier.Napier.d_82mfvz$('Ran StateContentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 35; this.result_0 = this.local$_transactionDb.agentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 35: napier.Napier.d_82mfvz$('Ran AgentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 36; this.result_0 = this.local$_transactionDb.learnerGroupDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 36: napier.Napier.d_82mfvz$('Ran LearnerGroupDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 37; this.result_0 = this.local$_transactionDb.learnerGroupMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 37: napier.Napier.d_82mfvz$('Ran LearnerGroupMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 38; this.result_0 = this.local$_transactionDb.groupLearningSessionDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 38: napier.Napier.d_82mfvz$('Ran GroupLearningSessionDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 39; this.result_0 = this.local$_transactionDb.clazzLogAttendanceRecordDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 39: napier.Napier.d_82mfvz$('Ran ClazzLogAttendanceRecordDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 40; this.result_0 = this.local$_transactionDb.clazzLogDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 40: napier.Napier.d_82mfvz$('Ran ClazzLogDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 41; this.result_0 = this.local$_transactionDb.scheduleDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 41: napier.Napier.d_82mfvz$('Ran ScheduleDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 42; this.result_0 = this.local$_transactionDb.holidayCalendarDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 42: napier.Napier.d_82mfvz$('Ran HolidayCalendarDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 43; this.result_0 = this.local$_transactionDb.holidayDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 43: napier.Napier.d_82mfvz$('Ran HolidayDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 44; this.result_0 = this.local$_transactionDb.schoolDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 44: napier.Napier.d_82mfvz$('Ran SchoolDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 45; this.result_0 = this.local$_transactionDb.xLangMapEntryDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 45: napier.Napier.d_82mfvz$('Ran XLangMapEntryDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 46; this.result_0 = this.local$_transactionDb.schoolMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 46: napier.Napier.d_82mfvz$('Ran SchoolMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 47; this.result_0 = this.local$_transactionDb.clazzAssignmentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 47: napier.Napier.d_82mfvz$('Ran ClazzAssignmentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 48; this.result_0 = this.local$_transactionDb.clazzAssignmentContentJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 48: napier.Napier.d_82mfvz$('Ran ClazzAssignmentContentJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 49; this.result_0 = this.local$_transactionDb.courseAssignmentSubmissionDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 49: napier.Napier.d_82mfvz$('Ran CourseAssignmentSubmissionDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 50; this.result_0 = this.local$_transactionDb.courseAssignmentSubmissionAttachmentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 50: napier.Napier.d_82mfvz$('Ran CourseAssignmentSubmissionAttachmentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 51; this.result_0 = this.local$_transactionDb.courseAssignmentMarkDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 51: napier.Napier.d_82mfvz$('Ran CourseAssignmentMarkDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 52; this.result_0 = this.local$_transactionDb.commentsDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 52: napier.Napier.d_82mfvz$('Ran CommentsDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 53; this.result_0 = this.local$_transactionDb.siteDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 53: napier.Napier.d_82mfvz$('Ran SiteDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 54; this.result_0 = this.local$_transactionDb.siteTermsDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 54: napier.Napier.d_82mfvz$('Ran SiteTermsDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 55; this.result_0 = this.local$_transactionDb.personParentJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 55: napier.Napier.d_82mfvz$('Ran PersonParentJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 56; this.result_0 = this.local$_transactionDb.scopedGrantDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 56: napier.Napier.d_82mfvz$('Ran ScopedGrantDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 57; this.result_0 = this.local$_transactionDb.scopedGrantDao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 57: napier.Napier.d_82mfvz$('Ran ScopedGrantDao#replicateOnNewNodeClazzBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 58; this.result_0 = this.local$_transactionDb.scopedGrantDao.replicateOnNewNodePersonBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 58: napier.Napier.d_82mfvz$('Ran ScopedGrantDao#replicateOnNewNodePersonBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 59; this.result_0 = this.local$_transactionDb.personAuth2Dao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 59: napier.Napier.d_82mfvz$('Ran PersonAuth2Dao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 60; this.result_0 = this.local$_transactionDb.userSessionDao.updateReplicationTrackersOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 60: napier.Napier.d_82mfvz$('Ran UserSessionDao#updateReplicationTrackersOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 61; this.result_0 = this.local$_transactionDb.coursePictureDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 61: napier.Napier.d_82mfvz$('Ran CoursePictureDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 62; this.result_0 = this.local$_transactionDb.contentEntryPictureDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 62: napier.Napier.d_82mfvz$('Ran ContentEntryPictureDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 63; this.result_0 = this.local$_transactionDb.chatDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 63: napier.Napier.d_82mfvz$('Ran ChatDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 64; this.result_0 = this.local$_transactionDb.chatMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 64: napier.Napier.d_82mfvz$('Ran ChatMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 65; this.result_0 = this.local$_transactionDb.messageDao.replicateOnNewNodeChats_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 65: napier.Napier.d_82mfvz$('Ran MessageDao#replicateOnNewNodeChats in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 66; this.result_0 = this.local$_transactionDb.messageDao.replicateOnNewNodePosts_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 66: napier.Napier.d_82mfvz$('Ran MessageDao#replicateOnNewNodePosts in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 67; this.result_0 = this.local$_transactionDb.messageReadDao.replicateOnNewNodeChats_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 67: napier.Napier.d_82mfvz$('Ran MessageReadDao#replicateOnNewNodeChats in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 68; this.result_0 = this.local$_transactionDb.courseDiscussionDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 68: napier.Napier.d_82mfvz$('Ran CourseDiscussionDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 69; this.result_0 = this.local$_transactionDb.discussionTopicDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 69: napier.Napier.d_82mfvz$('Ran DiscussionTopicDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 70; this.result_0 = this.local$_transactionDb.discussionPostDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 70: return napier.Napier.d_82mfvz$('Ran DiscussionPostDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(closure$newNodeId_0) { return function (_transactionDb_0, continuation_0, suspended) { var instance = new Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(closure$newNodeId_0, _transactionDb_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$runOnNewNode_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$runOnNewNode_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$runOnNewNode_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$runOnNewNode_s8cxhz$.prototype.constructor = Coroutine$runOnNewNode_s8cxhz$; Coroutine$runOnNewNode_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = withDoorTransactionAsync(this.$this._db_0, getKClass(UmAppDatabase), UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return setOf_0(['Person', 'Clazz', 'CourseBlock', 'CourseTerminology', 'CourseGroupSet', 'CourseGroupMember', 'ClazzEnrolment', 'LeavingReason', 'ContentEntry', 'ContentEntryContentCategoryJoin', 'ContentEntryParentChildJoin', 'ContentEntryRelatedEntryJoin', 'ClazzContentJoin', 'ContentCategorySchema', 'ContentCategory', 'Language', 'LanguageVariant', 'PersonGroup', 'PersonGroupMember', 'PersonPicture', 'Container', 'VerbEntity', 'XObjectEntity', 'Report', 'StatementEntity', 'ContextXObjectStatementJoin', 'StateEntity', 'StateContentEntity', 'AgentEntity', 'LearnerGroup', 'LearnerGroupMember', 'GroupLearningSession', 'ClazzLogAttendanceRecord', 'ClazzLog', 'Schedule', 'HolidayCalendar', 'Holiday', 'School', 'XLangMapEntry', 'SchoolMember', 'ClazzAssignment', 'ClazzAssignmentContentJoin', 'CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment', 'CourseAssignmentMark', 'Comments', 'Site', 'SiteTerms', 'PersonParentJoin', 'ScopedGrant', 'PersonAuth2', 'UserSession', 'CoursePicture', 'ContentEntryPicture', 'Chat', 'ChatMember', 'Message', 'MessageRead', 'CourseDiscussion', 'DiscussionTopic', 'DiscussionPost']); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.runOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$runOnNewNode_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UmAppDatabase_ReplicationRunOnChangeRunner.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_ReplicationRunOnChangeRunner', interfaces: [ReplicationRunOnChangeRunner]}; function UmAppDatabase_Repo(db, dbUnwrapped, config, isRootRepository) { UmAppDatabase_Repo$Companion_getInstance(); if (isRootRepository === void 0) isRootRepository = false; UmAppDatabase.call(this); this.db_dckk3g$_0 = db; this.config_awa45k$_0 = config; this.isRootRepository_z663x8$_0 = isRootRepository; this._db_0 = dbUnwrapped; var tmp$; if (this.isRootRepository && this.config.useReplicationSubscription) { tmp$ = makeNewSubscriptionManager(this); } else { tmp$ = null; } this.replicationSubscriptionManager_j1bst2$_0 = tmp$; this._repositoryHelper = new RepositoryHelper(); this._PersonDao_ujubz8$_0 = lazy_0(UmAppDatabase_Repo$_PersonDao$lambda(this)); this._ClazzDao_e4tenz$_0 = lazy_0(UmAppDatabase_Repo$_ClazzDao$lambda(this)); this._CourseBlockDao_ei3yxn$_0 = lazy_0(UmAppDatabase_Repo$_CourseBlockDao$lambda(this)); this._CourseTerminologyDao_jhtq7$_0 = lazy_0(UmAppDatabase_Repo$_CourseTerminologyDao$lambda(this)); this._CourseGroupSetDao_4in49n$_0 = lazy_0(UmAppDatabase_Repo$_CourseGroupSetDao$lambda(this)); this._CourseGroupMemberDao_bgnla1$_0 = lazy_0(UmAppDatabase_Repo$_CourseGroupMemberDao$lambda(this)); this._ClazzEnrolmentDao_4a7n1v$_0 = lazy_0(UmAppDatabase_Repo$_ClazzEnrolmentDao$lambda(this)); this._LeavingReasonDao_hlqrb3$_0 = lazy_0(UmAppDatabase_Repo$_LeavingReasonDao$lambda(this)); this._ContentEntryDao_8jkla8$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryDao$lambda(this)); this._ContentEntryContentCategoryJoinDao_rca9kf$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryContentCategoryJoinDao$lambda(this)); this._ContentEntryParentChildJoinDao_p9lgj8$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryParentChildJoinDao$lambda(this)); this._ContentEntryRelatedEntryJoinDao_h6no6p$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryRelatedEntryJoinDao$lambda(this)); this._ClazzContentJoinDao_inlg8e$_0 = lazy_0(UmAppDatabase_Repo$_ClazzContentJoinDao$lambda(this)); this._ContentCategorySchemaDao_5s0bb5$_0 = lazy_0(UmAppDatabase_Repo$_ContentCategorySchemaDao$lambda(this)); this._ContentCategoryDao_bkzxts$_0 = lazy_0(UmAppDatabase_Repo$_ContentCategoryDao$lambda(this)); this._LanguageDao_uo42vz$_0 = lazy_0(UmAppDatabase_Repo$_LanguageDao$lambda(this)); this._LanguageVariantDao_dgbgcq$_0 = lazy_0(UmAppDatabase_Repo$_LanguageVariantDao$lambda(this)); this._PersonGroupDao_7mhe25$_0 = lazy_0(UmAppDatabase_Repo$_PersonGroupDao$lambda(this)); this._PersonGroupMemberDao_wihgy5$_0 = lazy_0(UmAppDatabase_Repo$_PersonGroupMemberDao$lambda(this)); this._EntityRoleDao_1gzugw$_0 = lazy_0(UmAppDatabase_Repo$_EntityRoleDao$lambda(this)); this._PersonPictureDao_xtn7v6$_0 = lazy_0(UmAppDatabase_Repo$_PersonPictureDao$lambda(this)); this._ContainerDao_3wn3o6$_0 = lazy_0(UmAppDatabase_Repo$_ContainerDao$lambda(this)); this._VerbDao_nm4w2u$_0 = lazy_0(UmAppDatabase_Repo$_VerbDao$lambda(this)); this._XObjectDao_jq9ao0$_0 = lazy_0(UmAppDatabase_Repo$_XObjectDao$lambda(this)); this._ReportDao_9u0lvp$_0 = lazy_0(UmAppDatabase_Repo$_ReportDao$lambda(this)); this._StatementDao_tpixrc$_0 = lazy_0(UmAppDatabase_Repo$_StatementDao$lambda(this)); this._ContextXObjectStatementJoinDao_6w1wdi$_0 = lazy_0(UmAppDatabase_Repo$_ContextXObjectStatementJoinDao$lambda(this)); this._StateDao_j50u9m$_0 = lazy_0(UmAppDatabase_Repo$_StateDao$lambda(this)); this._StateContentDao_fw26c1$_0 = lazy_0(UmAppDatabase_Repo$_StateContentDao$lambda(this)); this._AgentDao_pi586m$_0 = lazy_0(UmAppDatabase_Repo$_AgentDao$lambda(this)); this._LearnerGroupDao_76gatx$_0 = lazy_0(UmAppDatabase_Repo$_LearnerGroupDao$lambda(this)); this._LearnerGroupMemberDao_7uhmpd$_0 = lazy_0(UmAppDatabase_Repo$_LearnerGroupMemberDao$lambda(this)); this._GroupLearningSessionDao_38ojog$_0 = lazy_0(UmAppDatabase_Repo$_GroupLearningSessionDao$lambda(this)); this._ClazzLogAttendanceRecordDao_4r3kjx$_0 = lazy_0(UmAppDatabase_Repo$_ClazzLogAttendanceRecordDao$lambda(this)); this._ClazzLogDao_70b6y5$_0 = lazy_0(UmAppDatabase_Repo$_ClazzLogDao$lambda(this)); this._ScheduleDao_dgcsim$_0 = lazy_0(UmAppDatabase_Repo$_ScheduleDao$lambda(this)); this._HolidayCalendarDao_dbgjhb$_0 = lazy_0(UmAppDatabase_Repo$_HolidayCalendarDao$lambda(this)); this._HolidayDao_n3kgxr$_0 = lazy_0(UmAppDatabase_Repo$_HolidayDao$lambda(this)); this._SchoolDao_ro0mez$_0 = lazy_0(UmAppDatabase_Repo$_SchoolDao$lambda(this)); this._XLangMapEntryDao_lbg3az$_0 = lazy_0(UmAppDatabase_Repo$_XLangMapEntryDao$lambda(this)); this._SchoolMemberDao_l0miut$_0 = lazy_0(UmAppDatabase_Repo$_SchoolMemberDao$lambda(this)); this._ClazzAssignmentDao_l1mez6$_0 = lazy_0(UmAppDatabase_Repo$_ClazzAssignmentDao$lambda(this)); this._ClazzAssignmentContentJoinDao_1c2tvf$_0 = lazy_0(UmAppDatabase_Repo$_ClazzAssignmentContentJoinDao$lambda(this)); this._ClazzAssignmentRollUpDao_2f8am2$_0 = lazy_0(UmAppDatabase_Repo$_ClazzAssignmentRollUpDao$lambda(this)); this._CourseAssignmentSubmissionDao_9kuy85$_0 = lazy_0(UmAppDatabase_Repo$_CourseAssignmentSubmissionDao$lambda(this)); this._CourseAssignmentSubmissionAttachmentDao_68jpoi$_0 = lazy_0(UmAppDatabase_Repo$_CourseAssignmentSubmissionAttachmentDao$lambda(this)); this._CourseAssignmentMarkDao_7honss$_0 = lazy_0(UmAppDatabase_Repo$_CourseAssignmentMarkDao$lambda(this)); this._CommentsDao_7ok0mz$_0 = lazy_0(UmAppDatabase_Repo$_CommentsDao$lambda(this)); this._SiteDao_35ern6$_0 = lazy_0(UmAppDatabase_Repo$_SiteDao$lambda(this)); this._SiteTermsDao_u5navr$_0 = lazy_0(UmAppDatabase_Repo$_SiteTermsDao$lambda(this)); this._PersonParentJoinDao_saaols$_0 = lazy_0(UmAppDatabase_Repo$_PersonParentJoinDao$lambda(this)); this._ScopedGrantDao_3r6sr$_0 = lazy_0(UmAppDatabase_Repo$_ScopedGrantDao$lambda(this)); this._ErrorReportDao_3fz6m3$_0 = lazy_0(UmAppDatabase_Repo$_ErrorReportDao$lambda(this)); this._PersonAuth2Dao_uo70te$_0 = lazy_0(UmAppDatabase_Repo$_PersonAuth2Dao$lambda(this)); this._UserSessionDao_svxsy4$_0 = lazy_0(UmAppDatabase_Repo$_UserSessionDao$lambda(this)); this._CoursePictureDao_cwo2r8$_0 = lazy_0(UmAppDatabase_Repo$_CoursePictureDao$lambda(this)); this._ContentEntryPictureDao_6clelq$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryPictureDao$lambda(this)); this._ChatDao_9gdue7$_0 = lazy_0(UmAppDatabase_Repo$_ChatDao$lambda(this)); this._ChatMemberDao_8nduuf$_0 = lazy_0(UmAppDatabase_Repo$_ChatMemberDao$lambda(this)); this._MessageDao_uo7ouo$_0 = lazy_0(UmAppDatabase_Repo$_MessageDao$lambda(this)); this._MessageReadDao_9pyt5y$_0 = lazy_0(UmAppDatabase_Repo$_MessageReadDao$lambda(this)); this._CourseDiscussionDao_zc4gve$_0 = lazy_0(UmAppDatabase_Repo$_CourseDiscussionDao$lambda(this)); this._DiscussionTopicDao_cb2wmo$_0 = lazy_0(UmAppDatabase_Repo$_DiscussionTopicDao$lambda(this)); this._DiscussionPostDao_xx2rrl$_0 = lazy_0(UmAppDatabase_Repo$_DiscussionPostDao$lambda(this)); } Object.defineProperty(UmAppDatabase_Repo.prototype, 'db', {get: function () { return this.db_dckk3g$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'config', {get: function () { return this.config_awa45k$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'isRootRepository', {get: function () { return this.isRootRepository_z663x8$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'context', {configurable: true, get: function () { return this.config.context; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'replicationSubscriptionManager', {configurable: true, get: function () { return this.replicationSubscriptionManager_j1bst2$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_endpoint_0', {configurable: true, get: function () { return this.config.endpoint; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_httpClient', {configurable: true, get: function () { return this.config.httpClient; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'tableIdMap', {configurable: true, get: function () { return UmAppDatabase_Repo$Companion_getInstance().TABLE_ID_MAP; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clientId', {configurable: true, get: function () { return this.config.nodeId; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'dbName', {configurable: true, get: function () { return 'Repository for [' + this._db_0.toString() + '] - ' + this.config.endpoint; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'connectivityStatus', {configurable: true, get: function () { return this._repositoryHelper.connectivityStatus; }, set: function (newValue) { this._repositoryHelper.connectivityStatus = newValue; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'dbVersion', {configurable: true, get: function () { return 106; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'networkNodeDao', {configurable: true, get: function () { throw IllegalStateException_init('NetworkNodeDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonDao', {configurable: true, get: function () { return this._PersonDao_ujubz8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personDao', {configurable: true, get: function () { return this._PersonDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzDao', {configurable: true, get: function () { return this._ClazzDao_e4tenz$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzDao', {configurable: true, get: function () { return this._ClazzDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao_ei3yxn$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao_jhtq7$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao_4in49n$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao_bgnla1$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao_4a7n1v$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LeavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao_hlqrb3$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'leavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao_8jkla8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_rca9kf$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_p9lgj8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_h6no6p$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao_inlg8e$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao_5s0bb5$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao_bkzxts$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LanguageDao', {configurable: true, get: function () { return this._LanguageDao_uo42vz$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'languageDao', {configurable: true, get: function () { return this._LanguageDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LanguageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao_dgbgcq$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'languageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scrapeQueueItemDao', {configurable: true, get: function () { throw IllegalStateException_init('ScrapeQueueItemDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personAuthDao', {configurable: true, get: function () { throw IllegalStateException_init('PersonAuthDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonGroupDao', {configurable: true, get: function () { return this._PersonGroupDao_7mhe25$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personGroupDao', {configurable: true, get: function () { return this._PersonGroupDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao_wihgy5$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_EntityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao_1gzugw$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'entityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonPictureDao', {configurable: true, get: function () { return this._PersonPictureDao_xtn7v6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personPictureDao', {configurable: true, get: function () { return this._PersonPictureDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scrapeRunDao', {configurable: true, get: function () { throw IllegalStateException_init('ScrapeRunDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'connectivityStatusDao', {configurable: true, get: function () { throw IllegalStateException_init('ConnectivityStatusDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContainerDao', {configurable: true, get: function () { return this._ContainerDao_3wn3o6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerDao', {configurable: true, get: function () { return this._ContainerDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerEntryDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerEntryDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerEntryFileDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerEntryFileDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerETagDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerETagDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_VerbDao', {configurable: true, get: function () { return this._VerbDao_nm4w2u$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'verbDao', {configurable: true, get: function () { return this._VerbDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_XObjectDao', {configurable: true, get: function () { return this._XObjectDao_jq9ao0$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'xObjectDao', {configurable: true, get: function () { return this._XObjectDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ReportDao', {configurable: true, get: function () { return this._ReportDao_9u0lvp$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'reportDao', {configurable: true, get: function () { return this._ReportDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerImportJobDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerImportJobDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_StatementDao', {configurable: true, get: function () { return this._StatementDao_tpixrc$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'statementDao', {configurable: true, get: function () { return this._StatementDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_6w1wdi$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_StateDao', {configurable: true, get: function () { return this._StateDao_j50u9m$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'stateDao', {configurable: true, get: function () { return this._StateDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_StateContentDao', {configurable: true, get: function () { return this._StateContentDao_fw26c1$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'stateContentDao', {configurable: true, get: function () { return this._StateContentDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_AgentDao', {configurable: true, get: function () { return this._AgentDao_pi586m$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'agentDao', {configurable: true, get: function () { return this._AgentDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LearnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao_76gatx$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'learnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LearnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao_7uhmpd$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'learnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_GroupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao_38ojog$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'groupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_4r3kjx$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao_70b6y5$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'customFieldDao', {configurable: true, get: function () { throw IllegalStateException_init('CustomFieldDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'customFieldValueDao', {configurable: true, get: function () { throw IllegalStateException_init('CustomFieldValueDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'customFieldValueOptionDao', {configurable: true, get: function () { throw IllegalStateException_init('CustomFieldValueOptionDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ScheduleDao', {configurable: true, get: function () { return this._ScheduleDao_dgcsim$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scheduleDao', {configurable: true, get: function () { return this._ScheduleDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scheduledCheckDao', {configurable: true, get: function () { throw IllegalStateException_init('ScheduledCheckDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_HolidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao_dbgjhb$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'holidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_HolidayDao', {configurable: true, get: function () { return this._HolidayDao_n3kgxr$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'holidayDao', {configurable: true, get: function () { return this._HolidayDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SchoolDao', {configurable: true, get: function () { return this._SchoolDao_ro0mez$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'schoolDao', {configurable: true, get: function () { return this._SchoolDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_XLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao_lbg3az$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'xLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'locallyAvailableContainerDao', {configurable: true, get: function () { throw IllegalStateException_init('LocallyAvailableContainerDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SchoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao_l0miut$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'schoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao_l1mez6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_1c2tvf$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzAssignmentRollUpDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao_2f8am2$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'cacheClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_9kuy85$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_68jpoi$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_7honss$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CommentsDao', {configurable: true, get: function () { return this._CommentsDao_7ok0mz$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'commentsDao', {configurable: true, get: function () { return this._CommentsDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'syncNodeDao', {configurable: true, get: function () { throw IllegalStateException_init('SyncNodeDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SiteDao', {configurable: true, get: function () { return this._SiteDao_35ern6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'siteDao', {configurable: true, get: function () { return this._SiteDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SiteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao_u5navr$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'siteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao_saaols$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ScopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao_3r6sr$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ErrorReportDao', {configurable: true, get: function () { return this._ErrorReportDao_3fz6m3$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'errorReportDao', {configurable: true, get: function () { return this._ErrorReportDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao_uo70te$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_UserSessionDao', {configurable: true, get: function () { return this._UserSessionDao_svxsy4$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'userSessionDao', {configurable: true, get: function () { return this._UserSessionDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentJobItemDao', {configurable: true, get: function () { throw IllegalStateException_init('ContentJobItemDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentJobDao', {configurable: true, get: function () { throw IllegalStateException_init('ContentJobDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CoursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao_cwo2r8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'coursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao_6clelq$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ChatDao', {configurable: true, get: function () { return this._ChatDao_9gdue7$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'chatDao', {configurable: true, get: function () { return this._ChatDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ChatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao_8nduuf$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'chatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_MessageDao', {configurable: true, get: function () { return this._MessageDao_uo7ouo$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'messageDao', {configurable: true, get: function () { return this._MessageDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_MessageReadDao', {configurable: true, get: function () { return this._MessageReadDao_9pyt5y$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'messageReadDao', {configurable: true, get: function () { return this._MessageReadDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao_zc4gve$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_DiscussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao_cb2wmo$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'discussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_DiscussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao_xx2rrl$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'discussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao; }}); UmAppDatabase_Repo.prototype.clearAllTables = function () { throw IllegalStateException_init('Cannot use a repository to clearAllTables!'); }; UmAppDatabase_Repo.prototype.clearAllTablesAsync = function (continuation) { throw IllegalStateException_init('Cannot use this to run clearAllTablesAsync'); }; UmAppDatabase_Repo.prototype.addWeakConnectivityListener_r5hok5$ = function (listener) { this._repositoryHelper.addWeakConnectivityListener_r5hok5$(listener); }; UmAppDatabase_Repo.prototype.removeWeakConnectivityListener_r5hok5$ = function (listener) { this._repositoryHelper.removeWeakConnectivityListener_r5hok5$(listener); }; UmAppDatabase_Repo.prototype.createAllTables = function () { throw IllegalStateException_init('Cannot use a repository to createAllTables!'); }; function UmAppDatabase_Repo$Companion() { UmAppDatabase_Repo$Companion_instance = this; this.TABLE_ID_MAP = emptyMap(); this._DB_NAME = 'UmAppDatabase'; } UmAppDatabase_Repo$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UmAppDatabase_Repo$Companion_instance = null; function UmAppDatabase_Repo$Companion_getInstance() { if (UmAppDatabase_Repo$Companion_instance === null) { new UmAppDatabase_Repo$Companion(); }return UmAppDatabase_Repo$Companion_instance; } function UmAppDatabase_Repo$_PersonDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseBlockDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseBlockDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseBlockDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseTerminologyDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseTerminologyDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseTerminologyDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseGroupSetDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseGroupSetDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseGroupSetDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseGroupMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseGroupMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseGroupMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzEnrolmentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzEnrolmentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzEnrolmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LeavingReasonDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LeavingReasonDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.leavingReasonDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryContentCategoryJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryContentCategoryJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryContentCategoryJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryParentChildJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryParentChildJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryParentChildJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryRelatedEntryJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryRelatedEntryJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryRelatedEntryJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzContentJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzContentJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzContentJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentCategorySchemaDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentCategorySchemaDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentCategorySchemaDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentCategoryDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentCategoryDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentCategoryDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LanguageDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LanguageDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.languageDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LanguageVariantDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LanguageVariantDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.languageVariantDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonGroupDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonGroupDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personGroupDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonGroupMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonGroupMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personGroupMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_EntityRoleDao$lambda(this$UmAppDatabase_Repo) { return function () { return new EntityRoleDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.entityRoleDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonPictureDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonPictureDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personPictureDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContainerDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContainerDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.containerDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_VerbDao$lambda(this$UmAppDatabase_Repo) { return function () { return new VerbDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.verbDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_XObjectDao$lambda(this$UmAppDatabase_Repo) { return function () { return new XObjectDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.xObjectDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ReportDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ReportDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.reportDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_StatementDao$lambda(this$UmAppDatabase_Repo) { return function () { return new StatementDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.statementDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContextXObjectStatementJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContextXObjectStatementJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contextXObjectStatementJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_StateDao$lambda(this$UmAppDatabase_Repo) { return function () { return new StateDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.stateDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_StateContentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new StateContentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.stateContentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_AgentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new AgentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.agentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LearnerGroupDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LearnerGroupDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.learnerGroupDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LearnerGroupMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LearnerGroupMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.learnerGroupMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_GroupLearningSessionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new GroupLearningSessionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.groupLearningSessionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzLogAttendanceRecordDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzLogAttendanceRecordDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzLogAttendanceRecordDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzLogDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzLogDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzLogDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ScheduleDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ScheduleDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.scheduleDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_HolidayCalendarDao$lambda(this$UmAppDatabase_Repo) { return function () { return new HolidayCalendarDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.holidayCalendarDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_HolidayDao$lambda(this$UmAppDatabase_Repo) { return function () { return new HolidayDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.holidayDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SchoolDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SchoolDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.schoolDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_XLangMapEntryDao$lambda(this$UmAppDatabase_Repo) { return function () { return new XLangMapEntryDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.xLangMapEntryDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SchoolMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SchoolMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.schoolMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzAssignmentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzAssignmentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzAssignmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzAssignmentContentJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzAssignmentContentJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzAssignmentContentJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzAssignmentRollUpDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzAssignmentRollUpDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.cacheClazzAssignmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseAssignmentSubmissionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseAssignmentSubmissionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseAssignmentSubmissionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseAssignmentSubmissionAttachmentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseAssignmentSubmissionAttachmentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseAssignmentSubmissionAttachmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseAssignmentMarkDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseAssignmentMarkDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseAssignmentMarkDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CommentsDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CommentsDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.commentsDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SiteDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SiteDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.siteDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SiteTermsDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SiteTermsDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.siteTermsDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonParentJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonParentJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personParentJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ScopedGrantDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ScopedGrantDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.scopedGrantDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ErrorReportDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ErrorReportDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.errorReportDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonAuth2Dao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonAuth2Dao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personAuth2Dao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_UserSessionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new UserSessionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.userSessionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CoursePictureDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CoursePictureDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.coursePictureDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryPictureDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryPictureDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryPictureDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ChatDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ChatDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.chatDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ChatMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ChatMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.chatMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_MessageDao$lambda(this$UmAppDatabase_Repo) { return function () { return new MessageDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.messageDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_MessageReadDao$lambda(this$UmAppDatabase_Repo) { return function () { return new MessageReadDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.messageReadDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseDiscussionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseDiscussionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseDiscussionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_DiscussionTopicDao$lambda(this$UmAppDatabase_Repo) { return function () { return new DiscussionTopicDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.discussionTopicDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_DiscussionPostDao$lambda(this$UmAppDatabase_Repo) { return function () { return new DiscussionPostDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.discussionPostDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } UmAppDatabase_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_Repo', interfaces: [DoorDatabaseRepository, UmAppDatabase]}; function AgentDao_JdbcKt(_db) { AgentDao.call(this); this._db = _db; this._insertAdapterAgentEntity_ = new AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral(this._db); } function Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function AgentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_2; Coroutine$replicateOnNewNode_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | ? AS aeDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN AgentEntity \n | ON AgentEntity.agentPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | --notpsql \n | AND AgentEntity.agentLct != COALESCE(\n | (SELECT aeVersionId\n | FROM AgentEntityReplicate\n | WHERE aePk = AgentEntity.agentUid\n | AND aeDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | ? AS aeDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN AgentEntity \n | ON AgentEntity.agentPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, AgentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda; Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function AgentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_2.prototype.constructor = Coroutine$replicateOnChange_2; Coroutine$replicateOnChange_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | UserSession.usClientNodeId AS aeDestination\n | FROM ChangeLog\n | JOIN AgentEntity\n | ON ChangeLog.chTableId = 68\n | AND ChangeLog.chEntityPk = AgentEntity.agentUid\n | JOIN Person \n | ON Person.personUid = AgentEntity.agentPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | --notpsql \n | AND AgentEntity.agentLct != COALESCE(\n | (SELECT aeVersionId\n | FROM AgentEntityReplicate\n | WHERE aePk = AgentEntity.agentUid\n | AND aeDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | UserSession.usClientNodeId AS aeDestination\n | FROM ChangeLog\n | JOIN AgentEntity\n | ON ChangeLog.chTableId = 68\n | AND ChangeLog.chEntityPk = AgentEntity.agentUid\n | JOIN Person \n | ON Person.personUid = AgentEntity.agentPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, AgentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function AgentDao_JdbcKt$getAgentByAnyId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_agentMbox = _resultSet.getString_61zpoe$('agentMbox'); var tmp_agentMbox_sha1sum = _resultSet.getString_61zpoe$('agentMbox_sha1sum'); var tmp_agentOpenid = _resultSet.getString_61zpoe$('agentOpenid'); var tmp_agentAccountName = _resultSet.getString_61zpoe$('agentAccountName'); var tmp_agentHomePage = _resultSet.getString_61zpoe$('agentHomePage'); var tmp_agentPersonUid = _resultSet.getLong_61zpoe$('agentPersonUid'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_agentLct = _resultSet.getLong_61zpoe$('agentLct'); var _entity = new AgentEntity(); _entity.agentUid = tmp_agentUid; _entity.agentMbox = tmp_agentMbox; _entity.agentMbox_sha1sum = tmp_agentMbox_sha1sum; _entity.agentOpenid = tmp_agentOpenid; _entity.agentAccountName = tmp_agentAccountName; _entity.agentHomePage = tmp_agentHomePage; _entity.agentPersonUid = tmp_agentPersonUid; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.agentLct = tmp_agentLct; closure$_result.v = _entity; }return Unit; }; } function AgentDao_JdbcKt$getAgentByAnyId$lambda(closure$openId, closure$mbox, closure$sha1, closure$account, closure$homepage, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$openId); _stmt.setString_vqvrqt$(2, closure$mbox); _stmt.setString_vqvrqt$(3, closure$sha1); _stmt.setString_vqvrqt$(4, closure$account); _stmt.setString_vqvrqt$(5, closure$homepage); useResults(_stmt.executeQuery(), AgentDao_JdbcKt$getAgentByAnyId$lambda$lambda(closure$_result)); return Unit; }; } AgentDao_JdbcKt.prototype.getAgentByAnyId_t5gqrj$$default = function (openId, mbox, account, homepage, sha1) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, AgentEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM AgentEntity WHERE agentOpenId = ? OR agentMbox = ? OR agentMbox_sha1sum = ? OR (agentAccountName = ? AND agentHomePage = ?)', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM AgentEntity WHERE agentOpenId = ? OR agentMbox = ? OR agentMbox_sha1sum = ? OR (agentAccountName = ? AND agentHomePage = ?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, AgentDao_JdbcKt$getAgentByAnyId$lambda(openId, mbox, sha1, account, homepage, _result)); return _result.v; }; function AgentDao_JdbcKt$getAgentFromPersonUsername$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_agentMbox = _resultSet.getString_61zpoe$('agentMbox'); var tmp_agentMbox_sha1sum = _resultSet.getString_61zpoe$('agentMbox_sha1sum'); var tmp_agentOpenid = _resultSet.getString_61zpoe$('agentOpenid'); var tmp_agentAccountName = _resultSet.getString_61zpoe$('agentAccountName'); var tmp_agentHomePage = _resultSet.getString_61zpoe$('agentHomePage'); var tmp_agentPersonUid = _resultSet.getLong_61zpoe$('agentPersonUid'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_agentLct = _resultSet.getLong_61zpoe$('agentLct'); var _entity = new AgentEntity(); _entity.agentUid = tmp_agentUid; _entity.agentMbox = tmp_agentMbox; _entity.agentMbox_sha1sum = tmp_agentMbox_sha1sum; _entity.agentOpenid = tmp_agentOpenid; _entity.agentAccountName = tmp_agentAccountName; _entity.agentHomePage = tmp_agentHomePage; _entity.agentPersonUid = tmp_agentPersonUid; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.agentLct = tmp_agentLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(closure$username_0, closure$endpoint_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$endpoint = closure$endpoint_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.prototype.constructor = Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda; Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$endpoint); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, AgentDao_JdbcKt$getAgentFromPersonUsername$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(closure$username_0, closure$endpoint_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(closure$username_0, closure$endpoint_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getAgentFromPersonUsername_puj7f4$($this, endpoint_0, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$endpoint = endpoint_0; this.local$username = username_0; } Coroutine$getAgentFromPersonUsername_puj7f4$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAgentFromPersonUsername_puj7f4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAgentFromPersonUsername_puj7f4$.prototype.constructor = Coroutine$getAgentFromPersonUsername_puj7f4$; Coroutine$getAgentFromPersonUsername_puj7f4$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, AgentEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM AgentEntity\n | WHERE agentAccountName = ? \n | AND agentHomePage = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT *\n | FROM AgentEntity\n | WHERE agentAccountName = ? \n | AND agentHomePage = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(this.local$username, this.local$endpoint, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.getAgentFromPersonUsername_puj7f4$ = function (endpoint_0, username_0, continuation_0, suspended) { var instance = new Coroutine$getAgentFromPersonUsername_puj7f4$(this, endpoint_0, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterAgentEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync.prototype.constructor = Coroutine$insertAsync; Coroutine$insertAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterAgentEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterAgentEntity_.insertList_4ezy5m$(entityList); }; function AgentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.agentMbox); _stmt.setString_vqvrqt$(2, _entity.agentMbox_sha1sum); _stmt.setString_vqvrqt$(3, _entity.agentOpenid); _stmt.setString_vqvrqt$(4, _entity.agentAccountName); _stmt.setString_vqvrqt$(5, _entity.agentHomePage); _stmt.setLong_6svq3l$(6, _entity.agentPersonUid); _stmt.setLong_6svq3l$(7, _entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.statementLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.agentLct); _stmt.setLong_6svq3l$(11, _entity.agentUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } AgentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE AgentEntity SET agentMbox = ?, agentMbox_sha1sum = ?, agentOpenid = ?, agentAccountName = ?, agentHomePage = ?, agentPersonUid = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, agentLct = ? WHERE agentUid = ?'; prepareAndUseStatement_0(this._db, _sql, AgentDao_JdbcKt$updateList$lambda(entityList)); }; function AgentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.agentMbox); _stmt.setString_vqvrqt$(2, closure$entity.agentMbox_sha1sum); _stmt.setString_vqvrqt$(3, closure$entity.agentOpenid); _stmt.setString_vqvrqt$(4, closure$entity.agentAccountName); _stmt.setString_vqvrqt$(5, closure$entity.agentHomePage); _stmt.setLong_6svq3l$(6, closure$entity.agentPersonUid); _stmt.setLong_6svq3l$(7, closure$entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.statementLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.agentLct); _stmt.setLong_6svq3l$(11, closure$entity.agentUid); return _stmt.executeUpdate(); }; } AgentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE AgentEntity SET agentMbox = ?, agentMbox_sha1sum = ?, agentOpenid = ?, agentAccountName = ?, agentHomePage = ?, agentPersonUid = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, agentLct = ? WHERE agentUid = ?'; prepareAndUseStatement_0(this._db, _sql, AgentDao_JdbcKt$update$lambda(entity)); }; function AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO AgentEntity (agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING agentUid'; } else tmp$ = ''; return "INSERT INTO AgentEntity (agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES(COALESCE(?,nextval('AgentEntity_agentUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.agentUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.agentUid); } stmt.setString_vqvrqt$(2, entity.agentMbox); stmt.setString_vqvrqt$(3, entity.agentMbox_sha1sum); stmt.setString_vqvrqt$(4, entity.agentOpenid); stmt.setString_vqvrqt$(5, entity.agentAccountName); stmt.setString_vqvrqt$(6, entity.agentHomePage); stmt.setLong_6svq3l$(7, entity.agentPersonUid); stmt.setLong_6svq3l$(8, entity.statementMasterChangeSeqNum); stmt.setLong_6svq3l$(9, entity.statementLocalChangeSeqNum); stmt.setInt_vux9f0$(10, entity.statementLastChangedBy); stmt.setLong_6svq3l$(11, entity.agentLct); }; AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; AgentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao_JdbcKt', interfaces: [AgentDao]}; function AgentDao_ReplicateWrapper(_db, _dao) { AgentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_3; Coroutine$replicateOnNewNode_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_3.prototype.constructor = Coroutine$replicateOnChange_3; Coroutine$replicateOnChange_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_ReplicateWrapper.prototype.getAgentByAnyId_t5gqrj$$default = function (openId, mbox, account, homepage, sha1) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.prototype.getAgentFromPersonUsername_puj7f4$ = function (endpoint, username, continuation) { return this._dao_0.getAgentFromPersonUsername_puj7f4$(endpoint, username, continuation); }; AgentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_0.prototype.constructor = Coroutine$insertAsync_0; Coroutine$insertAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.agentUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(68, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.agentUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.agentLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.agentUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao_ReplicateWrapper', interfaces: [AgentDao]}; function AgentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { AgentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_4; Coroutine$replicateOnNewNode_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_4.prototype.constructor = Coroutine$replicateOnChange_4; Coroutine$replicateOnChange_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_Repo.prototype.getAgentByAnyId_t5gqrj$$default = function (openId, mbox, account, homepage, sha1) { var _result = this._dao.getAgentByAnyId_t5gqrj$(openId, mbox, account, homepage, sha1); return _result; }; function Coroutine$getAgentFromPersonUsername_puj7f4$_0($this, endpoint_0, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$endpoint = endpoint_0; this.local$username = username_0; } Coroutine$getAgentFromPersonUsername_puj7f4$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAgentFromPersonUsername_puj7f4$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAgentFromPersonUsername_puj7f4$_0.prototype.constructor = Coroutine$getAgentFromPersonUsername_puj7f4$_0; Coroutine$getAgentFromPersonUsername_puj7f4$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getAgentFromPersonUsername_puj7f4$(this.local$endpoint, this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.getAgentFromPersonUsername_puj7f4$ = function (endpoint_0, username_0, continuation_0, suspended) { var instance = new Coroutine$getAgentFromPersonUsername_puj7f4$_0(this, endpoint_0, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_1.prototype.constructor = Coroutine$insertAsync_1; Coroutine$insertAsync_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; AgentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; AgentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; AgentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao_Repo', interfaces: [AgentDao]}; function ChatDao_JdbcKt(_db) { ChatDao.call(this); this._db = _db; this._insertAdapterChat_ = new ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral(this._db); } function Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_5($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_5.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_5; Coroutine$replicateOnNewNode_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatPk,\n | ? AS chatDestination\n | FROM UserSession \n | JOIN Chat ON \n | ((Chat.chatUid IN \n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE UserSession.usClientNodeId = ?\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = ?), 0) \n | /*psql ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatPk,\n | ? AS chatDestination\n | FROM UserSession \n | JOIN Chat ON \n | ((Chat.chatUid IN \n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE UserSession.usClientNodeId = ?\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = ?), 0) \n | ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ChatDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_5(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda; Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_5($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_5.prototype.constructor = Coroutine$replicateOnChange_5; Coroutine$replicateOnChange_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatUid,\n | UserSession.usClientNodeId AS chatDestination\n | FROM ChangeLog\n | JOIN Chat\n | ON ChangeLog.chTableId = 127\n | AND ChangeLog.chEntityPk = Chat.chatUid\n | JOIN UserSession ON \n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid))\n | OR UserSession.usSessionType = 2 )\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatUid,\n | UserSession.usClientNodeId AS chatDestination\n | FROM ChangeLog\n | JOIN Chat\n | ON ChangeLog.chTableId = 127\n | AND ChangeLog.chEntityPk = Chat.chatUid\n | JOIN UserSession ON \n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid))\n | OR UserSession.usSessionType = 2 )\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ChatDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_5(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral(this$ChatDao_JdbcKt, closure$personUid, closure$searchBit) { this.this$ChatDao_JdbcKt = this$ChatDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$searchBit = closure$searchBit; DoorDataSourceFactory.call(this); } function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_unreadMessageCount = _resultSet.getInt_61zpoe$('unreadMessageCount'); var tmp_latestMessage = _resultSet.getString_61zpoe$('latestMessage'); var tmp_latestMessageTimestamp = _resultSet.getLong_61zpoe$('latestMessageTimestamp'); var tmp_otherPersonUid = _resultSet.getLong_61zpoe$('otherPersonUid'); var tmp_otherPersonFirstNames = _resultSet.getString_61zpoe$('otherPersonFirstNames'); var tmp_otherPersonLastName = _resultSet.getString_61zpoe$('otherPersonLastName'); var tmp_chatUid = _resultSet.getLong_61zpoe$('chatUid'); var tmp_chatStartDate = _resultSet.getLong_61zpoe$('chatStartDate'); var tmp_chatTitle = _resultSet.getString_61zpoe$('chatTitle'); var tmp_chatGroup = _resultSet.getBoolean_61zpoe$('chatGroup'); var tmp_chatLct = _resultSet.getLong_61zpoe$('chatLct'); var _entity = new ChatWithLatestMessageAndCount(); _entity.unreadMessageCount = tmp_unreadMessageCount; _entity.latestMessage = tmp_latestMessage; _entity.latestMessageTimestamp = tmp_latestMessageTimestamp; _entity.otherPersonUid = tmp_otherPersonUid; _entity.otherPersonFirstNames = tmp_otherPersonFirstNames; _entity.otherPersonLastName = tmp_otherPersonLastName; _entity.chatUid = tmp_chatUid; _entity.chatStartDate = tmp_chatStartDate; _entity.chatTitle = tmp_chatTitle; _entity.chatGroup = tmp_chatGroup; _entity.chatLct = tmp_chatLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$searchBit); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchBit); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ChatDao_JdbcKt = this$ChatDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Chat.*,\n | Message.messageText AS latestMessage,\n | Message.messageTimestamp AS latestMessageTimestamp,\n | op.personUid AS otherPersonUid,\n | op.firstNames AS otherPersonFirstNames,\n | op.lastName AS otherPersonLastName,\n | (\n |\t\t\t\tSELECT COUNT(*) \n |\t\t\t\t FROM Message \n |\t\t\t\t WHERE Message.messageTableId = 127 \n |\t\t\t\t AND Message.messageEntityUid = Chat.chatUid \n |\t\t\t\t AND Message.messageSenderPersonUid != ?\n |\t\t\t\t AND Message.messageTimestamp > coalesce((\n |\t\t\t\t\t\tSELECT MessageRead.messageReadLct FROM MessageRead \n |\t\t\t\t\t\tWHERE MessageRead.messageReadPersonUid = ?\n |\t\t\t\t\t\tAND MessageRead.messageReadMessageUid = Message.messageUid \n |\t\t\t\t ), 0)\n |\t\t\t\t\t\n |\t\t\t\t\n |\t\t\t ) AS unreadMessageCount,\n | \n | (SELECT COUNT(*)\n | FROM ChatMember mm\n | WHERE mm.chatMemberChatUid = Chat.chatUid ) AS numMembers\n | FROM ChatMember\n | LEFT JOIN Chat \n | ON Chat.chatUid = ChatMember.chatMemberChatUid\n | LEFT JOIN Message \n | ON Message.messageUid =\n | (SELECT messageUid\n | FROM Message\n | WHERE messageEntityUid = Chat.chatUid\n | AND messageTableId = 127\n | ORDER BY messageTimestamp DESC\n | LIMIT 1)\n | LEFT JOIN Person op \n | ON op.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp \n | ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND ChatMember.chatMemberLeftDate = 9223372036854775807\n | AND Chat.chatUid != 0 \n | AND op.firstNames||' '||op.lastName LIKE ? \n | -- When in search mode we need to add all Persons who match the search to the list, even if\n | -- no chat has started\n | UNION\n | SELECT Chat.*,\n | '' AS latestMessage,\n | 0 AS latestMessageTimestamp,\n | Person.personUid AS otherPersonUid,\n | Person.firstNames AS otherPersonFirstNames,\n | Person.lastName AS otherPersonLastName,\n | 0 AS unreadMessageCount,\n | 0 AS numMembers\n | \n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n |\t\t \n | LEFT JOIN Chat\n | ON Chat.chatUid = 0\n | WHERE ? != '%'\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | AND Person.personUid != ?\n | \n | AND Person.personUid NOT IN\n |\t\t\t (\n |\t\t\t\tSELECT chatpeople.personUid \n |\t\t\t\t FROM ChatMember cmm\n |\t\t\t\t\t LEFT JOIN Chat cc \n |\t\t\t\t\t\t\t ON cc.chatUid = cmm.chatMemberChatUid \n |\t\t\t \n |\t\t\t\t LEFT JOIN Person chatpeople \n | ON chatpeople.personUid =\n | (SELECT chatpeopleother.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person chatpeopleother \n | ON chatpeopleother.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = cc.chatUid\n | AND cm.chatMemberPersonUid != ?\n | LIMIT 1)\n |\t\t\t\t\t\t \n |\t\t\t\t WHERE cc.chatUid != 0 \n |\t\t\t\t AND cmm.chatMemberPersonUid = ?\n |\t\t\t\t )\n | \n | AND Person.firstNames||' '||Person.lastName LIKE ? \n | ORDER BY latestMessageTimestamp DESC\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT Chat.*,\n | Message.messageText AS latestMessage,\n | Message.messageTimestamp AS latestMessageTimestamp,\n | op.personUid AS otherPersonUid,\n | op.firstNames AS otherPersonFirstNames,\n | op.lastName AS otherPersonLastName,\n | (\n |\t\t\t\tSELECT COUNT(*) \n |\t\t\t\t FROM Message \n |\t\t\t\t WHERE Message.messageTableId = 127 \n |\t\t\t\t AND Message.messageEntityUid = Chat.chatUid \n |\t\t\t\t AND Message.messageSenderPersonUid != ?\n |\t\t\t\t AND Message.messageTimestamp > coalesce((\n |\t\t\t\t\t\tSELECT MessageRead.messageReadLct FROM MessageRead \n |\t\t\t\t\t\tWHERE MessageRead.messageReadPersonUid = ?\n |\t\t\t\t\t\tAND MessageRead.messageReadMessageUid = Message.messageUid \n |\t\t\t\t ), 0)\n |\t\t\t\t\t\n |\t\t\t\t\n |\t\t\t ) AS unreadMessageCount,\n | \n | (SELECT COUNT(*)\n | FROM ChatMember mm\n | WHERE mm.chatMemberChatUid = Chat.chatUid ) AS numMembers\n | FROM ChatMember\n | LEFT JOIN Chat \n | ON Chat.chatUid = ChatMember.chatMemberChatUid\n | LEFT JOIN Message \n | ON Message.messageUid =\n | (SELECT messageUid\n | FROM Message\n | WHERE messageEntityUid = Chat.chatUid\n | AND messageTableId = 127\n | ORDER BY messageTimestamp DESC\n | LIMIT 1)\n | LEFT JOIN Person op \n | ON op.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp \n | ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND ChatMember.chatMemberLeftDate = 9223372036854775807\n | AND Chat.chatUid != 0 \n | AND op.firstNames||' '||op.lastName LIKE ? \n | -- When in search mode we need to add all Persons who match the search to the list, even if\n | -- no chat has started\n | UNION\n | SELECT Chat.*,\n | '' AS latestMessage,\n | 0 AS latestMessageTimestamp,\n | Person.personUid AS otherPersonUid,\n | Person.firstNames AS otherPersonFirstNames,\n | Person.lastName AS otherPersonLastName,\n | 0 AS unreadMessageCount,\n | 0 AS numMembers\n | \n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n |\t\t \n | LEFT JOIN Chat\n | ON Chat.chatUid = 0\n | WHERE ? != '%'\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | AND Person.personUid != ?\n | \n | AND Person.personUid NOT IN\n |\t\t\t (\n |\t\t\t\tSELECT chatpeople.personUid \n |\t\t\t\t FROM ChatMember cmm\n |\t\t\t\t\t LEFT JOIN Chat cc \n |\t\t\t\t\t\t\t ON cc.chatUid = cmm.chatMemberChatUid \n |\t\t\t \n |\t\t\t\t LEFT JOIN Person chatpeople \n | ON chatpeople.personUid =\n | (SELECT chatpeopleother.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person chatpeopleother \n | ON chatpeopleother.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = cc.chatUid\n | AND cm.chatMemberPersonUid != ?\n | LIMIT 1)\n |\t\t\t\t\t\t \n |\t\t\t\t WHERE cc.chatUid != 0 \n |\t\t\t\t AND cmm.chatMemberPersonUid = ?\n |\t\t\t\t )\n | \n | AND Person.firstNames||' '||Person.lastName LIKE ? \n | ORDER BY latestMessageTimestamp DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ChatDao_JdbcKt._db, _stmtConfig, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$searchBit, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ChatDao_JdbcKt._db, listOf(['Message', 'MessageRead', 'ChatMember', 'Chat', 'Person', 'PersonGroupMember', 'ScopedGrant']), ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this.this$ChatDao_JdbcKt, this.closure$personUid, this.closure$searchBit, _limit, _offset)); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$searchBit); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchBit); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$searchBit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ChatDao_JdbcKt = this$ChatDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$_liveResult = void 0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Chat.*,\n | Message.messageText AS latestMessage,\n | Message.messageTimestamp AS latestMessageTimestamp,\n | op.personUid AS otherPersonUid,\n | op.firstNames AS otherPersonFirstNames,\n | op.lastName AS otherPersonLastName,\n | (\n |\t\t\t\tSELECT COUNT(*) \n |\t\t\t\t FROM Message \n |\t\t\t\t WHERE Message.messageTableId = 127 \n |\t\t\t\t AND Message.messageEntityUid = Chat.chatUid \n |\t\t\t\t AND Message.messageSenderPersonUid != ?\n |\t\t\t\t AND Message.messageTimestamp > coalesce((\n |\t\t\t\t\t\tSELECT MessageRead.messageReadLct FROM MessageRead \n |\t\t\t\t\t\tWHERE MessageRead.messageReadPersonUid = ?\n |\t\t\t\t\t\tAND MessageRead.messageReadMessageUid = Message.messageUid \n |\t\t\t\t ), 0)\n |\t\t\t\t\t\n |\t\t\t\t\n |\t\t\t ) AS unreadMessageCount,\n | \n | (SELECT COUNT(*)\n | FROM ChatMember mm\n | WHERE mm.chatMemberChatUid = Chat.chatUid ) AS numMembers\n | FROM ChatMember\n | LEFT JOIN Chat \n | ON Chat.chatUid = ChatMember.chatMemberChatUid\n | LEFT JOIN Message \n | ON Message.messageUid =\n | (SELECT messageUid\n | FROM Message\n | WHERE messageEntityUid = Chat.chatUid\n | AND messageTableId = 127\n | ORDER BY messageTimestamp DESC\n | LIMIT 1)\n | LEFT JOIN Person op \n | ON op.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp \n | ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND ChatMember.chatMemberLeftDate = 9223372036854775807\n | AND Chat.chatUid != 0 \n | AND op.firstNames||' '||op.lastName LIKE ? \n | -- When in search mode we need to add all Persons who match the search to the list, even if\n | -- no chat has started\n | UNION\n | SELECT Chat.*,\n | '' AS latestMessage,\n | 0 AS latestMessageTimestamp,\n | Person.personUid AS otherPersonUid,\n | Person.firstNames AS otherPersonFirstNames,\n | Person.lastName AS otherPersonLastName,\n | 0 AS unreadMessageCount,\n | 0 AS numMembers\n | \n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n |\t\t \n | LEFT JOIN Chat\n | ON Chat.chatUid = 0\n | WHERE ? != '%'\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | AND Person.personUid != ?\n | \n | AND Person.personUid NOT IN\n |\t\t\t (\n |\t\t\t\tSELECT chatpeople.personUid \n |\t\t\t\t FROM ChatMember cmm\n |\t\t\t\t\t LEFT JOIN Chat cc \n |\t\t\t\t\t\t\t ON cc.chatUid = cmm.chatMemberChatUid \n |\t\t\t \n |\t\t\t\t LEFT JOIN Person chatpeople \n | ON chatpeople.personUid =\n | (SELECT chatpeopleother.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person chatpeopleother \n | ON chatpeopleother.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = cc.chatUid\n | AND cm.chatMemberPersonUid != ?\n | LIMIT 1)\n |\t\t\t\t\t\t \n |\t\t\t\t WHERE cc.chatUid != 0 \n |\t\t\t\t AND cmm.chatMemberPersonUid = ?\n |\t\t\t\t )\n | \n | AND Person.firstNames||' '||Person.lastName LIKE ? \n | ORDER BY latestMessageTimestamp DESC\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Chat.*,\n | Message.messageText AS latestMessage,\n | Message.messageTimestamp AS latestMessageTimestamp,\n | op.personUid AS otherPersonUid,\n | op.firstNames AS otherPersonFirstNames,\n | op.lastName AS otherPersonLastName,\n | (\n |\t\t\t\tSELECT COUNT(*) \n |\t\t\t\t FROM Message \n |\t\t\t\t WHERE Message.messageTableId = 127 \n |\t\t\t\t AND Message.messageEntityUid = Chat.chatUid \n |\t\t\t\t AND Message.messageSenderPersonUid != ?\n |\t\t\t\t AND Message.messageTimestamp > coalesce((\n |\t\t\t\t\t\tSELECT MessageRead.messageReadLct FROM MessageRead \n |\t\t\t\t\t\tWHERE MessageRead.messageReadPersonUid = ?\n |\t\t\t\t\t\tAND MessageRead.messageReadMessageUid = Message.messageUid \n |\t\t\t\t ), 0)\n |\t\t\t\t\t\n |\t\t\t\t\n |\t\t\t ) AS unreadMessageCount,\n | \n | (SELECT COUNT(*)\n | FROM ChatMember mm\n | WHERE mm.chatMemberChatUid = Chat.chatUid ) AS numMembers\n | FROM ChatMember\n | LEFT JOIN Chat \n | ON Chat.chatUid = ChatMember.chatMemberChatUid\n | LEFT JOIN Message \n | ON Message.messageUid =\n | (SELECT messageUid\n | FROM Message\n | WHERE messageEntityUid = Chat.chatUid\n | AND messageTableId = 127\n | ORDER BY messageTimestamp DESC\n | LIMIT 1)\n | LEFT JOIN Person op \n | ON op.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp \n | ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND ChatMember.chatMemberLeftDate = 9223372036854775807\n | AND Chat.chatUid != 0 \n | AND op.firstNames||' '||op.lastName LIKE ? \n | -- When in search mode we need to add all Persons who match the search to the list, even if\n | -- no chat has started\n | UNION\n | SELECT Chat.*,\n | '' AS latestMessage,\n | 0 AS latestMessageTimestamp,\n | Person.personUid AS otherPersonUid,\n | Person.firstNames AS otherPersonFirstNames,\n | Person.lastName AS otherPersonLastName,\n | 0 AS unreadMessageCount,\n | 0 AS numMembers\n | \n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n |\t\t \n | LEFT JOIN Chat\n | ON Chat.chatUid = 0\n | WHERE ? != '%'\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | AND Person.personUid != ?\n | \n | AND Person.personUid NOT IN\n |\t\t\t (\n |\t\t\t\tSELECT chatpeople.personUid \n |\t\t\t\t FROM ChatMember cmm\n |\t\t\t\t\t LEFT JOIN Chat cc \n |\t\t\t\t\t\t\t ON cc.chatUid = cmm.chatMemberChatUid \n |\t\t\t \n |\t\t\t\t LEFT JOIN Person chatpeople \n | ON chatpeople.personUid =\n | (SELECT chatpeopleother.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person chatpeopleother \n | ON chatpeopleother.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = cc.chatUid\n | AND cm.chatMemberPersonUid != ?\n | LIMIT 1)\n |\t\t\t\t\t\t \n |\t\t\t\t WHERE cc.chatUid != 0 \n |\t\t\t\t AND cmm.chatMemberPersonUid = ?\n |\t\t\t\t )\n | \n | AND Person.firstNames||' '||Person.lastName LIKE ? \n | ORDER BY latestMessageTimestamp DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ChatDao_JdbcKt._db, _stmtConfig, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$searchBit, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ChatDao_JdbcKt._db, listOf(['Message', 'MessageRead', 'ChatMember', 'Chat', 'Person', 'PersonGroupMember', 'ScopedGrant']), ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this.this$ChatDao_JdbcKt, this.closure$personUid, this.closure$searchBit)); }; ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ChatDao_JdbcKt.prototype.findAllChatsForUser_4wgjuj$ = function (searchBit, personUid) { var _result = new ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral(this, personUid, searchBit); return _result; }; function ChatDao_JdbcKt$getTitleChat$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ChatDao_JdbcKt$getTitleChat$lambda(closure$personUid_0, closure$chatUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$chatUid = closure$chatUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$getTitleChat$lambda; Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$chatUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$getTitleChat$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$getTitleChat$lambda(closure$personUid_0, closure$chatUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$getTitleChat$lambda(closure$personUid_0, closure$chatUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getTitleChat_3pjtqy$($this, chatUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$chatUid = chatUid_0; this.local$personUid = personUid_0; } Coroutine$getTitleChat_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTitleChat_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTitleChat_3pjtqy$.prototype.constructor = Coroutine$getTitleChat_3pjtqy$; Coroutine$getTitleChat_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT CASE\n | WHEN Chat.chatGroup THEN Chat.chatTitle\n | ELSE Person.firstNames||' '||Person.lastName\n | END AS title\n | FROM Chat\n | LEFT JOIN Person \n | ON CAST(Chat.chatGroup AS INTEGER) = 0\n | AND Person.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE Chat.chatUid = ?\n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT CASE\n | WHEN Chat.chatGroup THEN Chat.chatTitle\n | ELSE Person.firstNames||' '||Person.lastName\n | END AS title\n | FROM Chat\n | LEFT JOIN Person \n | ON CAST(Chat.chatGroup AS INTEGER) = 0\n | AND Person.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE Chat.chatUid = ?\n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ChatDao_JdbcKt$getTitleChat$lambda(this.local$personUid, this.local$chatUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.getTitleChat_3pjtqy$ = function (chatUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$getTitleChat_3pjtqy$(this, chatUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ChatDao_JdbcKt$getChatByOtherPerson$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_chatUid = _resultSet.getLong_61zpoe$('chatUid'); var tmp_chatStartDate = _resultSet.getLong_61zpoe$('chatStartDate'); var tmp_chatTitle = _resultSet.getString_61zpoe$('chatTitle'); var tmp_chatGroup = _resultSet.getBoolean_61zpoe$('chatGroup'); var tmp_chatLct = _resultSet.getLong_61zpoe$('chatLct'); var _entity = new Chat(); _entity.chatUid = tmp_chatUid; _entity.chatStartDate = tmp_chatStartDate; _entity.chatTitle = tmp_chatTitle; _entity.chatGroup = tmp_chatGroup; _entity.chatLct = tmp_chatLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda(closure$otherPersonUid_0, closure$loggedInPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$otherPersonUid = closure$otherPersonUid_0; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda; Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$otherPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$loggedInPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$otherPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$loggedInPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$getChatByOtherPerson$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$getChatByOtherPerson$lambda(closure$otherPersonUid_0, closure$loggedInPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda(closure$otherPersonUid_0, closure$loggedInPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getChatByOtherPerson_3pjtqy$($this, otherPersonUid_0, loggedInPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$otherPersonUid = otherPersonUid_0; this.local$loggedInPersonUid = loggedInPersonUid_0; } Coroutine$getChatByOtherPerson_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getChatByOtherPerson_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getChatByOtherPerson_3pjtqy$.prototype.constructor = Coroutine$getChatByOtherPerson_3pjtqy$; Coroutine$getChatByOtherPerson_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Chat) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Chat.*\n | FROM ChatMember\n | LEFT JOIN Chat ON Chat.chatUid = ChatMember.chatMemberChatUid\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND CAST(Chat.chatGroup AS INTEGER) = 0\n | AND Chat.chatUid IN \n | (\n | SELECT ChatMember.chatMemberChatUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid\n | AND ChatMember.chatMemberPersonUid = ? \n | ) \n | AND ? != ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Chat.*\n | FROM ChatMember\n | LEFT JOIN Chat ON Chat.chatUid = ChatMember.chatMemberChatUid\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND CAST(Chat.chatGroup AS INTEGER) = 0\n | AND Chat.chatUid IN \n | (\n | SELECT ChatMember.chatMemberChatUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid\n | AND ChatMember.chatMemberPersonUid = ? \n | ) \n | AND ? != ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ChatDao_JdbcKt$getChatByOtherPerson$lambda(this.local$otherPersonUid, this.local$loggedInPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.getChatByOtherPerson_3pjtqy$ = function (otherPersonUid_0, loggedInPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$getChatByOtherPerson_3pjtqy$(this, otherPersonUid_0, loggedInPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterChat_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_2($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_2.prototype.constructor = Coroutine$insertAsync_2; Coroutine$insertAsync_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterChat_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_2(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterChat_.insertList_4ezy5m$(entityList); }; function ChatDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.chatStartDate); _stmt.setString_vqvrqt$(2, _entity.chatTitle); _stmt.setBoolean_fzusl$(3, _entity.chatGroup); _stmt.setLong_6svq3l$(4, _entity.chatLct); _stmt.setLong_6svq3l$(5, _entity.chatUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ChatDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Chat SET chatStartDate = ?, chatTitle = ?, chatGroup = ?, chatLct = ? WHERE chatUid = ?'; prepareAndUseStatement_0(this._db, _sql, ChatDao_JdbcKt$updateList$lambda(entityList)); }; function ChatDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.chatStartDate); _stmt.setString_vqvrqt$(2, closure$entity.chatTitle); _stmt.setBoolean_fzusl$(3, closure$entity.chatGroup); _stmt.setLong_6svq3l$(4, closure$entity.chatLct); _stmt.setLong_6svq3l$(5, closure$entity.chatUid); return _stmt.executeUpdate(); }; } ChatDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Chat SET chatStartDate = ?, chatTitle = ?, chatGroup = ?, chatLct = ? WHERE chatUid = ?'; prepareAndUseStatement_0(this._db, _sql, ChatDao_JdbcKt$update$lambda(entity)); }; function ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Chat (chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING chatUid'; } else tmp$ = ''; return "INSERT INTO Chat (chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(COALESCE(?,nextval('Chat_chatUid_seq')), ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.chatUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.chatUid); } stmt.setLong_6svq3l$(2, entity.chatStartDate); stmt.setString_vqvrqt$(3, entity.chatTitle); stmt.setBoolean_fzusl$(4, entity.chatGroup); stmt.setLong_6svq3l$(5, entity.chatLct); }; ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ChatDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao_JdbcKt', interfaces: [ChatDao]}; function ChatDao_ReplicateWrapper(_db, _dao) { ChatDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_6($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_6.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_6; Coroutine$replicateOnNewNode_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_6(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_6($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_6.prototype.constructor = Coroutine$replicateOnChange_6; Coroutine$replicateOnChange_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_6(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_ReplicateWrapper.prototype.findAllChatsForUser_4wgjuj$ = function (searchBit, personUid) { return this._dao_0.findAllChatsForUser_4wgjuj$(searchBit, personUid); }; ChatDao_ReplicateWrapper.prototype.getTitleChat_3pjtqy$ = function (chatUid, personUid, continuation) { return this._dao_0.getTitleChat_3pjtqy$(chatUid, personUid, continuation); }; ChatDao_ReplicateWrapper.prototype.getChatByOtherPerson_3pjtqy$ = function (otherPersonUid, loggedInPersonUid, continuation) { return this._dao_0.getChatByOtherPerson_3pjtqy$(otherPersonUid, loggedInPersonUid, continuation); }; ChatDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_3($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_3.prototype.constructor = Coroutine$insertAsync_3; Coroutine$insertAsync_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.chatUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(127, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.chatUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.chatLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.chatUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_3(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao_ReplicateWrapper', interfaces: [ChatDao]}; function ChatDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ChatDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_7($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_7.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_7; Coroutine$replicateOnNewNode_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_7(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_7($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_7.prototype.constructor = Coroutine$replicateOnChange_7; Coroutine$replicateOnChange_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_7(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_Repo.prototype.findAllChatsForUser_4wgjuj$ = function (searchBit, personUid) { var _result = this._dao.findAllChatsForUser_4wgjuj$(searchBit, personUid); return _result; }; function Coroutine$getTitleChat_3pjtqy$_0($this, chatUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$chatUid = chatUid_0; this.local$personUid = personUid_0; } Coroutine$getTitleChat_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTitleChat_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTitleChat_3pjtqy$_0.prototype.constructor = Coroutine$getTitleChat_3pjtqy$_0; Coroutine$getTitleChat_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getTitleChat_3pjtqy$(this.local$chatUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.getTitleChat_3pjtqy$ = function (chatUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$getTitleChat_3pjtqy$_0(this, chatUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getChatByOtherPerson_3pjtqy$_0($this, otherPersonUid_0, loggedInPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$otherPersonUid = otherPersonUid_0; this.local$loggedInPersonUid = loggedInPersonUid_0; } Coroutine$getChatByOtherPerson_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getChatByOtherPerson_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getChatByOtherPerson_3pjtqy$_0.prototype.constructor = Coroutine$getChatByOtherPerson_3pjtqy$_0; Coroutine$getChatByOtherPerson_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getChatByOtherPerson_3pjtqy$(this.local$otherPersonUid, this.local$loggedInPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.getChatByOtherPerson_3pjtqy$ = function (otherPersonUid_0, loggedInPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$getChatByOtherPerson_3pjtqy$_0(this, otherPersonUid_0, loggedInPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_4($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_4.prototype.constructor = Coroutine$insertAsync_4; Coroutine$insertAsync_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_4(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ChatDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ChatDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ChatDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao_Repo', interfaces: [ChatDao]}; function ChatMemberDao_JdbcKt(_db) { ChatMemberDao.call(this); this._db = _db; this._insertAdapterChatMember_ = new ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral(this._db); } function Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_8($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_8.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_8; Coroutine$replicateOnNewNode_s8cxhz$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberPk,\n | ? AS chatMemberDestination\n | \n | FROM UserSession\n | JOIN ChatMember \n | ON ((ChatMember.chatMemberChatUid IN\n | (SELECT chatMemberInternal.chatMemberChatUid \n | FROM ChatMember chatMemberInternal\n | WHERE chatMemberInternal.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = ?), 0) \n | /*psql ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberPk,\n | ? AS chatMemberDestination\n | \n | FROM UserSession\n | JOIN ChatMember \n | ON ((ChatMember.chatMemberChatUid IN\n | (SELECT chatMemberInternal.chatMemberChatUid \n | FROM ChatMember chatMemberInternal\n | WHERE chatMemberInternal.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = ?), 0) \n | ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_8(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_8($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_8.prototype.constructor = Coroutine$replicateOnChange_8; Coroutine$replicateOnChange_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberUid,\n | UserSession.usClientNodeId AS chatMemberDestination\n | FROM ChangeLog\n | JOIN chatMember\n | ON ChangeLog.chTableId = 128\n | AND ChangeLog.chEntityPk = ChatMember.chatMemberUid\n | \n | JOIN UserSession ON \n | (UserSession.usSessionType = 2\n | OR (UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid IN \n | (SELECT ChatMemberInternal.chatMemberChatUid \n | FROM ChatMember ChatMemberInternal\n | WHERE ChatMemberInternal.chatMemberPersonUid = \n | UserSession.usPersonUid))))\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberUid,\n | UserSession.usClientNodeId AS chatMemberDestination\n | FROM ChangeLog\n | JOIN chatMember\n | ON ChangeLog.chTableId = 128\n | AND ChangeLog.chEntityPk = ChatMember.chatMemberUid\n | \n | JOIN UserSession ON \n | (UserSession.usSessionType = 2\n | OR (UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid IN \n | (SELECT ChatMemberInternal.chatMemberChatUid \n | FROM ChatMember ChatMemberInternal\n | WHERE ChatMemberInternal.chatMemberPersonUid = \n | UserSession.usPersonUid))))\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ChatMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_8(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterChatMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_5($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_5.prototype.constructor = Coroutine$insertAsync_5; Coroutine$insertAsync_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterChatMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_5(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterChatMember_.insertList_4ezy5m$(entityList); }; function ChatMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.chatMemberChatUid); _stmt.setLong_6svq3l$(2, _entity.chatMemberPersonUid); _stmt.setLong_6svq3l$(3, _entity.chatMemberJoinedDate); _stmt.setLong_6svq3l$(4, _entity.chatMemberLeftDate); _stmt.setLong_6svq3l$(5, _entity.chatMemberLct); _stmt.setLong_6svq3l$(6, _entity.chatMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ChatMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ChatMember SET chatMemberChatUid = ?, chatMemberPersonUid = ?, chatMemberJoinedDate = ?, chatMemberLeftDate = ?, chatMemberLct = ? WHERE chatMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, ChatMemberDao_JdbcKt$updateList$lambda(entityList)); }; function ChatMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.chatMemberChatUid); _stmt.setLong_6svq3l$(2, closure$entity.chatMemberPersonUid); _stmt.setLong_6svq3l$(3, closure$entity.chatMemberJoinedDate); _stmt.setLong_6svq3l$(4, closure$entity.chatMemberLeftDate); _stmt.setLong_6svq3l$(5, closure$entity.chatMemberLct); _stmt.setLong_6svq3l$(6, closure$entity.chatMemberUid); return _stmt.executeUpdate(); }; } ChatMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ChatMember SET chatMemberChatUid = ?, chatMemberPersonUid = ?, chatMemberJoinedDate = ?, chatMemberLeftDate = ?, chatMemberLct = ? WHERE chatMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, ChatMemberDao_JdbcKt$update$lambda(entity)); }; function ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ChatMember (chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING chatMemberUid'; } else tmp$ = ''; return "INSERT INTO ChatMember (chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(COALESCE(?,nextval('ChatMember_chatMemberUid_seq')), ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.chatMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.chatMemberUid); } stmt.setLong_6svq3l$(2, entity.chatMemberChatUid); stmt.setLong_6svq3l$(3, entity.chatMemberPersonUid); stmt.setLong_6svq3l$(4, entity.chatMemberJoinedDate); stmt.setLong_6svq3l$(5, entity.chatMemberLeftDate); stmt.setLong_6svq3l$(6, entity.chatMemberLct); }; ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ChatMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao_JdbcKt', interfaces: [ChatMemberDao]}; function ChatMemberDao_ReplicateWrapper(_db, _dao) { ChatMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_9($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_9.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_9; Coroutine$replicateOnNewNode_s8cxhz$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_9(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_9($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_9.prototype.constructor = Coroutine$replicateOnChange_9; Coroutine$replicateOnChange_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_9(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_6($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_6.prototype.constructor = Coroutine$insertAsync_6; Coroutine$insertAsync_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.chatMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(128, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.chatMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.chatMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.chatMemberUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_6(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao_ReplicateWrapper', interfaces: [ChatMemberDao]}; function ChatMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ChatMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_10($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_10.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_10; Coroutine$replicateOnNewNode_s8cxhz$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_10(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_10($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_10.prototype.constructor = Coroutine$replicateOnChange_10; Coroutine$replicateOnChange_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_10(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_7($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_7.prototype.constructor = Coroutine$insertAsync_7; Coroutine$insertAsync_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_7(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ChatMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ChatMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ChatMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao_Repo', interfaces: [ChatMemberDao]}; function ClazzAssignmentContentJoinDao_JdbcKt(_db) { ClazzAssignmentContentJoinDao.call(this); this._db = _db; this._insertAdapterClazzAssignmentContentJoin_ = new ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral(this._db); } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_11($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_11.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_11; Coroutine$replicateOnNewNode_s8cxhz$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | ? AS cacjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | JOIN ClazzAssignmentContentJoin\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = ?), 0) \n | /*psql ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | ? AS cacjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | JOIN ClazzAssignmentContentJoin\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = ?), 0) \n | ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_11(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_11($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_11.prototype.constructor = Coroutine$replicateOnChange_11; Coroutine$replicateOnChange_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | UserSession.usClientNodeId AS cacjDestination\n | FROM ChangeLog\n | JOIN ClazzAssignmentContentJoin\n | ON ChangeLog.chTableId = 521\n | AND ChangeLog.chEntityPk = ClazzAssignmentContentJoin.cacjUid\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | UserSession.usClientNodeId AS cacjDestination\n | FROM ChangeLog\n | JOIN ClazzAssignmentContentJoin\n | ON ChangeLog.chTableId = 521\n | AND ChangeLog.chEntityPk = ClazzAssignmentContentJoin.cacjUid\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_11(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_assignmentContentWeight = _resultSet.getInt_61zpoe$('assignmentContentWeight'); var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); _entity.assignmentContentWeight = tmp_assignmentContentWeight; _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.scoreProgress == null) { _entity.scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(_entity.scoreProgress).resultScore = tmp_resultScore; ensureNotNull(_entity.scoreProgress).resultMax = tmp_resultMax; ensureNotNull(_entity.scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(_entity.scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(_entity.scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(_entity.scoreProgress).progress = tmp_progress; ensureNotNull(_entity.scoreProgress).success = tmp_success; ensureNotNull(_entity.scoreProgress).penalty = tmp_penalty; ensureNotNull(_entity.scoreProgress).totalContent = tmp_totalContent; ensureNotNull(_entity.scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$($this, clazzAssignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzAssignmentUid = clazzAssignmentUid_0; this.local$personUid = personUid_0; } Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.prototype.constructor = Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$; Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(this.local$personUid, this.local$clazzAssignmentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.findAllContentByClazzAssignmentUidAsync_3pjtqy$ = function (clazzAssignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$(this, clazzAssignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral(this$ClazzAssignmentContentJoinDao_JdbcKt, closure$personUid, closure$clazzAssignmentUid) { this.this$ClazzAssignmentContentJoinDao_JdbcKt = this$ClazzAssignmentContentJoinDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$clazzAssignmentUid = closure$clazzAssignmentUid; DoorDataSourceFactory.call(this); } function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_assignmentContentWeight = _resultSet.getInt_61zpoe$('assignmentContentWeight'); var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); _entity.assignmentContentWeight = tmp_assignmentContentWeight; _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.scoreProgress == null) { _entity.scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(_entity.scoreProgress).resultScore = tmp_resultScore; ensureNotNull(_entity.scoreProgress).resultMax = tmp_resultMax; ensureNotNull(_entity.scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(_entity.scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(_entity.scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(_entity.scoreProgress).progress = tmp_progress; ensureNotNull(_entity.scoreProgress).success = tmp_success; ensureNotNull(_entity.scoreProgress).penalty = tmp_penalty; ensureNotNull(_entity.scoreProgress).totalContent = tmp_totalContent; ensureNotNull(_entity.scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentContentJoinDao_JdbcKt = this$ClazzAssignmentContentJoinDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentContentJoinDao_JdbcKt._db, _stmtConfig, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzAssignmentUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzAssignmentContentJoinDao_JdbcKt._db, listOf(['ClazzAssignmentContentJoin', 'ContentEntry', 'ContentEntryParentChildJoin', 'ClazzAssignmentRollUp', 'Container']), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this.this$ClazzAssignmentContentJoinDao_JdbcKt, this.closure$personUid, this.closure$clazzAssignmentUid, _limit, _offset)); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentContentJoinDao_JdbcKt = this$ClazzAssignmentContentJoinDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$_liveResult = void 0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentContentJoinDao_JdbcKt._db, _stmtConfig, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzAssignmentUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzAssignmentContentJoinDao_JdbcKt._db, listOf(['ClazzAssignmentContentJoin', 'ContentEntry', 'ContentEntryParentChildJoin', 'ClazzAssignmentRollUp', 'Container']), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this.this$ClazzAssignmentContentJoinDao_JdbcKt, this.closure$personUid, this.closure$clazzAssignmentUid)); }; ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzAssignmentContentJoinDao_JdbcKt.prototype.findAllContentByClazzAssignmentUidDF_3pjtqy$ = function (clazzAssignmentUid, personUid) { var _result = new ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral(this, personUid, clazzAssignmentUid); return _result; }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzAssignmentContentJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_8($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_8.prototype.constructor = Coroutine$insertAsync_8; Coroutine$insertAsync_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignmentContentJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_8(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzAssignmentContentJoin_.insertList_4ezy5m$(entityList); }; function ClazzAssignmentContentJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cacjContentUid); _stmt.setLong_6svq3l$(2, _entity.cacjAssignmentUid); _stmt.setBoolean_fzusl$(3, _entity.cacjActive); _stmt.setInt_vux9f0$(4, _entity.cacjWeight); _stmt.setLong_6svq3l$(5, _entity.cacjMCSN); _stmt.setLong_6svq3l$(6, _entity.cacjLCSN); _stmt.setInt_vux9f0$(7, _entity.cacjLCB); _stmt.setLong_6svq3l$(8, _entity.cacjLct); _stmt.setLong_6svq3l$(9, _entity.cacjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzAssignmentContentJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzAssignmentContentJoin SET cacjContentUid = ?, cacjAssignmentUid = ?, cacjActive = ?, cacjWeight = ?, cacjMCSN = ?, cacjLCSN = ?, cacjLCB = ?, cacjLct = ? WHERE cacjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzAssignmentContentJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzAssignmentContentJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cacjContentUid); _stmt.setLong_6svq3l$(2, closure$entity.cacjAssignmentUid); _stmt.setBoolean_fzusl$(3, closure$entity.cacjActive); _stmt.setInt_vux9f0$(4, closure$entity.cacjWeight); _stmt.setLong_6svq3l$(5, closure$entity.cacjMCSN); _stmt.setLong_6svq3l$(6, closure$entity.cacjLCSN); _stmt.setInt_vux9f0$(7, closure$entity.cacjLCB); _stmt.setLong_6svq3l$(8, closure$entity.cacjLct); _stmt.setLong_6svq3l$(9, closure$entity.cacjUid); return _stmt.executeUpdate(); }; } ClazzAssignmentContentJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzAssignmentContentJoin SET cacjContentUid = ?, cacjAssignmentUid = ?, cacjActive = ?, cacjWeight = ?, cacjMCSN = ?, cacjLCSN = ?, cacjLCB = ?, cacjLct = ? WHERE cacjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzAssignmentContentJoinDao_JdbcKt$update$lambda(entity)); }; function ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzAssignmentContentJoin (cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cacjUid'; } else tmp$ = ''; return "INSERT INTO ClazzAssignmentContentJoin (cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES(COALESCE(?,nextval('ClazzAssignmentContentJoin_cacjUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cacjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cacjUid); } stmt.setLong_6svq3l$(2, entity.cacjContentUid); stmt.setLong_6svq3l$(3, entity.cacjAssignmentUid); stmt.setBoolean_fzusl$(4, entity.cacjActive); stmt.setInt_vux9f0$(5, entity.cacjWeight); stmt.setLong_6svq3l$(6, entity.cacjMCSN); stmt.setLong_6svq3l$(7, entity.cacjLCSN); stmt.setInt_vux9f0$(8, entity.cacjLCB); stmt.setLong_6svq3l$(9, entity.cacjLct); }; ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzAssignmentContentJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao_JdbcKt', interfaces: [ClazzAssignmentContentJoinDao]}; function ClazzAssignmentContentJoinDao_ReplicateWrapper(_db, _dao) { ClazzAssignmentContentJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_12($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_12.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_12; Coroutine$replicateOnNewNode_s8cxhz$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_12(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_12($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_12.prototype.constructor = Coroutine$replicateOnChange_12; Coroutine$replicateOnChange_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_12(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.findAllContentByClazzAssignmentUidAsync_3pjtqy$ = function (clazzAssignmentUid, personUid, continuation) { return this._dao_0.findAllContentByClazzAssignmentUidAsync_3pjtqy$(clazzAssignmentUid, personUid, continuation); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.findAllContentByClazzAssignmentUidDF_3pjtqy$ = function (clazzAssignmentUid, personUid) { return this._dao_0.findAllContentByClazzAssignmentUidDF_3pjtqy$(clazzAssignmentUid, personUid); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_9($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_9.prototype.constructor = Coroutine$insertAsync_9; Coroutine$insertAsync_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cacjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(521, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cacjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cacjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cacjUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_9(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao_ReplicateWrapper', interfaces: [ClazzAssignmentContentJoinDao]}; function ClazzAssignmentContentJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzAssignmentContentJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_13($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_13.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_13; Coroutine$replicateOnNewNode_s8cxhz$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_13(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_13($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_13.prototype.constructor = Coroutine$replicateOnChange_13; Coroutine$replicateOnChange_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_13(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0($this, clazzAssignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignmentUid = clazzAssignmentUid_0; this.local$personUid = personUid_0; } Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0.prototype.constructor = Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0; Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllContentByClazzAssignmentUidAsync_3pjtqy$(this.local$clazzAssignmentUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.findAllContentByClazzAssignmentUidAsync_3pjtqy$ = function (clazzAssignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$_0(this, clazzAssignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_Repo.prototype.findAllContentByClazzAssignmentUidDF_3pjtqy$ = function (clazzAssignmentUid, personUid) { var _result = this._dao.findAllContentByClazzAssignmentUidDF_3pjtqy$(clazzAssignmentUid, personUid); return _result; }; ClazzAssignmentContentJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_10($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_10.prototype.constructor = Coroutine$insertAsync_10; Coroutine$insertAsync_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_10(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzAssignmentContentJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzAssignmentContentJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzAssignmentContentJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao_Repo', interfaces: [ClazzAssignmentContentJoinDao]}; function ClazzAssignmentDao_JdbcKt(_db) { ClazzAssignmentDao.call(this); this._db = _db; this._insertAdapterClazzAssignment_ = new ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral(this._db); } function Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_14($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_14.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_14; Coroutine$replicateOnNewNode_s8cxhz$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | ? AS caDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = ?), 0) \n | /*psql ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | ? AS caDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = ?), 0) \n | ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_14(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_14($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_14.prototype.constructor = Coroutine$replicateOnChange_14; Coroutine$replicateOnChange_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | UserSession.usClientNodeId AS caDestination\n | FROM ChangeLog\n | JOIN ClazzAssignment\n | ON ChangeLog.chTableId = 520\n | AND ChangeLog.chEntityPk = ClazzAssignment.caUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | UserSession.usClientNodeId AS caDestination\n | FROM ChangeLog\n | JOIN ClazzAssignment\n | ON ChangeLog.chTableId = 520\n | AND ChangeLog.chEntityPk = ClazzAssignment.caUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_14(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); var _entity = new ClazzAssignment(); _entity.caUid = tmp_caUid; _entity.caTitle = tmp_caTitle; _entity.caDescription = tmp_caDescription; _entity.caGroupUid = tmp_caGroupUid; _entity.caActive = tmp_caActive; _entity.caClassCommentEnabled = tmp_caClassCommentEnabled; _entity.caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; _entity.caCompletionCriteria = tmp_caCompletionCriteria; _entity.caRequireFileSubmission = tmp_caRequireFileSubmission; _entity.caFileType = tmp_caFileType; _entity.caSizeLimit = tmp_caSizeLimit; _entity.caNumberOfFiles = tmp_caNumberOfFiles; _entity.caSubmissionPolicy = tmp_caSubmissionPolicy; _entity.caMarkingType = tmp_caMarkingType; _entity.caRequireTextSubmission = tmp_caRequireTextSubmission; _entity.caTextLimitType = tmp_caTextLimitType; _entity.caTextLimit = tmp_caTextLimit; _entity.caXObjectUid = tmp_caXObjectUid; _entity.caClazzUid = tmp_caClazzUid; _entity.caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; _entity.caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; _entity.caLastChangedBy = tmp_caLastChangedBy; _entity.caLct = tmp_caLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$; Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment\n | WHERE ClazzAssignment.caClazzUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment\n | WHERE ClazzAssignment.caClazzUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.getAllAssignmentsByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$cbUid = closure$cbUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cbUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_2($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_2.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_2; Coroutine$updateActiveByUid_zaz62j$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzAssignment \n | SET caActive = ?, \n | caLct = ?\n | WHERE caUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzAssignment \n | SET caActive = ?, \n | caLct = ?\n | WHERE caUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$cbUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_2(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_notSubmittedStudents = _resultSet.getInt_61zpoe$('notSubmittedStudents'); var tmp_submittedStudents = _resultSet.getInt_61zpoe$('submittedStudents'); var tmp_totalStudents = _resultSet.getInt_61zpoe$('totalStudents'); var tmp_markedStudents = _resultSet.getInt_61zpoe$('markedStudents'); var tmp_hasMetricsPermission = _resultSet.getBoolean_61zpoe$('hasMetricsPermission'); var _entity = new AssignmentProgressSummary(); _entity.notSubmittedStudents = tmp_notSubmittedStudents; _entity.submittedStudents = tmp_submittedStudents; _entity.totalStudents = tmp_totalStudents; _entity.markedStudents = tmp_markedStudents; _entity.hasMetricsPermission = tmp_hasMetricsPermission; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$group); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$assignmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$_liveResult = void 0; } Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, AssignmentProgressSummary) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT (SELECT COUNT(*) FROM SubmitterList) AS totalStudents,\n | \n | 0 as notSubmittedStudents,\n | \n | (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList))\n | AS submittedStudents,\n | \n | \n | (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ?\n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList))\n | AS markedStudents, \n | \n | 'TRUE' AS hasMetricsPermission\n | \n | FROM ClazzAssignment\n | WHERE caActive\n | AND caClazzUid = ? \n | AND caUid = ? \n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT (SELECT COUNT(*) FROM SubmitterList) AS totalStudents,\n | \n | 0 as notSubmittedStudents,\n | \n | (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList))\n | AS submittedStudents,\n | \n | \n | (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ?\n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList))\n | AS markedStudents, \n | \n | 'TRUE' AS hasMetricsPermission\n | \n | FROM ClazzAssignment\n | WHERE caActive\n | AND caClazzUid = ? \n | AND caUid = ? \n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$clazzUid, this.local$closure$group, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.getProgressSummaryForAssignment_jl0yiw$ = function (assignmentUid, clazzUid, group) { var _result = new DoorLiveDataImpl(this._db, listOf(['ClazzEnrolment', 'Person', 'ClazzAssignment', 'CourseBlock', 'CourseGroupMember', 'CourseAssignmentSubmission', 'CourseAssignmentMark']), ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this, assignmentUid, clazzUid, group)); return _result; }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral(this$ClazzAssignmentDao_JdbcKt, closure$assignmentUid, closure$clazzUid, closure$group, closure$searchText) { this.this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt; this.closure$assignmentUid = closure$assignmentUid; this.closure$clazzUid = closure$clazzUid; this.closure$group = closure$group; this.closure$searchText = closure$searchText; DoorDataSourceFactory.call(this); } function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_submitterUid = _resultSet.getLong_61zpoe$('submitterUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_latestPrivateComment = _resultSet.getString_61zpoe$('latestPrivateComment'); var tmp_fileSubmissionStatus = _resultSet.getInt_61zpoe$('fileSubmissionStatus'); var tmp_isGroupAssignment = _resultSet.getBoolean_61zpoe$('isGroupAssignment'); var _entity = new PersonGroupAssignmentSummary(); _entity.submitterUid = tmp_submitterUid; _entity.name = tmp_name; _entity.latestPrivateComment = tmp_latestPrivateComment; _entity.fileSubmissionStatus = tmp_fileSubmissionStatus; _entity.isGroupAssignment = tmp_isGroupAssignment; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$group); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$assignmentUid); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT submitterId AS submitterUid,\n | name, \n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus,\n | \n | (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN 'TRUE' \n | ELSE 'FALSE' END) AS isGroupAssignment,\n | \n | cm.commentsText AS latestPrivateComment \n |\n | FROM SubmitterList\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camUid = (SELECT camUid\n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = SubmitterList.submitterId\n | ORDER BY camLct DESC \n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casUid = (SELECT casUid\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = SubmitterList.submitterId\n | ORDER BY casTimestamp DESC \n | LIMIT 1)\n | LEFT JOIN Comments AS cm \n | ON cm.commentsUid = (\n | SELECT Comments.commentsUid \n | FROM Comments \n | WHERE Comments.commentsEntityType = 520\n | AND commentsEntityUid = ?\n | AND NOT commentsInActive\n | AND NOT commentsPublic\n | AND (CASE WHEN ClazzAssignment.caGroupUid = 0\n | THEN commentsPersonUid = SubmitterList.submitterId\n | ELSE commentSubmitterUid = SubmitterList.submitterId END)\n | ORDER BY commentsDateTimeAdded DESC LIMIT 1) \n | \n | WHERE name LIKE ?\n | ORDER BY name \n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT submitterId AS submitterUid,\n | name, \n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus,\n | \n | (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN 'TRUE' \n | ELSE 'FALSE' END) AS isGroupAssignment,\n | \n | cm.commentsText AS latestPrivateComment \n |\n | FROM SubmitterList\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camUid = (SELECT camUid\n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = SubmitterList.submitterId\n | ORDER BY camLct DESC \n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casUid = (SELECT casUid\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = SubmitterList.submitterId\n | ORDER BY casTimestamp DESC \n | LIMIT 1)\n | LEFT JOIN Comments AS cm \n | ON cm.commentsUid = (\n | SELECT Comments.commentsUid \n | FROM Comments \n | WHERE Comments.commentsEntityType = 520\n | AND commentsEntityUid = ?\n | AND NOT commentsInActive\n | AND NOT commentsPublic\n | AND (CASE WHEN ClazzAssignment.caGroupUid = 0\n | THEN commentsPersonUid = SubmitterList.submitterId\n | ELSE commentSubmitterUid = SubmitterList.submitterId END)\n | ORDER BY commentsDateTimeAdded DESC LIMIT 1) \n | \n | WHERE name LIKE ?\n | ORDER BY name \n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$clazzUid, this.local$closure$group, this.local$closure$searchText, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzAssignmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'Person', 'ClazzAssignment', 'CourseBlock', 'CourseGroupMember', 'CourseAssignmentMark', 'CourseAssignmentSubmission', 'Comments']), ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this.this$ClazzAssignmentDao_JdbcKt, this.closure$assignmentUid, this.closure$clazzUid, this.closure$group, this.closure$searchText, _limit, _offset)); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$group); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$assignmentUid); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$_liveResult = void 0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT submitterId AS submitterUid,\n | name, \n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus,\n | \n | (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN 'TRUE' \n | ELSE 'FALSE' END) AS isGroupAssignment,\n | \n | cm.commentsText AS latestPrivateComment \n |\n | FROM SubmitterList\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camUid = (SELECT camUid\n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = SubmitterList.submitterId\n | ORDER BY camLct DESC \n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casUid = (SELECT casUid\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = SubmitterList.submitterId\n | ORDER BY casTimestamp DESC \n | LIMIT 1)\n | LEFT JOIN Comments AS cm \n | ON cm.commentsUid = (\n | SELECT Comments.commentsUid \n | FROM Comments \n | WHERE Comments.commentsEntityType = 520\n | AND commentsEntityUid = ?\n | AND NOT commentsInActive\n | AND NOT commentsPublic\n | AND (CASE WHEN ClazzAssignment.caGroupUid = 0\n | THEN commentsPersonUid = SubmitterList.submitterId\n | ELSE commentSubmitterUid = SubmitterList.submitterId END)\n | ORDER BY commentsDateTimeAdded DESC LIMIT 1) \n | \n | WHERE name LIKE ?\n | ORDER BY name \n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT submitterId AS submitterUid,\n | name, \n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus,\n | \n | (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN 'TRUE' \n | ELSE 'FALSE' END) AS isGroupAssignment,\n | \n | cm.commentsText AS latestPrivateComment \n |\n | FROM SubmitterList\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camUid = (SELECT camUid\n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = SubmitterList.submitterId\n | ORDER BY camLct DESC \n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casUid = (SELECT casUid\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = SubmitterList.submitterId\n | ORDER BY casTimestamp DESC \n | LIMIT 1)\n | LEFT JOIN Comments AS cm \n | ON cm.commentsUid = (\n | SELECT Comments.commentsUid \n | FROM Comments \n | WHERE Comments.commentsEntityType = 520\n | AND commentsEntityUid = ?\n | AND NOT commentsInActive\n | AND NOT commentsPublic\n | AND (CASE WHEN ClazzAssignment.caGroupUid = 0\n | THEN commentsPersonUid = SubmitterList.submitterId\n | ELSE commentSubmitterUid = SubmitterList.submitterId END)\n | ORDER BY commentsDateTimeAdded DESC LIMIT 1) \n | \n | WHERE name LIKE ?\n | ORDER BY name \n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$clazzUid, this.local$closure$group, this.local$closure$searchText, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzAssignmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'Person', 'ClazzAssignment', 'CourseBlock', 'CourseGroupMember', 'CourseAssignmentMark', 'CourseAssignmentSubmission', 'Comments']), ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this.this$ClazzAssignmentDao_JdbcKt, this.closure$assignmentUid, this.closure$clazzUid, this.closure$group, this.closure$searchText)); }; ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzAssignmentDao_JdbcKt.prototype.getSubmitterListForAssignment_gi085m$ = function (assignmentUid, clazzUid, group, searchText) { var _result = new ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral(this, assignmentUid, clazzUid, group, searchText); return _result; }; function ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(closure$personUid_0, closure$assignmentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$assignmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(closure$personUid_0, closure$assignmentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(closure$personUid_0, closure$assignmentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getSubmitterUid_3pjtqy$($this, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$getSubmitterUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSubmitterUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSubmitterUid_3pjtqy$.prototype.constructor = Coroutine$getSubmitterUid_3pjtqy$; Coroutine$getSubmitterUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber END) as submitterUid\n | FROM ClazzAssignment\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE caUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber END) as submitterUid\n | FROM ClazzAssignment\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE caUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(this.local$personUid, this.local$assignmentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.getSubmitterUid_3pjtqy$ = function (assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$getSubmitterUid_3pjtqy$(this, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda(closure$clazzAssignment_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzAssignment = closure$clazzAssignment_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$clazzAssignment.caTitle); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$clazzAssignment.caDescription); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignment.caGroupUid); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$clazzAssignment.caActive); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$clazzAssignment.caClassCommentEnabled); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$clazzAssignment.caPrivateCommentsEnabled); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$clazzAssignment.caCompletionCriteria); this.local$_stmt.setBoolean_fzusl$(8, this.local$closure$clazzAssignment.caRequireFileSubmission); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$clazzAssignment.caFileType); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$clazzAssignment.caSizeLimit); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$clazzAssignment.caNumberOfFiles); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$clazzAssignment.caSubmissionPolicy); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$clazzAssignment.caMarkingType); this.local$_stmt.setBoolean_fzusl$(14, this.local$closure$clazzAssignment.caRequireTextSubmission); this.local$_stmt.setInt_vux9f0$(15, this.local$closure$clazzAssignment.caTextLimitType); this.local$_stmt.setInt_vux9f0$(16, this.local$closure$clazzAssignment.caTextLimit); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$clazzAssignment.caXObjectUid); this.local$_stmt.setLong_6svq3l$(18, this.local$closure$clazzAssignment.caClazzUid); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$clazzAssignment.caLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(20, this.local$closure$clazzAssignment.caMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(21, this.local$closure$clazzAssignment.caLastChangedBy); this.local$_stmt.setLong_6svq3l$(22, this.local$closure$clazzAssignment.caLct); this.local$_stmt.setLong_6svq3l$(23, this.local$closure$clazzAssignment.caUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$updateAsync$lambda(closure$clazzAssignment_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda(closure$clazzAssignment_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_etrmwv$($this, clazzAssignment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignment = clazzAssignment_0; } Coroutine$updateAsync_etrmwv$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_etrmwv$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_etrmwv$.prototype.constructor = Coroutine$updateAsync_etrmwv$; Coroutine$updateAsync_etrmwv$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzAssignmentDao_JdbcKt$updateAsync$lambda(this.local$clazzAssignment), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.updateAsync_etrmwv$ = function (clazzAssignment_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_etrmwv$(this, clazzAssignment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); var _entity = new ClazzAssignment(); _entity.caUid = tmp_caUid; _entity.caTitle = tmp_caTitle; _entity.caDescription = tmp_caDescription; _entity.caGroupUid = tmp_caGroupUid; _entity.caActive = tmp_caActive; _entity.caClassCommentEnabled = tmp_caClassCommentEnabled; _entity.caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; _entity.caCompletionCriteria = tmp_caCompletionCriteria; _entity.caRequireFileSubmission = tmp_caRequireFileSubmission; _entity.caFileType = tmp_caFileType; _entity.caSizeLimit = tmp_caSizeLimit; _entity.caNumberOfFiles = tmp_caNumberOfFiles; _entity.caSubmissionPolicy = tmp_caSubmissionPolicy; _entity.caMarkingType = tmp_caMarkingType; _entity.caRequireTextSubmission = tmp_caRequireTextSubmission; _entity.caTextLimitType = tmp_caTextLimitType; _entity.caTextLimit = tmp_caTextLimit; _entity.caXObjectUid = tmp_caXObjectUid; _entity.caClazzUid = tmp_caClazzUid; _entity.caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; _entity.caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; _entity.caLastChangedBy = tmp_caLastChangedBy; _entity.caLct = tmp_caLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_1($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_1.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_1; Coroutine$findByUidAsync_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzAssignment) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment \n | WHERE caUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment \n | WHERE caUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_1(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getGroupUidFromAssignment_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$getGroupUidFromAssignment_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getGroupUidFromAssignment_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getGroupUidFromAssignment_s8cxhz$.prototype.constructor = Coroutine$getGroupUidFromAssignment_s8cxhz$; Coroutine$getGroupUidFromAssignment_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT caGroupUid\n | FROM ClazzAssignment\n | WHERE caUid = ?),-1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT caGroupUid\n | FROM ClazzAssignment\n | WHERE caUid = ?),-1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.getGroupUidFromAssignment_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$getGroupUidFromAssignment_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); var _entity = new ClazzAssignmentWithCourseBlock(); _entity.caUid = tmp_caUid; _entity.caTitle = tmp_caTitle; _entity.caDescription = tmp_caDescription; _entity.caGroupUid = tmp_caGroupUid; _entity.caActive = tmp_caActive; _entity.caClassCommentEnabled = tmp_caClassCommentEnabled; _entity.caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; _entity.caCompletionCriteria = tmp_caCompletionCriteria; _entity.caRequireFileSubmission = tmp_caRequireFileSubmission; _entity.caFileType = tmp_caFileType; _entity.caSizeLimit = tmp_caSizeLimit; _entity.caNumberOfFiles = tmp_caNumberOfFiles; _entity.caSubmissionPolicy = tmp_caSubmissionPolicy; _entity.caMarkingType = tmp_caMarkingType; _entity.caRequireTextSubmission = tmp_caRequireTextSubmission; _entity.caTextLimitType = tmp_caTextLimitType; _entity.caTextLimit = tmp_caTextLimit; _entity.caXObjectUid = tmp_caXObjectUid; _entity.caClazzUid = tmp_caClazzUid; _entity.caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; _entity.caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; _entity.caLastChangedBy = tmp_caLastChangedBy; _entity.caLct = tmp_caLct; var _block_nullFieldCount = 0; var tmp_cbUid = _resultSet.getLong_61zpoe$('cbUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbType = _resultSet.getInt_61zpoe$('cbType'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbIndentLevel = _resultSet.getInt_61zpoe$('cbIndentLevel'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbModuleParentBlockUid = _resultSet.getLong_61zpoe$('cbModuleParentBlockUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbTitle = _resultSet.getString_61zpoe$('cbTitle'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbDescription = _resultSet.getString_61zpoe$('cbDescription'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbCompletionCriteria = _resultSet.getInt_61zpoe$('cbCompletionCriteria'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbHideUntilDate = _resultSet.getLong_61zpoe$('cbHideUntilDate'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbDeadlineDate = _resultSet.getLong_61zpoe$('cbDeadlineDate'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbLateSubmissionPenalty = _resultSet.getInt_61zpoe$('cbLateSubmissionPenalty'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbGracePeriodDate = _resultSet.getLong_61zpoe$('cbGracePeriodDate'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbMaxPoints = _resultSet.getInt_61zpoe$('cbMaxPoints'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbMinPoints = _resultSet.getInt_61zpoe$('cbMinPoints'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbIndex = _resultSet.getInt_61zpoe$('cbIndex'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbClazzUid = _resultSet.getLong_61zpoe$('cbClazzUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbActive = _resultSet.getBoolean_61zpoe$('cbActive'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbHidden = _resultSet.getBoolean_61zpoe$('cbHidden'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbEntityUid = _resultSet.getLong_61zpoe$('cbEntityUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbLct = _resultSet.getLong_61zpoe$('cbLct'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }if (_block_nullFieldCount < 19) { if (_entity.block == null) { _entity.block = new CourseBlock(); }ensureNotNull(_entity.block).cbUid = tmp_cbUid; ensureNotNull(_entity.block).cbType = tmp_cbType; ensureNotNull(_entity.block).cbIndentLevel = tmp_cbIndentLevel; ensureNotNull(_entity.block).cbModuleParentBlockUid = tmp_cbModuleParentBlockUid; ensureNotNull(_entity.block).cbTitle = tmp_cbTitle; ensureNotNull(_entity.block).cbDescription = tmp_cbDescription; ensureNotNull(_entity.block).cbCompletionCriteria = tmp_cbCompletionCriteria; ensureNotNull(_entity.block).cbHideUntilDate = tmp_cbHideUntilDate; ensureNotNull(_entity.block).cbDeadlineDate = tmp_cbDeadlineDate; ensureNotNull(_entity.block).cbLateSubmissionPenalty = tmp_cbLateSubmissionPenalty; ensureNotNull(_entity.block).cbGracePeriodDate = tmp_cbGracePeriodDate; ensureNotNull(_entity.block).cbMaxPoints = tmp_cbMaxPoints; ensureNotNull(_entity.block).cbMinPoints = tmp_cbMinPoints; ensureNotNull(_entity.block).cbIndex = tmp_cbIndex; ensureNotNull(_entity.block).cbClazzUid = tmp_cbClazzUid; ensureNotNull(_entity.block).cbActive = tmp_cbActive; ensureNotNull(_entity.block).cbHidden = tmp_cbHidden; ensureNotNull(_entity.block).cbEntityUid = tmp_cbEntityUid; ensureNotNull(_entity.block).cbLct = tmp_cbLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidWithBlockAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithBlockAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithBlockAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithBlockAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithBlockAsync_s8cxhz$; Coroutine$findByUidWithBlockAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzAssignmentWithCourseBlock) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment\n | LEFT JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | WHERE caUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment\n | LEFT JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | WHERE caUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.findByUidWithBlockAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithBlockAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); var _entity = new ClazzAssignment(); _entity.caUid = tmp_caUid; _entity.caTitle = tmp_caTitle; _entity.caDescription = tmp_caDescription; _entity.caGroupUid = tmp_caGroupUid; _entity.caActive = tmp_caActive; _entity.caClassCommentEnabled = tmp_caClassCommentEnabled; _entity.caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; _entity.caCompletionCriteria = tmp_caCompletionCriteria; _entity.caRequireFileSubmission = tmp_caRequireFileSubmission; _entity.caFileType = tmp_caFileType; _entity.caSizeLimit = tmp_caSizeLimit; _entity.caNumberOfFiles = tmp_caNumberOfFiles; _entity.caSubmissionPolicy = tmp_caSubmissionPolicy; _entity.caMarkingType = tmp_caMarkingType; _entity.caRequireTextSubmission = tmp_caRequireTextSubmission; _entity.caTextLimitType = tmp_caTextLimitType; _entity.caTextLimit = tmp_caTextLimit; _entity.caXObjectUid = tmp_caXObjectUid; _entity.caClazzUid = tmp_caClazzUid; _entity.caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; _entity.caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; _entity.caLastChangedBy = tmp_caLastChangedBy; _entity.caLct = tmp_caLct; closure$_result.v = _entity; }return Unit; }; } function ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda$lambda(closure$_result)); return Unit; }; } ClazzAssignmentDao_JdbcKt.prototype.findClazzAssignment = function () { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzAssignment) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment LIMIT 1\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda(_result)); return _result.v; }; function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); var _entity = new ClazzAssignment(); _entity.caUid = tmp_caUid; _entity.caTitle = tmp_caTitle; _entity.caDescription = tmp_caDescription; _entity.caGroupUid = tmp_caGroupUid; _entity.caActive = tmp_caActive; _entity.caClassCommentEnabled = tmp_caClassCommentEnabled; _entity.caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; _entity.caCompletionCriteria = tmp_caCompletionCriteria; _entity.caRequireFileSubmission = tmp_caRequireFileSubmission; _entity.caFileType = tmp_caFileType; _entity.caSizeLimit = tmp_caSizeLimit; _entity.caNumberOfFiles = tmp_caNumberOfFiles; _entity.caSubmissionPolicy = tmp_caSubmissionPolicy; _entity.caMarkingType = tmp_caMarkingType; _entity.caRequireTextSubmission = tmp_caRequireTextSubmission; _entity.caTextLimitType = tmp_caTextLimitType; _entity.caTextLimit = tmp_caTextLimit; _entity.caXObjectUid = tmp_caXObjectUid; _entity.caClazzUid = tmp_caClazzUid; _entity.caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; _entity.caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; _entity.caLastChangedBy = tmp_caLastChangedBy; _entity.caLct = tmp_caLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzAssignment) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * \n | FROM ClazzAssignment \n | WHERE caUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * \n | FROM ClazzAssignment \n | WHERE caUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, _stmtConfig, ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ClazzAssignment'), ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; ClazzAssignmentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzAssignment_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_11($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_11.prototype.constructor = Coroutine$insertAsync_11; Coroutine$insertAsync_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignment_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_11(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzAssignment_.insertList_4ezy5m$(entityList); }; function ClazzAssignmentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.caTitle); _stmt.setString_vqvrqt$(2, _entity.caDescription); _stmt.setLong_6svq3l$(3, _entity.caGroupUid); _stmt.setBoolean_fzusl$(4, _entity.caActive); _stmt.setBoolean_fzusl$(5, _entity.caClassCommentEnabled); _stmt.setBoolean_fzusl$(6, _entity.caPrivateCommentsEnabled); _stmt.setInt_vux9f0$(7, _entity.caCompletionCriteria); _stmt.setBoolean_fzusl$(8, _entity.caRequireFileSubmission); _stmt.setInt_vux9f0$(9, _entity.caFileType); _stmt.setInt_vux9f0$(10, _entity.caSizeLimit); _stmt.setInt_vux9f0$(11, _entity.caNumberOfFiles); _stmt.setInt_vux9f0$(12, _entity.caSubmissionPolicy); _stmt.setInt_vux9f0$(13, _entity.caMarkingType); _stmt.setBoolean_fzusl$(14, _entity.caRequireTextSubmission); _stmt.setInt_vux9f0$(15, _entity.caTextLimitType); _stmt.setInt_vux9f0$(16, _entity.caTextLimit); _stmt.setLong_6svq3l$(17, _entity.caXObjectUid); _stmt.setLong_6svq3l$(18, _entity.caClazzUid); _stmt.setLong_6svq3l$(19, _entity.caLocalChangeSeqNum); _stmt.setLong_6svq3l$(20, _entity.caMasterChangeSeqNum); _stmt.setInt_vux9f0$(21, _entity.caLastChangedBy); _stmt.setLong_6svq3l$(22, _entity.caLct); _stmt.setLong_6svq3l$(23, _entity.caUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzAssignmentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzAssignmentDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzAssignmentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.caTitle); _stmt.setString_vqvrqt$(2, closure$entity.caDescription); _stmt.setLong_6svq3l$(3, closure$entity.caGroupUid); _stmt.setBoolean_fzusl$(4, closure$entity.caActive); _stmt.setBoolean_fzusl$(5, closure$entity.caClassCommentEnabled); _stmt.setBoolean_fzusl$(6, closure$entity.caPrivateCommentsEnabled); _stmt.setInt_vux9f0$(7, closure$entity.caCompletionCriteria); _stmt.setBoolean_fzusl$(8, closure$entity.caRequireFileSubmission); _stmt.setInt_vux9f0$(9, closure$entity.caFileType); _stmt.setInt_vux9f0$(10, closure$entity.caSizeLimit); _stmt.setInt_vux9f0$(11, closure$entity.caNumberOfFiles); _stmt.setInt_vux9f0$(12, closure$entity.caSubmissionPolicy); _stmt.setInt_vux9f0$(13, closure$entity.caMarkingType); _stmt.setBoolean_fzusl$(14, closure$entity.caRequireTextSubmission); _stmt.setInt_vux9f0$(15, closure$entity.caTextLimitType); _stmt.setInt_vux9f0$(16, closure$entity.caTextLimit); _stmt.setLong_6svq3l$(17, closure$entity.caXObjectUid); _stmt.setLong_6svq3l$(18, closure$entity.caClazzUid); _stmt.setLong_6svq3l$(19, closure$entity.caLocalChangeSeqNum); _stmt.setLong_6svq3l$(20, closure$entity.caMasterChangeSeqNum); _stmt.setInt_vux9f0$(21, closure$entity.caLastChangedBy); _stmt.setLong_6svq3l$(22, closure$entity.caLct); _stmt.setLong_6svq3l$(23, closure$entity.caUid); return _stmt.executeUpdate(); }; } ClazzAssignmentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzAssignmentDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_2($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_2.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_2; Coroutine$insertListAsync_4ezy5m$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignment_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_2(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.caTitle); this.local$_stmt.setString_vqvrqt$(2, _entity.caDescription); this.local$_stmt.setLong_6svq3l$(3, _entity.caGroupUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.caActive); this.local$_stmt.setBoolean_fzusl$(5, _entity.caClassCommentEnabled); this.local$_stmt.setBoolean_fzusl$(6, _entity.caPrivateCommentsEnabled); this.local$_stmt.setInt_vux9f0$(7, _entity.caCompletionCriteria); this.local$_stmt.setBoolean_fzusl$(8, _entity.caRequireFileSubmission); this.local$_stmt.setInt_vux9f0$(9, _entity.caFileType); this.local$_stmt.setInt_vux9f0$(10, _entity.caSizeLimit); this.local$_stmt.setInt_vux9f0$(11, _entity.caNumberOfFiles); this.local$_stmt.setInt_vux9f0$(12, _entity.caSubmissionPolicy); this.local$_stmt.setInt_vux9f0$(13, _entity.caMarkingType); this.local$_stmt.setBoolean_fzusl$(14, _entity.caRequireTextSubmission); this.local$_stmt.setInt_vux9f0$(15, _entity.caTextLimitType); this.local$_stmt.setInt_vux9f0$(16, _entity.caTextLimit); this.local$_stmt.setLong_6svq3l$(17, _entity.caXObjectUid); this.local$_stmt.setLong_6svq3l$(18, _entity.caClazzUid); this.local$_stmt.setLong_6svq3l$(19, _entity.caLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(20, _entity.caMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(21, _entity.caLastChangedBy); this.local$_stmt.setLong_6svq3l$(22, _entity.caLct); this.local$_stmt.setLong_6svq3l$(23, _entity.caUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_2($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_2.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_2; Coroutine$updateListAsync_4ezy5m$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_2(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzAssignment (caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING caUid'; } else tmp$ = ''; return "INSERT INTO ClazzAssignment (caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES(COALESCE(?,nextval('ClazzAssignment_caUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.caUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.caUid); } stmt.setString_vqvrqt$(2, entity.caTitle); stmt.setString_vqvrqt$(3, entity.caDescription); stmt.setLong_6svq3l$(4, entity.caGroupUid); stmt.setBoolean_fzusl$(5, entity.caActive); stmt.setBoolean_fzusl$(6, entity.caClassCommentEnabled); stmt.setBoolean_fzusl$(7, entity.caPrivateCommentsEnabled); stmt.setInt_vux9f0$(8, entity.caCompletionCriteria); stmt.setBoolean_fzusl$(9, entity.caRequireFileSubmission); stmt.setInt_vux9f0$(10, entity.caFileType); stmt.setInt_vux9f0$(11, entity.caSizeLimit); stmt.setInt_vux9f0$(12, entity.caNumberOfFiles); stmt.setInt_vux9f0$(13, entity.caSubmissionPolicy); stmt.setInt_vux9f0$(14, entity.caMarkingType); stmt.setBoolean_fzusl$(15, entity.caRequireTextSubmission); stmt.setInt_vux9f0$(16, entity.caTextLimitType); stmt.setInt_vux9f0$(17, entity.caTextLimit); stmt.setLong_6svq3l$(18, entity.caXObjectUid); stmt.setLong_6svq3l$(19, entity.caClazzUid); stmt.setLong_6svq3l$(20, entity.caLocalChangeSeqNum); stmt.setLong_6svq3l$(21, entity.caMasterChangeSeqNum); stmt.setInt_vux9f0$(22, entity.caLastChangedBy); stmt.setLong_6svq3l$(23, entity.caLct); }; ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzAssignmentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao_JdbcKt', interfaces: [ClazzAssignmentDao]}; function ClazzAssignmentDao_ReplicateWrapper(_db, _dao) { ClazzAssignmentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_15($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_15.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_15; Coroutine$replicateOnNewNode_s8cxhz$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_15(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_15($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_15.prototype.constructor = Coroutine$replicateOnChange_15; Coroutine$replicateOnChange_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_15(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getAllAssignmentsByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getAllAssignmentsByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; function Coroutine$updateActiveByUid_zaz62j$_3($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_3.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_3; Coroutine$updateActiveByUid_zaz62j$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_3(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getProgressSummaryForAssignment_jl0yiw$ = function (assignmentUid, clazzUid, group) { return this._dao_0.getProgressSummaryForAssignment_jl0yiw$(assignmentUid, clazzUid, group); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getSubmitterListForAssignment_gi085m$ = function (assignmentUid, clazzUid, group, searchText) { return this._dao_0.getSubmitterListForAssignment_gi085m$(assignmentUid, clazzUid, group, searchText); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getSubmitterUid_3pjtqy$ = function (assignmentUid, personUid, continuation) { return this._dao_0.getSubmitterUid_3pjtqy$(assignmentUid, personUid, continuation); }; function Coroutine$updateAsync_etrmwv$_0($this, clazzAssignment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignment = clazzAssignment_0; } Coroutine$updateAsync_etrmwv$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_etrmwv$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_etrmwv$_0.prototype.constructor = Coroutine$updateAsync_etrmwv$_0; Coroutine$updateAsync_etrmwv$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$clazzAssignment.caLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_etrmwv$(this.local$clazzAssignment, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateAsync_etrmwv$ = function (clazzAssignment_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_etrmwv$_0(this, clazzAssignment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getGroupUidFromAssignment_s8cxhz$ = function (uid, continuation) { return this._dao_0.getGroupUidFromAssignment_s8cxhz$(uid, continuation); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findByUidWithBlockAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithBlockAsync_s8cxhz$(uid, continuation); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findClazzAssignment = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_12($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_12.prototype.constructor = Coroutine$insertAsync_12; Coroutine$insertAsync_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.caUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(520, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.caUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.caLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.caUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_12(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_3($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_3.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_3; Coroutine$insertListAsync_4ezy5m$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.caUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(520, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.caUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.caLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_3(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_3($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_3.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_3; Coroutine$updateListAsync_4ezy5m$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.caLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_3(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao_ReplicateWrapper', interfaces: [ClazzAssignmentDao]}; function ClazzAssignmentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzAssignmentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_16($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_16.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_16; Coroutine$replicateOnNewNode_s8cxhz$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_16(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_16($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_16.prototype.constructor = Coroutine$replicateOnChange_16; Coroutine$replicateOnChange_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_16(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0; Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getAllAssignmentsByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.getAllAssignmentsByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_4($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_4.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_4; Coroutine$updateActiveByUid_zaz62j$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_4(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.prototype.getProgressSummaryForAssignment_jl0yiw$ = function (assignmentUid, clazzUid, group) { var _result = this._dao.getProgressSummaryForAssignment_jl0yiw$(assignmentUid, clazzUid, group); return _result; }; ClazzAssignmentDao_Repo.prototype.getSubmitterListForAssignment_gi085m$ = function (assignmentUid, clazzUid, group, searchText) { var _result = this._dao.getSubmitterListForAssignment_gi085m$(assignmentUid, clazzUid, group, searchText); return _result; }; function Coroutine$getSubmitterUid_3pjtqy$_0($this, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$getSubmitterUid_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSubmitterUid_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSubmitterUid_3pjtqy$_0.prototype.constructor = Coroutine$getSubmitterUid_3pjtqy$_0; Coroutine$getSubmitterUid_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getSubmitterUid_3pjtqy$(this.local$assignmentUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.getSubmitterUid_3pjtqy$ = function (assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$getSubmitterUid_3pjtqy$_0(this, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_etrmwv$_1($this, clazzAssignment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignment = clazzAssignment_0; } Coroutine$updateAsync_etrmwv$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_etrmwv$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_etrmwv$_1.prototype.constructor = Coroutine$updateAsync_etrmwv$_1; Coroutine$updateAsync_etrmwv$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_etrmwv$(this.local$clazzAssignment, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.updateAsync_etrmwv$ = function (clazzAssignment_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_etrmwv$_1(this, clazzAssignment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_2($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_2.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_2; Coroutine$findByUidAsync_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_2(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getGroupUidFromAssignment_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$getGroupUidFromAssignment_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getGroupUidFromAssignment_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getGroupUidFromAssignment_s8cxhz$_0.prototype.constructor = Coroutine$getGroupUidFromAssignment_s8cxhz$_0; Coroutine$getGroupUidFromAssignment_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getGroupUidFromAssignment_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.getGroupUidFromAssignment_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$getGroupUidFromAssignment_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithBlockAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithBlockAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithBlockAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithBlockAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidWithBlockAsync_s8cxhz$_0; Coroutine$findByUidWithBlockAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithBlockAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.findByUidWithBlockAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithBlockAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.prototype.findClazzAssignment = function () { var _result = this._dao.findClazzAssignment(); return _result; }; ClazzAssignmentDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; ClazzAssignmentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_13($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_13.prototype.constructor = Coroutine$insertAsync_13; Coroutine$insertAsync_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_13(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzAssignmentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzAssignmentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_4($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_4.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_4; Coroutine$insertListAsync_4ezy5m$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_4(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_4($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_4.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_4; Coroutine$updateListAsync_4ezy5m$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_4(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao_Repo', interfaces: [ClazzAssignmentDao]}; function ClazzAssignmentRollUpDao_JdbcKt(_db) { ClazzAssignmentRollUpDao.call(this); this._db = _db; this._insertAdapterClazzAssignmentRollUp_ = new ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral(this._db); } function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(closure$clazzUid_0, closure$assignmentUid_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(closure$clazzUid_0, closure$assignmentUid_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(closure$clazzUid_0, closure$assignmentUid_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$cacheBestStatements_b9bd0d$($this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$cacheBestStatements_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$cacheBestStatements_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$cacheBestStatements_b9bd0d$.prototype.constructor = Coroutine$cacheBestStatements_b9bd0d$; Coroutine$cacheBestStatements_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin("\n | \n | REPLACE INTO ClazzAssignmentRollUp \n | (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, \n | cacheStudentScore, cacheMaxScore, cacheWeight, cacheProgress,\n | cacheContentComplete, cacheSuccess,cachePenalty, cacheFinalWeightScoreWithPenalty, lastCsnChecked)\n | \n | WITH MaxScoreTable (maxScore, maxScoreContentEntryUid) \n | AS (SELECT MAX(resultScoreMax), statementContentEntryUid \n | FROM StatementEntity\n | WHERE contentEntryRoot \n | GROUP BY statementContentEntryUid) \n |\n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | COALESCE(cacjContentUid,0) AS cacheContentEntryUid, caUid AS cacheClazzAssignmentUid, \n | COALESCE(resultScoreRaw,0) AS cacheStudentScore, \n | \n | \n | COALESCE((SELECT maxScore \n | FROM MaxScoreTable \n | WHERE cacjContentUid = maxScoreContentEntryUid), 0) AS cacheMaxScore,\n | \n | COALESCE(cacjWeight, 0) AS cacheWeight,\n | \n | \n | COALESCE(StatementEntity.extensionProgress,0) AS cacheProgress,\n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(StatementEntity.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate\n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignmentContentJoin\n |\t JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n |\t\t\t\t\t \t \n |\t\t\t LEFT JOIN StatementEntity \n |\t ON statementUid = (SELECT statementUid \n | FROM StatementEntity \n | LEFT JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | WHERE StatementEntity.statementContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.contentEntryRoot \n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN StatementEntity.resultScoreScaled * (1 - (CAST(CourseBlock.cbLateSubmissionPenalty AS REAL)/100))\n | ELSE StatementEntity.resultScoreScaled END DESC, \n | StatementEntity.extensionProgress DESC, \n | StatementEntity.resultSuccess DESC LIMIT 1) \n | LEFT JOIN ClazzAssignmentRollUp\n | ON ClazzAssignmentRollUp.cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid \n | AND ClazzAssignmentRollUp.cachePersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzAssignmentRollUp.cacheClazzAssignmentUid = ClazzAssignment.caUid\n | \n | \n |\t WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | AND (COALESCE(StatementEntity.resultScoreRaw,0) >= COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0)\n | AND COALESCE(StatementEntity.extensionProgress,0) >= COALESCE(ClazzAssignmentRollUp.cacheProgress,0)\n | AND COALESCE(StatementEntity.resultSuccess,0) >= COALESCE(ClazzAssignmentRollUp.cacheSuccess,0))\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid\n | UNION \n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | 0 AS cacheContentEntryUid, \n | caUid AS cacheClazzAssignmentUid, \n | COALESCE(MarkingStatement.resultScoreRaw,0) AS cacheStudentScore, \n | COALESCE(cbMaxPoints,0) AS cacheMaxScore,\n | 0 AS cacheWeight,\n | \n | COALESCE(MarkingStatement.extensionProgress,0) AS cacheProgress,\n | COALESCE(MarkingStatement.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(MarkingStatement.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(CourseBlock.cbMaxPoints,0) * \n | 100 * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(cbMaxPoints,0) * \n | 100) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignment\n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | \n | LEFT JOIN StatementEntity AS SubmissionStatement\n |\t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1\n | )\n | LEFT JOIN XObjectEntity AS ObjectStatementRef\n | ON ObjectStatementRef.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | LEFT JOIN StatementEntity AS MarkingStatement\n | ON MarkingStatement.timestamp = (SELECT timestamp \n | FROM StatementEntity \n | WHERE xObjectUid = ObjectStatementRef.xObjectUid \n | ORDER BY timestamp DESC \n | LIMIT 1)\n | \n | WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignment.caRequireFileSubmission\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid \n | \n "), void 0, void 0, void 0, trimMargin("\n |INSERT INTO ClazzAssignmentRollUp \n | (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, \n | cacheStudentScore, cacheMaxScore, cacheWeight, cacheProgress,\n | cacheContentComplete, cacheSuccess,cachePenalty, cacheFinalWeightScoreWithPenalty, lastCsnChecked)\n | \n | WITH MaxScoreTable (maxScore, maxScoreContentEntryUid) \n | AS (SELECT MAX(resultScoreMax), statementContentEntryUid \n | FROM StatementEntity\n | WHERE contentEntryRoot \n | GROUP BY statementContentEntryUid) \n |\n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | COALESCE(cacjContentUid,0) AS cacheContentEntryUid, caUid AS cacheClazzAssignmentUid, \n | COALESCE(resultScoreRaw,0) AS cacheStudentScore, \n | \n | \n | COALESCE((SELECT maxScore \n | FROM MaxScoreTable \n | WHERE cacjContentUid = maxScoreContentEntryUid), 0) AS cacheMaxScore,\n | \n | COALESCE(cacjWeight, 0) AS cacheWeight,\n | \n | \n | COALESCE(StatementEntity.extensionProgress,0) AS cacheProgress,\n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(StatementEntity.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate\n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignmentContentJoin\n |\t JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n |\t\t\t\t\t \t \n |\t\t\t LEFT JOIN StatementEntity \n |\t ON statementUid = (SELECT statementUid \n | FROM StatementEntity \n | LEFT JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | WHERE StatementEntity.statementContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.contentEntryRoot \n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN StatementEntity.resultScoreScaled * (1 - (CAST(CourseBlock.cbLateSubmissionPenalty AS REAL)/100))\n | ELSE StatementEntity.resultScoreScaled END DESC, \n | StatementEntity.extensionProgress DESC, \n | StatementEntity.resultSuccess DESC LIMIT 1) \n | LEFT JOIN ClazzAssignmentRollUp\n | ON ClazzAssignmentRollUp.cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid \n | AND ClazzAssignmentRollUp.cachePersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzAssignmentRollUp.cacheClazzAssignmentUid = ClazzAssignment.caUid\n | \n | \n |\t WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | AND (COALESCE(StatementEntity.resultScoreRaw,0) >= COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0)\n | AND COALESCE(StatementEntity.extensionProgress,0) >= COALESCE(ClazzAssignmentRollUp.cacheProgress,0)\n | AND COALESCE(StatementEntity.resultSuccess,0) >= COALESCE(ClazzAssignmentRollUp.cacheSuccess,0))\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid\n | UNION \n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | 0 AS cacheContentEntryUid, \n | caUid AS cacheClazzAssignmentUid, \n | COALESCE(MarkingStatement.resultScoreRaw,0) AS cacheStudentScore, \n | COALESCE(cbMaxPoints,0) AS cacheMaxScore,\n | 0 AS cacheWeight,\n | \n | COALESCE(MarkingStatement.extensionProgress,0) AS cacheProgress,\n | COALESCE(MarkingStatement.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(MarkingStatement.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(CourseBlock.cbMaxPoints,0) * \n | 100 * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(cbMaxPoints,0) * \n | 100) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignment\n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | \n | LEFT JOIN StatementEntity AS SubmissionStatement\n |\t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1\n | )\n | LEFT JOIN XObjectEntity AS ObjectStatementRef\n | ON ObjectStatementRef.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | LEFT JOIN StatementEntity AS MarkingStatement\n | ON MarkingStatement.timestamp = (SELECT timestamp \n | FROM StatementEntity \n | WHERE xObjectUid = ObjectStatementRef.xObjectUid \n | ORDER BY timestamp DESC \n | LIMIT 1)\n | \n | WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignment.caRequireFileSubmission\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid \n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(this.local$clazzUid, this.local$assignmentUid, this.local$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.cacheBestStatements_b9bd0d$ = function (clazzUid_0, assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$cacheBestStatements_b9bd0d$(this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(closure$caUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$caUid = closure$caUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$caUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(closure$caUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(closure$caUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteCachedInactiveContent_s8cxhz$($this, caUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$caUid = caUid_0; } Coroutine$deleteCachedInactiveContent_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteCachedInactiveContent_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteCachedInactiveContent_s8cxhz$.prototype.constructor = Coroutine$deleteCachedInactiveContent_s8cxhz$; Coroutine$deleteCachedInactiveContent_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | DELETE\n | FROM ClazzAssignmentRollUp\n | WHERE cacheContentEntryUid \n | IN (SELECT cacjContentUid \n | FROM ClazzAssignmentContentJoin\n | WHERE NOT cacjActive)\n | OR (cacheClazzAssignmentUid \n | IN (SELECT caUid \n | FROM ClazzAssignment\n | WHERE caUid = ?\n | AND NOT caRequireFileSubmission) \n | AND cacheContentEntryUid = 0) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | DELETE\n | FROM ClazzAssignmentRollUp\n | WHERE cacheContentEntryUid \n | IN (SELECT cacjContentUid \n | FROM ClazzAssignmentContentJoin\n | WHERE NOT cacjActive)\n | OR (cacheClazzAssignmentUid \n | IN (SELECT caUid \n | FROM ClazzAssignment\n | WHERE caUid = ?\n | AND NOT caRequireFileSubmission) \n | AND cacheContentEntryUid = 0) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(this.local$caUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.deleteCachedInactiveContent_s8cxhz$ = function (caUid_0, continuation_0, suspended) { var instance = new Coroutine$deleteCachedInactiveContent_s8cxhz$(this, caUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(closure$changedAssignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$changedAssignmentUid = closure$changedAssignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$changedAssignmentUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(closure$changedAssignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(closure$changedAssignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$invalidateCacheByAssignment_s8cxhz$($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignment_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignment_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignment_s8cxhz$.prototype.constructor = Coroutine$invalidateCacheByAssignment_s8cxhz$; Coroutine$invalidateCacheByAssignment_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzAssignmentRollUp \n | SET lastCsnChecked = 0\n | WHERE cacheClazzAssignmentUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzAssignmentRollUp \n | SET lastCsnChecked = 0\n | WHERE cacheClazzAssignmentUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(this.local$changedAssignmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.invalidateCacheByAssignment_s8cxhz$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignment_s8cxhz$(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(this$ClazzAssignmentRollUpDao_JdbcKt_0, closure$changedAssignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentRollUpDao_JdbcKt = this$ClazzAssignmentRollUpDao_JdbcKt_0; this.local$closure$changedAssignmentUid = closure$changedAssignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ClazzAssignmentRollUpDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$changedAssignmentUid))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(this$ClazzAssignmentRollUpDao_JdbcKt_0, closure$changedAssignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(this$ClazzAssignmentRollUpDao_JdbcKt_0, closure$changedAssignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$invalidateCacheByAssignmentList_gox9k8$($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignmentList_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignmentList_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignmentList_gox9k8$.prototype.constructor = Coroutine$invalidateCacheByAssignmentList_gox9k8$; Coroutine$invalidateCacheByAssignmentList_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzAssignmentRollUp \n | SET lastCsnChecked = 0\n | WHERE cacheClazzAssignmentUid IN (?)\n | \n '), true, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzAssignmentRollUp \n | SET lastCsnChecked = 0\n | WHERE cacheClazzAssignmentUid IN (?)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(this.$this, this.local$changedAssignmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.invalidateCacheByAssignmentList_gox9k8$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignmentList_gox9k8$(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzAssignmentRollUp_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_14($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_14.prototype.constructor = Coroutine$insertAsync_14; Coroutine$insertAsync_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignmentRollUp_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_14(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzAssignmentRollUp_.insertList_4ezy5m$(entityList); }; function ClazzAssignmentRollUpDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cachePersonUid); _stmt.setLong_6svq3l$(2, _entity.cacheContentEntryUid); _stmt.setLong_6svq3l$(3, _entity.cacheClazzAssignmentUid); _stmt.setInt_vux9f0$(4, _entity.cacheStudentScore); _stmt.setInt_vux9f0$(5, _entity.cacheMaxScore); _stmt.setFloat_24o109$(6, _entity.cacheFinalWeightScoreWithPenalty); _stmt.setInt_vux9f0$(7, _entity.cacheWeight); _stmt.setInt_vux9f0$(8, _entity.cacheProgress); _stmt.setBoolean_fzusl$(9, _entity.cacheContentComplete); _stmt.setByte_6t1wet$(10, _entity.cacheSuccess); _stmt.setInt_vux9f0$(11, _entity.cachePenalty); _stmt.setLong_6svq3l$(12, _entity.lastCsnChecked); _stmt.setLong_6svq3l$(13, _entity.cacheUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzAssignmentRollUpDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzAssignmentRollUp SET cachePersonUid = ?, cacheContentEntryUid = ?, cacheClazzAssignmentUid = ?, cacheStudentScore = ?, cacheMaxScore = ?, cacheFinalWeightScoreWithPenalty = ?, cacheWeight = ?, cacheProgress = ?, cacheContentComplete = ?, cacheSuccess = ?, cachePenalty = ?, lastCsnChecked = ? WHERE cacheUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzAssignmentRollUpDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzAssignmentRollUpDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cachePersonUid); _stmt.setLong_6svq3l$(2, closure$entity.cacheContentEntryUid); _stmt.setLong_6svq3l$(3, closure$entity.cacheClazzAssignmentUid); _stmt.setInt_vux9f0$(4, closure$entity.cacheStudentScore); _stmt.setInt_vux9f0$(5, closure$entity.cacheMaxScore); _stmt.setFloat_24o109$(6, closure$entity.cacheFinalWeightScoreWithPenalty); _stmt.setInt_vux9f0$(7, closure$entity.cacheWeight); _stmt.setInt_vux9f0$(8, closure$entity.cacheProgress); _stmt.setBoolean_fzusl$(9, closure$entity.cacheContentComplete); _stmt.setByte_6t1wet$(10, closure$entity.cacheSuccess); _stmt.setInt_vux9f0$(11, closure$entity.cachePenalty); _stmt.setLong_6svq3l$(12, closure$entity.lastCsnChecked); _stmt.setLong_6svq3l$(13, closure$entity.cacheUid); return _stmt.executeUpdate(); }; } ClazzAssignmentRollUpDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzAssignmentRollUp SET cachePersonUid = ?, cacheContentEntryUid = ?, cacheClazzAssignmentUid = ?, cacheStudentScore = ?, cacheMaxScore = ?, cacheFinalWeightScoreWithPenalty = ?, cacheWeight = ?, cacheProgress = ?, cacheContentComplete = ?, cacheSuccess = ?, cachePenalty = ?, lastCsnChecked = ? WHERE cacheUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzAssignmentRollUpDao_JdbcKt$update$lambda(entity)); }; function ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzAssignmentRollUp (cacheUid, cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, cacheStudentScore, cacheMaxScore, cacheFinalWeightScoreWithPenalty, cacheWeight, cacheProgress, cacheContentComplete, cacheSuccess, cachePenalty, lastCsnChecked) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cacheUid'; } else tmp$ = ''; return "INSERT INTO ClazzAssignmentRollUp (cacheUid, cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, cacheStudentScore, cacheMaxScore, cacheFinalWeightScoreWithPenalty, cacheWeight, cacheProgress, cacheContentComplete, cacheSuccess, cachePenalty, lastCsnChecked) VALUES(COALESCE(?,nextval('ClazzAssignmentRollUp_cacheUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cacheUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cacheUid); } stmt.setLong_6svq3l$(2, entity.cachePersonUid); stmt.setLong_6svq3l$(3, entity.cacheContentEntryUid); stmt.setLong_6svq3l$(4, entity.cacheClazzAssignmentUid); stmt.setInt_vux9f0$(5, entity.cacheStudentScore); stmt.setInt_vux9f0$(6, entity.cacheMaxScore); stmt.setFloat_24o109$(7, entity.cacheFinalWeightScoreWithPenalty); stmt.setInt_vux9f0$(8, entity.cacheWeight); stmt.setInt_vux9f0$(9, entity.cacheProgress); stmt.setBoolean_fzusl$(10, entity.cacheContentComplete); stmt.setByte_6t1wet$(11, entity.cacheSuccess); stmt.setInt_vux9f0$(12, entity.cachePenalty); stmt.setLong_6svq3l$(13, entity.lastCsnChecked); }; ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzAssignmentRollUpDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentRollUpDao_JdbcKt', interfaces: [ClazzAssignmentRollUpDao]}; function ClazzAssignmentRollUpDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzAssignmentRollUpDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$cacheBestStatements_b9bd0d$_0($this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$cacheBestStatements_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$cacheBestStatements_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$cacheBestStatements_b9bd0d$_0.prototype.constructor = Coroutine$cacheBestStatements_b9bd0d$_0; Coroutine$cacheBestStatements_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.cacheBestStatements_b9bd0d$(this.local$clazzUid, this.local$assignmentUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.cacheBestStatements_b9bd0d$ = function (clazzUid_0, assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$cacheBestStatements_b9bd0d$_0(this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$deleteCachedInactiveContent_s8cxhz$_0($this, caUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$caUid = caUid_0; } Coroutine$deleteCachedInactiveContent_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteCachedInactiveContent_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteCachedInactiveContent_s8cxhz$_0.prototype.constructor = Coroutine$deleteCachedInactiveContent_s8cxhz$_0; Coroutine$deleteCachedInactiveContent_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.deleteCachedInactiveContent_s8cxhz$(this.local$caUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.deleteCachedInactiveContent_s8cxhz$ = function (caUid_0, continuation_0, suspended) { var instance = new Coroutine$deleteCachedInactiveContent_s8cxhz$_0(this, caUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$invalidateCacheByAssignment_s8cxhz$_0($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignment_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignment_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignment_s8cxhz$_0.prototype.constructor = Coroutine$invalidateCacheByAssignment_s8cxhz$_0; Coroutine$invalidateCacheByAssignment_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.invalidateCacheByAssignment_s8cxhz$(this.local$changedAssignmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.invalidateCacheByAssignment_s8cxhz$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignment_s8cxhz$_0(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$invalidateCacheByAssignmentList_gox9k8$_0($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.prototype.constructor = Coroutine$invalidateCacheByAssignmentList_gox9k8$_0; Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.invalidateCacheByAssignmentList_gox9k8$(this.local$changedAssignmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.invalidateCacheByAssignmentList_gox9k8$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignmentList_gox9k8$_0(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_15($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_15.prototype.constructor = Coroutine$insertAsync_15; Coroutine$insertAsync_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_15(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzAssignmentRollUpDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzAssignmentRollUpDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzAssignmentRollUpDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentRollUpDao_Repo', interfaces: [ClazzAssignmentRollUpDao]}; function ClazzContentJoinDao_JdbcKt(_db) { ClazzContentJoinDao.call(this); this._db = _db; this._insertAdapterClazzContentJoin_ = new ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral(this._db); } function Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_17($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_17.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_17; Coroutine$replicateOnNewNode_s8cxhz$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | ? AS ccjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzContentJoin \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid\n | WHERE UserSession.usClientNodeId = ? \n | AND UserSession.usStatus = 1 \n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = ?), 0) \n | /*psql ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | ? AS ccjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzContentJoin \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid\n | WHERE UserSession.usClientNodeId = ? \n | AND UserSession.usStatus = 1 \n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = ?), 0) \n | ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_17(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_17($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_17.prototype.constructor = Coroutine$replicateOnChange_17; Coroutine$replicateOnChange_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | UserSession.usClientNodeId AS ccjDestination\n | FROM ChangeLog\n | JOIN ClazzContentJoin\n | ON ChangeLog.chTableId = 134\n | AND ChangeLog.chEntityPk = ClazzContentJoin.ccjUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | UserSession.usClientNodeId AS ccjDestination\n | FROM ChangeLog\n | JOIN ClazzContentJoin\n | ON ChangeLog.chTableId = 134\n | AND ChangeLog.chEntityPk = ClazzContentJoin.ccjUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_17(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(closure$toggleVisibility_0, closure$changedTime_0, this$ClazzContentJoinDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$changedTime = closure$changedTime_0; this.local$this$ClazzContentJoinDao_JdbcKt = this$ClazzContentJoinDao_JdbcKt_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changedTime); this.local$_stmt.setArray_wqp8hw$(3, this.local$this$ClazzContentJoinDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(closure$toggleVisibility_0, closure$changedTime_0, this$ClazzContentJoinDao_JdbcKt_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(closure$toggleVisibility_0, closure$changedTime_0, this$ClazzContentJoinDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityClazzContent_cbj1f0$($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityClazzContent_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityClazzContent_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityClazzContent_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityClazzContent_cbj1f0$; Coroutine$toggleVisibilityClazzContent_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |UPDATE ClazzContentJoin \n | SET ccjActive = ?, \n | ccjLct = ? \n | WHERE ccjContentEntryUid IN (?)\n '), true, void 0, void 0, trimMargin('\n |UPDATE ClazzContentJoin \n | SET ccjActive = ?, \n | ccjLct = ? \n | WHERE ccjContentEntryUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(this.local$toggleVisibility, this.local$changedTime, this.$this, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.toggleVisibilityClazzContent_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityClazzContent_cbj1f0$(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$listOfEntriesInClazz_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$listOfEntriesInClazz_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$listOfEntriesInClazz_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$listOfEntriesInClazz_s8cxhz$.prototype.constructor = Coroutine$listOfEntriesInClazz_s8cxhz$; Coroutine$listOfEntriesInClazz_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ccjContentEntryUid \n | FROM ClazzContentJoin\n | WHERE ccjClazzUid = ?\n | AND ccjActive\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ccjContentEntryUid \n | FROM ClazzContentJoin\n | WHERE ccjClazzUid = ?\n | AND ccjActive\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.listOfEntriesInClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$listOfEntriesInClazz_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzContentJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_16($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_16.prototype.constructor = Coroutine$insertAsync_16; Coroutine$insertAsync_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzContentJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_16(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzContentJoin_.insertList_4ezy5m$(entityList); }; function ClazzContentJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ccjContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.ccjClazzUid); _stmt.setBoolean_fzusl$(3, _entity.ccjActive); _stmt.setLong_6svq3l$(4, _entity.ccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.ccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.ccjLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.ccjLct); _stmt.setLong_6svq3l$(8, _entity.ccjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzContentJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzContentJoin SET ccjContentEntryUid = ?, ccjClazzUid = ?, ccjActive = ?, ccjLocalChangeSeqNum = ?, ccjMasterChangeSeqNum = ?, ccjLastChangedBy = ?, ccjLct = ? WHERE ccjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzContentJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzContentJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ccjContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.ccjClazzUid); _stmt.setBoolean_fzusl$(3, closure$entity.ccjActive); _stmt.setLong_6svq3l$(4, closure$entity.ccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.ccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.ccjLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.ccjLct); _stmt.setLong_6svq3l$(8, closure$entity.ccjUid); return _stmt.executeUpdate(); }; } ClazzContentJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzContentJoin SET ccjContentEntryUid = ?, ccjClazzUid = ?, ccjActive = ?, ccjLocalChangeSeqNum = ?, ccjMasterChangeSeqNum = ?, ccjLastChangedBy = ?, ccjLct = ? WHERE ccjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzContentJoinDao_JdbcKt$update$lambda(entity)); }; function ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzContentJoin (ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING ccjUid'; } else tmp$ = ''; return "INSERT INTO ClazzContentJoin (ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES(COALESCE(?,nextval('ClazzContentJoin_ccjUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ccjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ccjUid); } stmt.setLong_6svq3l$(2, entity.ccjContentEntryUid); stmt.setLong_6svq3l$(3, entity.ccjClazzUid); stmt.setBoolean_fzusl$(4, entity.ccjActive); stmt.setLong_6svq3l$(5, entity.ccjLocalChangeSeqNum); stmt.setLong_6svq3l$(6, entity.ccjMasterChangeSeqNum); stmt.setInt_vux9f0$(7, entity.ccjLastChangedBy); stmt.setLong_6svq3l$(8, entity.ccjLct); }; ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzContentJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao_JdbcKt', interfaces: [ClazzContentJoinDao]}; function ClazzContentJoinDao_ReplicateWrapper(_db, _dao) { ClazzContentJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_18($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_18.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_18; Coroutine$replicateOnNewNode_s8cxhz$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_18(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_18($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_18.prototype.constructor = Coroutine$replicateOnChange_18; Coroutine$replicateOnChange_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_18(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$toggleVisibilityClazzContent_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityClazzContent_cbj1f0$_0; Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityClazzContent_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.toggleVisibilityClazzContent_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityClazzContent_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_ReplicateWrapper.prototype.listOfEntriesInClazz_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.listOfEntriesInClazz_s8cxhz$(clazzUid, continuation); }; ClazzContentJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_17($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_17.prototype.constructor = Coroutine$insertAsync_17; Coroutine$insertAsync_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ccjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(134, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ccjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ccjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ccjUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_17(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzContentJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzContentJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzContentJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao_ReplicateWrapper', interfaces: [ClazzContentJoinDao]}; function ClazzContentJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzContentJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_19($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_19.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_19; Coroutine$replicateOnNewNode_s8cxhz$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_19(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_19($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_19.prototype.constructor = Coroutine$replicateOnChange_19; Coroutine$replicateOnChange_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_19(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$toggleVisibilityClazzContent_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityClazzContent_cbj1f0$_1; Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityClazzContent_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.toggleVisibilityClazzContent_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityClazzContent_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$listOfEntriesInClazz_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$listOfEntriesInClazz_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$listOfEntriesInClazz_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$listOfEntriesInClazz_s8cxhz$_0.prototype.constructor = Coroutine$listOfEntriesInClazz_s8cxhz$_0; Coroutine$listOfEntriesInClazz_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.listOfEntriesInClazz_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.listOfEntriesInClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$listOfEntriesInClazz_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_18($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_18.prototype.constructor = Coroutine$insertAsync_18; Coroutine$insertAsync_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_18(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzContentJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzContentJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzContentJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao_Repo', interfaces: [ClazzContentJoinDao]}; function ClazzDao_JdbcKt(_db) { ClazzDao.call(this); this._db = _db; this._insertAdapterClazz_ = new ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral(this._db); } function Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_20($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_20.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_20; Coroutine$replicateOnNewNode_s8cxhz$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | ? AS clazzDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ? \n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = ?), 0) \n | /*psql ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | ? AS clazzDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ? \n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = ?), 0) \n | ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_20(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_20($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_20.prototype.constructor = Coroutine$replicateOnChange_20; Coroutine$replicateOnChange_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | UserSession.usClientNodeId AS clazzDestination\n | FROM ChangeLog\n | JOIN Clazz\n | ON ChangeLog.chTableId = 6\n | AND ChangeLog.chEntityPk = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | UserSession.usClientNodeId AS clazzDestination\n | FROM ChangeLog\n | JOIN Clazz\n | ON ChangeLog.chTableId = 6\n | AND ChangeLog.chEntityPk = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_20(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v = _entity; }return Unit; }; } function ClazzDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ClazzDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Clazz) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE clazzUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function ClazzDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda(this$ClazzDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Clazz) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From Clazz WHERE clazzUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * From Clazz WHERE clazzUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidLive$lambda(this$ClazzDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda(this$ClazzDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function ClazzDao_JdbcKt$findByClazzCode$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda; Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByClazzCode$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByClazzCode$lambda(closure$code_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByClazzCode_61zpoe$($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$code = code_0; } Coroutine$findByClazzCode_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzCode_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzCode_61zpoe$.prototype.constructor = Coroutine$findByClazzCode_61zpoe$; Coroutine$findByClazzCode_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Clazz) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzCode = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE clazzCode = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$findByClazzCode$lambda(this.local$code, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.findByClazzCode_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzCode_61zpoe$(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda; Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(closure$code_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByClazzCodeFromWeb_61zpoe$($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$code = code_0; } Coroutine$findByClazzCodeFromWeb_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzCodeFromWeb_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzCodeFromWeb_61zpoe$.prototype.constructor = Coroutine$findByClazzCodeFromWeb_61zpoe$; Coroutine$findByClazzCodeFromWeb_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Clazz) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzCode = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE clazzCode = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(this.local$code, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.findByClazzCodeFromWeb_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzCodeFromWeb_61zpoe$(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findAllLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllLive$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findAllLive$lambda(this$ClazzDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllLive$lambda; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE CAST(isClazzActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE CAST(isClazzActive AS INTEGER) = 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$findAllLive$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllLive$lambda(this$ClazzDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllLive$lambda(this$ClazzDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findAllLive = function () { var _result = new DoorLiveDataImpl(this._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findAllLive$lambda(this)); return _result; }; function ClazzDao_JdbcKt$findAll$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ClazzDao_JdbcKt$findAll$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findAll$lambda$lambda(closure$_result)); return Unit; }; } ClazzDao_JdbcKt.prototype.findAll = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE CAST(isClazzActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE CAST(isClazzActive AS INTEGER) = 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzDao_JdbcKt$findAll$lambda(_result)); return _result.v; }; function ClazzDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda; Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_3($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_3.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_3; Coroutine$findByUidAsync_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Clazz) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE clazzUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_3(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new ClazzWithHolidayCalendarAndSchoolAndTerminology(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; var _holidayCalendar_nullFieldCount = 0; var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }if (_holidayCalendar_nullFieldCount < 8) { if (_entity.holidayCalendar == null) { _entity.holidayCalendar = new HolidayCalendar(); }ensureNotNull(_entity.holidayCalendar).umCalendarUid = tmp_umCalendarUid; ensureNotNull(_entity.holidayCalendar).umCalendarName = tmp_umCalendarName; ensureNotNull(_entity.holidayCalendar).umCalendarCategory = tmp_umCalendarCategory; ensureNotNull(_entity.holidayCalendar).umCalendarActive = tmp_umCalendarActive; ensureNotNull(_entity.holidayCalendar).umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; ensureNotNull(_entity.holidayCalendar).umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; ensureNotNull(_entity.holidayCalendar).umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; ensureNotNull(_entity.holidayCalendar).umCalendarLct = tmp_umCalendarLct; }var _school_nullFieldCount = 0; var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }if (_school_nullFieldCount < 21) { if (_entity.school == null) { _entity.school = new School(); }ensureNotNull(_entity.school).schoolUid = tmp_schoolUid; ensureNotNull(_entity.school).schoolName = tmp_schoolName; ensureNotNull(_entity.school).schoolDesc = tmp_schoolDesc; ensureNotNull(_entity.school).schoolAddress = tmp_schoolAddress; ensureNotNull(_entity.school).schoolActive = tmp_schoolActive; ensureNotNull(_entity.school).schoolPhoneNumber = tmp_schoolPhoneNumber; ensureNotNull(_entity.school).schoolGender = tmp_schoolGender; ensureNotNull(_entity.school).schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; ensureNotNull(_entity.school).schoolFeatures = tmp_schoolFeatures; ensureNotNull(_entity.school).schoolLocationLong = tmp_schoolLocationLong; ensureNotNull(_entity.school).schoolLocationLatt = tmp_schoolLocationLatt; ensureNotNull(_entity.school).schoolEmailAddress = tmp_schoolEmailAddress; ensureNotNull(_entity.school).schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; ensureNotNull(_entity.school).schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; ensureNotNull(_entity.school).schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; ensureNotNull(_entity.school).schoolCode = tmp_schoolCode; ensureNotNull(_entity.school).schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; ensureNotNull(_entity.school).schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; ensureNotNull(_entity.school).schoolLastChangedBy = tmp_schoolLastChangedBy; ensureNotNull(_entity.school).schoolLct = tmp_schoolLct; ensureNotNull(_entity.school).schoolTimeZone = tmp_schoolTimeZone; }var _terminology_nullFieldCount = 0; var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }if (_terminology_nullFieldCount < 4) { if (_entity.terminology == null) { _entity.terminology = new CourseTerminology(); }ensureNotNull(_entity.terminology).ctUid = tmp_ctUid; ensureNotNull(_entity.terminology).ctTitle = tmp_ctTitle; ensureNotNull(_entity.terminology).ctTerminology = tmp_ctTerminology; ensureNotNull(_entity.terminology).ctLct = tmp_ctLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda; Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzWithHolidayCalendarAndSchoolAndTerminology) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | CourseTerminology.*\n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON Clazz.clazzHolidayUMCalendarUid = HolidayCalendar.umCalendarUid\n | \n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | \n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | WHERE Clazz.clazzUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | CourseTerminology.*\n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON Clazz.clazzHolidayUMCalendarUid = HolidayCalendar.umCalendarUid\n | \n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | \n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | WHERE Clazz.clazzUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.clazzName); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.clazzDesc); this.local$_stmt.setFloat_24o109$(3, this.local$closure$entity.attendanceAverage); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.clazzHolidayUMCalendarUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.clazzScheuleUMCalendarUid); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.isClazzActive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.clazzLocationUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.clazzStartTime); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.clazzEndTime); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.clazzFeatures); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.clazzSchoolUid); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$entity.clazzEnrolmentPolicy); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.clazzTerminologyUid); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.clazzMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$entity.clazzLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(16, this.local$closure$entity.clazzLastChangedBy); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.clazzLct); this.local$_stmt.setString_vqvrqt$(18, this.local$closure$entity.clazzTimeZone); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.clazzStudentsPersonGroupUid); this.local$_stmt.setLong_6svq3l$(20, this.local$closure$entity.clazzTeachersPersonGroupUid); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.clazzPendingStudentsPersonGroupUid); this.local$_stmt.setLong_6svq3l$(22, this.local$closure$entity.clazzParentsPersonGroupUid); this.local$_stmt.setString_vqvrqt$(23, this.local$closure$entity.clazzCode); this.local$_stmt.setLong_6svq3l$(24, this.local$closure$entity.clazzUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_yczdf2$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_yczdf2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_yczdf2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_yczdf2$.prototype.constructor = Coroutine$updateAsync_yczdf2$; Coroutine$updateAsync_yczdf2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Clazz SET clazzName = ?, clazzDesc = ?, attendanceAverage = ?, clazzHolidayUMCalendarUid = ?, clazzScheuleUMCalendarUid = ?, isClazzActive = ?, clazzLocationUid = ?, clazzStartTime = ?, clazzEndTime = ?, clazzFeatures = ?, clazzSchoolUid = ?, clazzEnrolmentPolicy = ?, clazzTerminologyUid = ?, clazzMasterChangeSeqNum = ?, clazzLocalChangeSeqNum = ?, clazzLastChangedBy = ?, clazzLct = ?, clazzTimeZone = ?, clazzStudentsPersonGroupUid = ?, clazzTeachersPersonGroupUid = ?, clazzPendingStudentsPersonGroupUid = ?, clazzParentsPersonGroupUid = ?, clazzCode = ? WHERE clazzUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.updateAsync_yczdf2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_yczdf2$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findAllClazzesBySchool$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(closure$schoolUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllClazzesBySchool$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(closure$schoolUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(closure$schoolUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllClazzesBySchool_s8cxhz$($this, schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$schoolUid = schoolUid_0; } Coroutine$findAllClazzesBySchool_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllClazzesBySchool_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllClazzesBySchool_s8cxhz$.prototype.constructor = Coroutine$findAllClazzesBySchool_s8cxhz$; Coroutine$findAllClazzesBySchool_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(this.local$schoolUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.findAllClazzesBySchool_s8cxhz$ = function (schoolUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllClazzesBySchool_s8cxhz$(this, schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral(this$ClazzDao_JdbcKt, closure$schoolUid) { this.this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt; this.closure$schoolUid = closure$schoolUid; DoorDataSourceFactory.call(this); } function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(closure$schoolUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(closure$schoolUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(closure$schoolUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM (SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ) LIMIT ? OFFSET ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$schoolUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this.this$ClazzDao_JdbcKt, this.closure$schoolUid, _limit, _offset)); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(closure$schoolUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(closure$schoolUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(closure$schoolUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ) ', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$schoolUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this.this$ClazzDao_JdbcKt, this.closure$schoolUid)); }; ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzDao_JdbcKt.prototype.findAllClazzesBySchoolLive_s8cxhz$ = function (schoolUid) { var _result = new ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral(this, schoolUid); return _result; }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral(this$ClazzDao_JdbcKt, closure$currentTime, closure$permission, closure$accountPersonUid, closure$searchQuery, closure$excludeSelectedClazzList, closure$excludeSchoolUid, closure$filter, closure$selectedSchool, closure$sortOrder) { this.this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt; this.closure$currentTime = closure$currentTime; this.closure$permission = closure$permission; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$searchQuery = closure$searchQuery; this.closure$excludeSelectedClazzList = closure$excludeSelectedClazzList; this.closure$excludeSchoolUid = closure$excludeSchoolUid; this.closure$filter = closure$filter; this.closure$selectedSchool = closure$selectedSchool; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_numStudents = _resultSet.getInt_61zpoe$('numStudents'); var tmp_numTeachers = _resultSet.getInt_61zpoe$('numTeachers'); var tmp_teacherNames = _resultSet.getString_61zpoe$('teacherNames'); var tmp_lastRecorded = _resultSet.getLong_61zpoe$('lastRecorded'); var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new ClazzWithListDisplayDetails(); _entity.numStudents = tmp_numStudents; _entity.numTeachers = tmp_numTeachers; _entity.teacherNames = tmp_teacherNames; _entity.lastRecorded = tmp_lastRecorded; _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; var _clazzActiveEnrolment_nullFieldCount = 0; var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); if (_resultSet.wasNull()) { _clazzActiveEnrolment_nullFieldCount = _clazzActiveEnrolment_nullFieldCount + 1 | 0; }if (_clazzActiveEnrolment_nullFieldCount < 14) { if (_entity.clazzActiveEnrolment == null) { _entity.clazzActiveEnrolment = new ClazzEnrolment(); }ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentUid = tmp_clazzEnrolmentUid; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentRole = tmp_clazzEnrolmentRole; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentActive = tmp_clazzEnrolmentActive; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; ensureNotNull(_entity.clazzActiveEnrolment).clazzEnrolmentLct = tmp_clazzEnrolmentLct; }var _terminology_nullFieldCount = 0; var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }if (_terminology_nullFieldCount < 4) { if (_entity.terminology == null) { _entity.terminology = new CourseTerminology(); }ensureNotNull(_entity.terminology).ctUid = tmp_ctUid; ensureNotNull(_entity.terminology).ctTitle = tmp_ctTitle; ensureNotNull(_entity.terminology).ctTerminology = tmp_ctTerminology; ensureNotNull(_entity.terminology).ctLct = tmp_ctLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, this$ClazzDao_JdbcKt_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$accountPersonUid); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchQuery); this.local$_stmt.setArray_wqp8hw$(7, this.local$this$ClazzDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelectedClazzList))); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$excludeSchoolUid); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$filter); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$selectedSchool); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$selectedSchool); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(21, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(22, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, this$ClazzDao_JdbcKt_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, this$ClazzDao_JdbcKt_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Clazz.*, ClazzEnrolment.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | '' AS teacherNames,\n | 0 AS lastRecorded,\n | CourseTerminology.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | LEFT JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentUid =\n | COALESCE(\n | (SELECT ClazzEnrolment.clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid LIMIT 1), 0)\n | LEFT JOIN CourseTerminology \n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid \n |\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(Clazz.isClazzActive AS INTEGER) = 1\n | AND Clazz.clazzName like ?\n | AND (Clazz.clazzUid NOT IN (?))\n | AND ( ? = 0 OR Clazz.clazzUid NOT IN (SELECT cl.clazzUid FROM Clazz AS cl WHERE cl.clazzSchoolUid = ?) ) \n | AND ( ? = 0 OR Clazz.clazzSchoolUid = 0 )\n | AND ( ? = 0 OR (CASE WHEN ? = 5 \n | THEN ? BETWEEN Clazz.clazzStartTime AND Clazz.clazzEndTime\n | ELSE ? > Clazz.clazzEndTime \n | END))\n | AND ( ? = 0 OR Clazz.clazzSchoolUid = ?)\n | GROUP BY Clazz.clazzUid, ClazzEnrolment.clazzEnrolmentUid, CourseTerminology.ctUid\n | ORDER BY CASE ?\n | WHEN 3 THEN Clazz.attendanceAverage\n | ELSE 0\n | END ASC,\n | CASE ?\n | WHEN 1 THEN Clazz.clazzName\n | ELSE ''\n | END ASC,\n | CASE ?\n | WHEN 4 THEN Clazz.attendanceAverage\n | ELSE 0\n | END DESC,\n | CASE ?\n | WHEN 2 THEN clazz.Clazzname\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), true, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT Clazz.*, ClazzEnrolment.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | '' AS teacherNames,\n | 0 AS lastRecorded,\n | CourseTerminology.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | LEFT JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentUid =\n | COALESCE(\n | (SELECT ClazzEnrolment.clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid LIMIT 1), 0)\n | LEFT JOIN CourseTerminology \n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid \n |\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(Clazz.isClazzActive AS INTEGER) = 1\n | AND Clazz.clazzName like ?\n | AND (Clazz.clazzUid NOT IN (?))\n | AND ( ? = 0 OR Clazz.clazzUid NOT IN (SELECT cl.clazzUid FROM Clazz AS cl WHERE cl.clazzSchoolUid = ?) ) \n | AND ( ? = 0 OR Clazz.clazzSchoolUid = 0 )\n | AND ( ? = 0 OR (CASE WHEN ? = 5 \n | THEN ? BETWEEN Clazz.clazzStartTime AND Clazz.clazzEndTime\n | ELSE ? > Clazz.clazzEndTime \n | END))\n | AND ( ? = 0 OR Clazz.clazzSchoolUid = ?)\n | GROUP BY Clazz.clazzUid, ClazzEnrolment.clazzEnrolmentUid, CourseTerminology.ctUid\n | ORDER BY CASE ?\n | WHEN 3 THEN Clazz.attendanceAverage\n | ELSE 0\n | END ASC,\n | CASE ?\n | WHEN 1 THEN Clazz.clazzName\n | ELSE ''\n | END ASC,\n | CASE ?\n | WHEN 4 THEN Clazz.attendanceAverage\n | ELSE 0\n | END DESC,\n | CASE ?\n | WHEN 2 THEN clazz.Clazzname\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(this.local$closure$currentTime, this.local$closure$permission, this.local$closure$accountPersonUid, this.local$closure$searchQuery, this.local$this$ClazzDao_JdbcKt, this.local$closure$excludeSelectedClazzList, this.local$closure$excludeSchoolUid, this.local$closure$filter, this.local$closure$selectedSchool, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf(['Clazz', 'ClazzEnrolment', 'ScopedGrant', 'PersonGroupMember', 'CourseTerminology']), ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this.this$ClazzDao_JdbcKt, this.closure$currentTime, this.closure$permission, this.closure$accountPersonUid, this.closure$searchQuery, this.closure$excludeSelectedClazzList, this.closure$excludeSchoolUid, this.closure$filter, this.closure$selectedSchool, this.closure$sortOrder, _limit, _offset)); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, this$ClazzDao_JdbcKt_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$accountPersonUid); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchQuery); this.local$_stmt.setArray_wqp8hw$(7, this.local$this$ClazzDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelectedClazzList))); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$excludeSchoolUid); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$filter); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$selectedSchool); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$selectedSchool); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, this$ClazzDao_JdbcKt_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, this$ClazzDao_JdbcKt_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Clazz.*, ClazzEnrolment.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | '' AS teacherNames,\n | 0 AS lastRecorded,\n | CourseTerminology.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | LEFT JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentUid =\n | COALESCE(\n | (SELECT ClazzEnrolment.clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid LIMIT 1), 0)\n | LEFT JOIN CourseTerminology \n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid \n |\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(Clazz.isClazzActive AS INTEGER) = 1\n | AND Clazz.clazzName like ?\n | AND (Clazz.clazzUid NOT IN (?))\n | AND ( ? = 0 OR Clazz.clazzUid NOT IN (SELECT cl.clazzUid FROM Clazz AS cl WHERE cl.clazzSchoolUid = ?) ) \n | AND ( ? = 0 OR Clazz.clazzSchoolUid = 0 )\n | AND ( ? = 0 OR (CASE WHEN ? = 5 \n | THEN ? BETWEEN Clazz.clazzStartTime AND Clazz.clazzEndTime\n | ELSE ? > Clazz.clazzEndTime \n | END))\n | AND ( ? = 0 OR Clazz.clazzSchoolUid = ?)\n | GROUP BY Clazz.clazzUid, ClazzEnrolment.clazzEnrolmentUid, CourseTerminology.ctUid\n | ORDER BY CASE ?\n | WHEN 3 THEN Clazz.attendanceAverage\n | ELSE 0\n | END ASC,\n | CASE ?\n | WHEN 1 THEN Clazz.clazzName\n | ELSE ''\n | END ASC,\n | CASE ?\n | WHEN 4 THEN Clazz.attendanceAverage\n | ELSE 0\n | END DESC,\n | CASE ?\n | WHEN 2 THEN clazz.Clazzname\n | ELSE ''\n | END DESC\n | ) \n "), true, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Clazz.*, ClazzEnrolment.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | '' AS teacherNames,\n | 0 AS lastRecorded,\n | CourseTerminology.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | LEFT JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentUid =\n | COALESCE(\n | (SELECT ClazzEnrolment.clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid LIMIT 1), 0)\n | LEFT JOIN CourseTerminology \n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid \n |\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(Clazz.isClazzActive AS INTEGER) = 1\n | AND Clazz.clazzName like ?\n | AND (Clazz.clazzUid NOT IN (?))\n | AND ( ? = 0 OR Clazz.clazzUid NOT IN (SELECT cl.clazzUid FROM Clazz AS cl WHERE cl.clazzSchoolUid = ?) ) \n | AND ( ? = 0 OR Clazz.clazzSchoolUid = 0 )\n | AND ( ? = 0 OR (CASE WHEN ? = 5 \n | THEN ? BETWEEN Clazz.clazzStartTime AND Clazz.clazzEndTime\n | ELSE ? > Clazz.clazzEndTime \n | END))\n | AND ( ? = 0 OR Clazz.clazzSchoolUid = ?)\n | GROUP BY Clazz.clazzUid, ClazzEnrolment.clazzEnrolmentUid, CourseTerminology.ctUid\n | ORDER BY CASE ?\n | WHEN 3 THEN Clazz.attendanceAverage\n | ELSE 0\n | END ASC,\n | CASE ?\n | WHEN 1 THEN Clazz.clazzName\n | ELSE ''\n | END ASC,\n | CASE ?\n | WHEN 4 THEN Clazz.attendanceAverage\n | ELSE 0\n | END DESC,\n | CASE ?\n | WHEN 2 THEN clazz.Clazzname\n | ELSE ''\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(this.local$closure$currentTime, this.local$closure$permission, this.local$closure$accountPersonUid, this.local$closure$searchQuery, this.local$this$ClazzDao_JdbcKt, this.local$closure$excludeSelectedClazzList, this.local$closure$excludeSchoolUid, this.local$closure$filter, this.local$closure$selectedSchool, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf(['Clazz', 'ClazzEnrolment', 'ScopedGrant', 'PersonGroupMember', 'CourseTerminology']), ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this.this$ClazzDao_JdbcKt, this.closure$currentTime, this.closure$permission, this.closure$accountPersonUid, this.closure$searchQuery, this.closure$excludeSelectedClazzList, this.closure$excludeSchoolUid, this.closure$filter, this.closure$selectedSchool, this.closure$sortOrder)); }; ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzDao_JdbcKt.prototype.findClazzesWithPermission_dchjmd$ = function (searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool) { var _result = new ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral(this, currentTime, permission, accountPersonUid, searchQuery, excludeSelectedClazzList, excludeSchoolUid, filter, selectedSchool, sortOrder); return _result; }; function ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_uid = _resultSet.getLong_61zpoe$('uid'); var tmp_labelName = _resultSet.getString_61zpoe$('labelName'); var _entity = new UidAndLabel(); _entity.uid = tmp_uid; _entity.labelName = tmp_labelName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(this$ClazzDao_JdbcKt_0, closure$ids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$ids = closure$ids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda; Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ClazzDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$ids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(this$ClazzDao_JdbcKt_0, closure$ids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(this$ClazzDao_JdbcKt_0, closure$ids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getClassNamesFromListOfIds_gox9k8$($this, ids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$ids = ids_0; } Coroutine$getClassNamesFromListOfIds_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getClassNamesFromListOfIds_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getClassNamesFromListOfIds_gox9k8$.prototype.constructor = Coroutine$getClassNamesFromListOfIds_gox9k8$; Coroutine$getClassNamesFromListOfIds_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT Clazz.clazzUid AS uid, Clazz.clazzName AS labelName From Clazz WHERE clazzUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT Clazz.clazzUid AS uid, Clazz.clazzName AS labelName From Clazz WHERE clazzUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(this.$this, this.local$ids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.getClassNamesFromListOfIds_gox9k8$ = function (ids_0, continuation_0, suspended) { var instance = new Coroutine$getClassNamesFromListOfIds_gox9k8$(this, ids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findByClazzName$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new Clazz(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ClazzDao_JdbcKt$findByClazzName$lambda(closure$name, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$name); useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findByClazzName$lambda$lambda(closure$_result)); return Unit; }; } ClazzDao_JdbcKt.prototype.findByClazzName_61zpoe$ = function (name) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzName = ? and CAST(isClazzActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Clazz WHERE clazzName = ? and CAST(isClazzActive AS INTEGER) = 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzDao_JdbcKt$findByClazzName$lambda(name, _result)); return _result.v; }; function Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(closure$clazzUid_0, closure$timeChanged_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$timeChanged = closure$timeChanged_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda; Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$timeChanged); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(closure$clazzUid_0, closure$timeChanged_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(closure$clazzUid_0, closure$timeChanged_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$($this, clazzUid_0, timeChanged_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$timeChanged = timeChanged_0; } Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.prototype.constructor = Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Clazz \n | SET attendanceAverage = \n | COALESCE(CAST(\n | (SELECT SUM(clazzLogNumPresent) \n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLogStatusFlag = 4) AS REAL) /\n | \n | CAST(MAX(1.0, \n | (SELECT SUM(clazzLogNumPresent) + SUM(clazzLogNumPartial) + SUM(clazzLogNumAbsent)\n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ? \n | AND clazzLogStatusFlag = 4)) AS REAL), 0),\n | clazzLct = ? \n | WHERE clazzUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Clazz \n | SET attendanceAverage = \n | COALESCE(CAST(\n | (SELECT SUM(clazzLogNumPresent) \n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLogStatusFlag = 4) AS REAL) /\n | \n | CAST(GREATEST(1.0, \n | (SELECT SUM(clazzLogNumPresent) + SUM(clazzLogNumPartial) + SUM(clazzLogNumAbsent)\n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ? \n | AND clazzLogStatusFlag = 4)) AS REAL), 0),\n | clazzLct = ? \n | WHERE clazzUid = ?\n | \n ')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(this.local$clazzUid, this.local$timeChanged), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.updateClazzAttendanceAverageAsync_3pjtqy$ = function (clazzUid_0, timeChanged_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$(this, clazzUid_0, timeChanged_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(closure$permission_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda; Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(closure$permission_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(closure$permission_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$personHasPermissionWithClazz_b9bd0d$($this, accountPersonUid_0, clazzUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$clazzUid = clazzUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithClazz_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithClazz_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithClazz_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionWithClazz_b9bd0d$; Coroutine$personHasPermissionWithClazz_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(this.local$permission, this.local$clazzUid, this.local$accountPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.personHasPermissionWithClazz_b9bd0d$ = function (accountPersonUid_0, clazzUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithClazz_b9bd0d$(this, accountPersonUid_0, clazzUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$selectDelegatablePermissions$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda; Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$selectDelegatablePermissions$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$selectDelegatablePermissions_3pjtqy$($this, accountPersonUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$selectDelegatablePermissions_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$selectDelegatablePermissions_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$selectDelegatablePermissions_3pjtqy$.prototype.constructor = Coroutine$selectDelegatablePermissions_3pjtqy$; Coroutine$selectDelegatablePermissions_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.sgPermissions\n | FROM Clazz\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | WHERE Clazz.clazzUid = ?\n | AND (ScopedGrant.sgPermissions & 4294967296) > 0\n | AND PrsGrpMbr.groupMemberPersonUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ScopedGrant.sgPermissions\n | FROM Clazz\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | WHERE Clazz.clazzUid = ?\n | AND (ScopedGrant.sgPermissions & 4294967296) > 0\n | AND PrsGrpMbr.groupMemberPersonUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(this.local$clazzUid, this.local$accountPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.selectDelegatablePermissions_3pjtqy$ = function (accountPersonUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$selectDelegatablePermissions_3pjtqy$(this, accountPersonUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_numStudents = _resultSet.getInt_61zpoe$('numStudents'); var tmp_numTeachers = _resultSet.getInt_61zpoe$('numTeachers'); var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new ClazzWithDisplayDetails(); _entity.numStudents = tmp_numStudents; _entity.numTeachers = tmp_numTeachers; _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; var _clazzHolidayCalendar_nullFieldCount = 0; var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); if (_resultSet.wasNull()) { _clazzHolidayCalendar_nullFieldCount = _clazzHolidayCalendar_nullFieldCount + 1 | 0; }if (_clazzHolidayCalendar_nullFieldCount < 8) { if (_entity.clazzHolidayCalendar == null) { _entity.clazzHolidayCalendar = new HolidayCalendar(); }ensureNotNull(_entity.clazzHolidayCalendar).umCalendarUid = tmp_umCalendarUid; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarName = tmp_umCalendarName; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarCategory = tmp_umCalendarCategory; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarActive = tmp_umCalendarActive; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; ensureNotNull(_entity.clazzHolidayCalendar).umCalendarLct = tmp_umCalendarLct; }var _clazzSchool_nullFieldCount = 0; var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); if (_resultSet.wasNull()) { _clazzSchool_nullFieldCount = _clazzSchool_nullFieldCount + 1 | 0; }if (_clazzSchool_nullFieldCount < 21) { if (_entity.clazzSchool == null) { _entity.clazzSchool = new School(); }ensureNotNull(_entity.clazzSchool).schoolUid = tmp_schoolUid; ensureNotNull(_entity.clazzSchool).schoolName = tmp_schoolName; ensureNotNull(_entity.clazzSchool).schoolDesc = tmp_schoolDesc; ensureNotNull(_entity.clazzSchool).schoolAddress = tmp_schoolAddress; ensureNotNull(_entity.clazzSchool).schoolActive = tmp_schoolActive; ensureNotNull(_entity.clazzSchool).schoolPhoneNumber = tmp_schoolPhoneNumber; ensureNotNull(_entity.clazzSchool).schoolGender = tmp_schoolGender; ensureNotNull(_entity.clazzSchool).schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; ensureNotNull(_entity.clazzSchool).schoolFeatures = tmp_schoolFeatures; ensureNotNull(_entity.clazzSchool).schoolLocationLong = tmp_schoolLocationLong; ensureNotNull(_entity.clazzSchool).schoolLocationLatt = tmp_schoolLocationLatt; ensureNotNull(_entity.clazzSchool).schoolEmailAddress = tmp_schoolEmailAddress; ensureNotNull(_entity.clazzSchool).schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; ensureNotNull(_entity.clazzSchool).schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; ensureNotNull(_entity.clazzSchool).schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; ensureNotNull(_entity.clazzSchool).schoolCode = tmp_schoolCode; ensureNotNull(_entity.clazzSchool).schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; ensureNotNull(_entity.clazzSchool).schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; ensureNotNull(_entity.clazzSchool).schoolLastChangedBy = tmp_schoolLastChangedBy; ensureNotNull(_entity.clazzSchool).schoolLct = tmp_schoolLct; ensureNotNull(_entity.clazzSchool).schoolTimeZone = tmp_schoolTimeZone; }var _terminology_nullFieldCount = 0; var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }if (_terminology_nullFieldCount < 4) { if (_entity.terminology == null) { _entity.terminology = new CourseTerminology(); }ensureNotNull(_entity.terminology).ctUid = tmp_ctUid; ensureNotNull(_entity.terminology).ctTitle = tmp_ctTitle; ensureNotNull(_entity.terminology).ctTerminology = tmp_ctTerminology; ensureNotNull(_entity.terminology).ctLct = tmp_ctLct; }closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(closure$currentTime_0, closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(closure$currentTime_0, closure$clazzUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(closure$currentTime_0, closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_liveResult = void 0; } Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzWithDisplayDetails) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | CourseTerminology.* \n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON Clazz.clazzHolidayUMCalendarUid = HolidayCalendar.umCalendarUid\n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | WHERE Clazz.clazzUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | CourseTerminology.* \n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON Clazz.clazzHolidayUMCalendarUid = HolidayCalendar.umCalendarUid\n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | WHERE Clazz.clazzUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, _stmtConfig, ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(this.local$closure$currentTime, this.local$closure$clazzUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.getClazzWithDisplayDetails_3pjtqy$ = function (clazzUid, currentTime) { var _result = new DoorLiveDataImpl(this._db, listOf(['ClazzEnrolment', 'Clazz', 'HolidayCalendar', 'School', 'CourseTerminology']), ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this, currentTime, clazzUid)); return _result; }; function ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new ClazzWithHolidayCalendarAndSchoolAndTerminology(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; var _holidayCalendar_nullFieldCount = 0; var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }if (_holidayCalendar_nullFieldCount < 8) { if (_entity.holidayCalendar == null) { _entity.holidayCalendar = new HolidayCalendar(); }ensureNotNull(_entity.holidayCalendar).umCalendarUid = tmp_umCalendarUid; ensureNotNull(_entity.holidayCalendar).umCalendarName = tmp_umCalendarName; ensureNotNull(_entity.holidayCalendar).umCalendarCategory = tmp_umCalendarCategory; ensureNotNull(_entity.holidayCalendar).umCalendarActive = tmp_umCalendarActive; ensureNotNull(_entity.holidayCalendar).umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; ensureNotNull(_entity.holidayCalendar).umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; ensureNotNull(_entity.holidayCalendar).umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; ensureNotNull(_entity.holidayCalendar).umCalendarLct = tmp_umCalendarLct; }var _school_nullFieldCount = 0; var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }if (_school_nullFieldCount < 21) { if (_entity.school == null) { _entity.school = new School(); }ensureNotNull(_entity.school).schoolUid = tmp_schoolUid; ensureNotNull(_entity.school).schoolName = tmp_schoolName; ensureNotNull(_entity.school).schoolDesc = tmp_schoolDesc; ensureNotNull(_entity.school).schoolAddress = tmp_schoolAddress; ensureNotNull(_entity.school).schoolActive = tmp_schoolActive; ensureNotNull(_entity.school).schoolPhoneNumber = tmp_schoolPhoneNumber; ensureNotNull(_entity.school).schoolGender = tmp_schoolGender; ensureNotNull(_entity.school).schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; ensureNotNull(_entity.school).schoolFeatures = tmp_schoolFeatures; ensureNotNull(_entity.school).schoolLocationLong = tmp_schoolLocationLong; ensureNotNull(_entity.school).schoolLocationLatt = tmp_schoolLocationLatt; ensureNotNull(_entity.school).schoolEmailAddress = tmp_schoolEmailAddress; ensureNotNull(_entity.school).schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; ensureNotNull(_entity.school).schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; ensureNotNull(_entity.school).schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; ensureNotNull(_entity.school).schoolCode = tmp_schoolCode; ensureNotNull(_entity.school).schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; ensureNotNull(_entity.school).schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; ensureNotNull(_entity.school).schoolLastChangedBy = tmp_schoolLastChangedBy; ensureNotNull(_entity.school).schoolLct = tmp_schoolLct; ensureNotNull(_entity.school).schoolTimeZone = tmp_schoolTimeZone; }var _terminology_nullFieldCount = 0; var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); if (_resultSet.wasNull()) { _terminology_nullFieldCount = _terminology_nullFieldCount + 1 | 0; }if (_terminology_nullFieldCount < 4) { if (_entity.terminology == null) { _entity.terminology = new CourseTerminology(); }ensureNotNull(_entity.terminology).ctUid = tmp_ctUid; ensureNotNull(_entity.terminology).ctTitle = tmp_ctTitle; ensureNotNull(_entity.terminology).ctTerminology = tmp_ctTerminology; ensureNotNull(_entity.terminology).ctLct = tmp_ctLct; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda(closure$filterUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$filterUid); _stmt.setLong_6svq3l$(2, closure$filterUid); useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda$lambda(closure$_result)); return Unit; }; } ClazzDao_JdbcKt.prototype.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$ = function (filterUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | CourseTerminology.*\n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON ((clazz.clazzHolidayUMCalendarUid != 0 \n | AND HolidayCalendar.umCalendarUid = clazz.clazzHolidayUMCalendarUid)\n | OR clazz.clazzHolidayUMCalendarUid = 0 AND clazz.clazzSchoolUid = 0 \n | AND HolidayCalendar.umCalendarUid = (SELECT schoolHolidayCalendarUid \n | FROM School \n | WHERE schoolUid = clazz.clazzSchoolUid))\n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | \n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | \n | WHERE ? = 0 \n | OR Clazz.clazzUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | CourseTerminology.*\n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON ((clazz.clazzHolidayUMCalendarUid != 0 \n | AND HolidayCalendar.umCalendarUid = clazz.clazzHolidayUMCalendarUid)\n | OR clazz.clazzHolidayUMCalendarUid = 0 AND clazz.clazzSchoolUid = 0 \n | AND HolidayCalendar.umCalendarUid = (SELECT schoolHolidayCalendarUid \n | FROM School \n | WHERE schoolUid = clazz.clazzSchoolUid))\n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | \n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | \n | WHERE ? = 0 \n | OR Clazz.clazzUid = ?\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda(filterUid, _result)); return _result.v; }; function ClazzDao_JdbcKt$getClazzWithSchool$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); var _entity = new ClazzWithSchool(); _entity.clazzUid = tmp_clazzUid; _entity.clazzName = tmp_clazzName; _entity.clazzDesc = tmp_clazzDesc; _entity.attendanceAverage = tmp_attendanceAverage; _entity.clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; _entity.clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; _entity.isClazzActive = tmp_isClazzActive; _entity.clazzLocationUid = tmp_clazzLocationUid; _entity.clazzStartTime = tmp_clazzStartTime; _entity.clazzEndTime = tmp_clazzEndTime; _entity.clazzFeatures = tmp_clazzFeatures; _entity.clazzSchoolUid = tmp_clazzSchoolUid; _entity.clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; _entity.clazzTerminologyUid = tmp_clazzTerminologyUid; _entity.clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; _entity.clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; _entity.clazzLastChangedBy = tmp_clazzLastChangedBy; _entity.clazzLct = tmp_clazzLct; _entity.clazzTimeZone = tmp_clazzTimeZone; _entity.clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; _entity.clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; _entity.clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; _entity.clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; _entity.clazzCode = tmp_clazzCode; var _school_nullFieldCount = 0; var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); if (_resultSet.wasNull()) { _school_nullFieldCount = _school_nullFieldCount + 1 | 0; }if (_school_nullFieldCount < 21) { if (_entity.school == null) { _entity.school = new School(); }ensureNotNull(_entity.school).schoolUid = tmp_schoolUid; ensureNotNull(_entity.school).schoolName = tmp_schoolName; ensureNotNull(_entity.school).schoolDesc = tmp_schoolDesc; ensureNotNull(_entity.school).schoolAddress = tmp_schoolAddress; ensureNotNull(_entity.school).schoolActive = tmp_schoolActive; ensureNotNull(_entity.school).schoolPhoneNumber = tmp_schoolPhoneNumber; ensureNotNull(_entity.school).schoolGender = tmp_schoolGender; ensureNotNull(_entity.school).schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; ensureNotNull(_entity.school).schoolFeatures = tmp_schoolFeatures; ensureNotNull(_entity.school).schoolLocationLong = tmp_schoolLocationLong; ensureNotNull(_entity.school).schoolLocationLatt = tmp_schoolLocationLatt; ensureNotNull(_entity.school).schoolEmailAddress = tmp_schoolEmailAddress; ensureNotNull(_entity.school).schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; ensureNotNull(_entity.school).schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; ensureNotNull(_entity.school).schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; ensureNotNull(_entity.school).schoolCode = tmp_schoolCode; ensureNotNull(_entity.school).schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; ensureNotNull(_entity.school).schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; ensureNotNull(_entity.school).schoolLastChangedBy = tmp_schoolLastChangedBy; ensureNotNull(_entity.school).schoolLct = tmp_schoolLct; ensureNotNull(_entity.school).schoolTimeZone = tmp_schoolTimeZone; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda; Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$getClazzWithSchool$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClazzWithSchool$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getClazzWithSchool_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$getClazzWithSchool_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getClazzWithSchool_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getClazzWithSchool_s8cxhz$.prototype.constructor = Coroutine$getClazzWithSchool_s8cxhz$; Coroutine$getClazzWithSchool_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzWithSchool) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT Clazz.*, School.* FROM Clazz LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid WHERE clazz.clazzUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT Clazz.*, School.* FROM Clazz LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid WHERE clazz.clazzUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzDao_JdbcKt$getClazzWithSchool$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.getClazzWithSchool_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getClazzWithSchool_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazz_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_19($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_19.prototype.constructor = Coroutine$insertAsync_19; Coroutine$insertAsync_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazz_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_19(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazz_.insertList_4ezy5m$(entityList); }; function ClazzDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.clazzName); _stmt.setString_vqvrqt$(2, _entity.clazzDesc); _stmt.setFloat_24o109$(3, _entity.attendanceAverage); _stmt.setLong_6svq3l$(4, _entity.clazzHolidayUMCalendarUid); _stmt.setLong_6svq3l$(5, _entity.clazzScheuleUMCalendarUid); _stmt.setBoolean_fzusl$(6, _entity.isClazzActive); _stmt.setLong_6svq3l$(7, _entity.clazzLocationUid); _stmt.setLong_6svq3l$(8, _entity.clazzStartTime); _stmt.setLong_6svq3l$(9, _entity.clazzEndTime); _stmt.setLong_6svq3l$(10, _entity.clazzFeatures); _stmt.setLong_6svq3l$(11, _entity.clazzSchoolUid); _stmt.setInt_vux9f0$(12, _entity.clazzEnrolmentPolicy); _stmt.setLong_6svq3l$(13, _entity.clazzTerminologyUid); _stmt.setLong_6svq3l$(14, _entity.clazzMasterChangeSeqNum); _stmt.setLong_6svq3l$(15, _entity.clazzLocalChangeSeqNum); _stmt.setInt_vux9f0$(16, _entity.clazzLastChangedBy); _stmt.setLong_6svq3l$(17, _entity.clazzLct); _stmt.setString_vqvrqt$(18, _entity.clazzTimeZone); _stmt.setLong_6svq3l$(19, _entity.clazzStudentsPersonGroupUid); _stmt.setLong_6svq3l$(20, _entity.clazzTeachersPersonGroupUid); _stmt.setLong_6svq3l$(21, _entity.clazzPendingStudentsPersonGroupUid); _stmt.setLong_6svq3l$(22, _entity.clazzParentsPersonGroupUid); _stmt.setString_vqvrqt$(23, _entity.clazzCode); _stmt.setLong_6svq3l$(24, _entity.clazzUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Clazz SET clazzName = ?, clazzDesc = ?, attendanceAverage = ?, clazzHolidayUMCalendarUid = ?, clazzScheuleUMCalendarUid = ?, isClazzActive = ?, clazzLocationUid = ?, clazzStartTime = ?, clazzEndTime = ?, clazzFeatures = ?, clazzSchoolUid = ?, clazzEnrolmentPolicy = ?, clazzTerminologyUid = ?, clazzMasterChangeSeqNum = ?, clazzLocalChangeSeqNum = ?, clazzLastChangedBy = ?, clazzLct = ?, clazzTimeZone = ?, clazzStudentsPersonGroupUid = ?, clazzTeachersPersonGroupUid = ?, clazzPendingStudentsPersonGroupUid = ?, clazzParentsPersonGroupUid = ?, clazzCode = ? WHERE clazzUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.clazzName); _stmt.setString_vqvrqt$(2, closure$entity.clazzDesc); _stmt.setFloat_24o109$(3, closure$entity.attendanceAverage); _stmt.setLong_6svq3l$(4, closure$entity.clazzHolidayUMCalendarUid); _stmt.setLong_6svq3l$(5, closure$entity.clazzScheuleUMCalendarUid); _stmt.setBoolean_fzusl$(6, closure$entity.isClazzActive); _stmt.setLong_6svq3l$(7, closure$entity.clazzLocationUid); _stmt.setLong_6svq3l$(8, closure$entity.clazzStartTime); _stmt.setLong_6svq3l$(9, closure$entity.clazzEndTime); _stmt.setLong_6svq3l$(10, closure$entity.clazzFeatures); _stmt.setLong_6svq3l$(11, closure$entity.clazzSchoolUid); _stmt.setInt_vux9f0$(12, closure$entity.clazzEnrolmentPolicy); _stmt.setLong_6svq3l$(13, closure$entity.clazzTerminologyUid); _stmt.setLong_6svq3l$(14, closure$entity.clazzMasterChangeSeqNum); _stmt.setLong_6svq3l$(15, closure$entity.clazzLocalChangeSeqNum); _stmt.setInt_vux9f0$(16, closure$entity.clazzLastChangedBy); _stmt.setLong_6svq3l$(17, closure$entity.clazzLct); _stmt.setString_vqvrqt$(18, closure$entity.clazzTimeZone); _stmt.setLong_6svq3l$(19, closure$entity.clazzStudentsPersonGroupUid); _stmt.setLong_6svq3l$(20, closure$entity.clazzTeachersPersonGroupUid); _stmt.setLong_6svq3l$(21, closure$entity.clazzPendingStudentsPersonGroupUid); _stmt.setLong_6svq3l$(22, closure$entity.clazzParentsPersonGroupUid); _stmt.setString_vqvrqt$(23, closure$entity.clazzCode); _stmt.setLong_6svq3l$(24, closure$entity.clazzUid); return _stmt.executeUpdate(); }; } ClazzDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Clazz SET clazzName = ?, clazzDesc = ?, attendanceAverage = ?, clazzHolidayUMCalendarUid = ?, clazzScheuleUMCalendarUid = ?, isClazzActive = ?, clazzLocationUid = ?, clazzStartTime = ?, clazzEndTime = ?, clazzFeatures = ?, clazzSchoolUid = ?, clazzEnrolmentPolicy = ?, clazzTerminologyUid = ?, clazzMasterChangeSeqNum = ?, clazzLocalChangeSeqNum = ?, clazzLastChangedBy = ?, clazzLct = ?, clazzTimeZone = ?, clazzStudentsPersonGroupUid = ?, clazzTeachersPersonGroupUid = ?, clazzPendingStudentsPersonGroupUid = ?, clazzParentsPersonGroupUid = ?, clazzCode = ? WHERE clazzUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzDao_JdbcKt$update$lambda(entity)); }; function ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Clazz (clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING clazzUid'; } else tmp$ = ''; return "INSERT INTO Clazz (clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES(COALESCE(?,nextval('Clazz_clazzUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzUid); } stmt.setString_vqvrqt$(2, entity.clazzName); stmt.setString_vqvrqt$(3, entity.clazzDesc); stmt.setFloat_24o109$(4, entity.attendanceAverage); stmt.setLong_6svq3l$(5, entity.clazzHolidayUMCalendarUid); stmt.setLong_6svq3l$(6, entity.clazzScheuleUMCalendarUid); stmt.setBoolean_fzusl$(7, entity.isClazzActive); stmt.setLong_6svq3l$(8, entity.clazzLocationUid); stmt.setLong_6svq3l$(9, entity.clazzStartTime); stmt.setLong_6svq3l$(10, entity.clazzEndTime); stmt.setLong_6svq3l$(11, entity.clazzFeatures); stmt.setLong_6svq3l$(12, entity.clazzSchoolUid); stmt.setInt_vux9f0$(13, entity.clazzEnrolmentPolicy); stmt.setLong_6svq3l$(14, entity.clazzTerminologyUid); stmt.setLong_6svq3l$(15, entity.clazzMasterChangeSeqNum); stmt.setLong_6svq3l$(16, entity.clazzLocalChangeSeqNum); stmt.setInt_vux9f0$(17, entity.clazzLastChangedBy); stmt.setLong_6svq3l$(18, entity.clazzLct); stmt.setString_vqvrqt$(19, entity.clazzTimeZone); stmt.setLong_6svq3l$(20, entity.clazzStudentsPersonGroupUid); stmt.setLong_6svq3l$(21, entity.clazzTeachersPersonGroupUid); stmt.setLong_6svq3l$(22, entity.clazzPendingStudentsPersonGroupUid); stmt.setLong_6svq3l$(23, entity.clazzParentsPersonGroupUid); stmt.setString_vqvrqt$(24, entity.clazzCode); }; ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao_JdbcKt', interfaces: [ClazzDao]}; function ClazzDao_ReplicateWrapper(_db, _dao) { ClazzDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_21($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_21.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_21; Coroutine$replicateOnNewNode_s8cxhz$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_21(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_21($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_21.prototype.constructor = Coroutine$replicateOnChange_21; Coroutine$replicateOnChange_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_21(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzDao_ReplicateWrapper.prototype.findByClazzCode_61zpoe$ = function (code, continuation) { return this._dao_0.findByClazzCode_61zpoe$(code, continuation); }; ClazzDao_ReplicateWrapper.prototype.findByClazzCodeFromWeb_61zpoe$ = function (code, continuation) { return this._dao_0.findByClazzCodeFromWeb_61zpoe$(code, continuation); }; ClazzDao_ReplicateWrapper.prototype.findAllLive = function () { return this._dao_0.findAllLive(); }; ClazzDao_ReplicateWrapper.prototype.findAll = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ClazzDao_ReplicateWrapper.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithHolidayCalendarAsync_s8cxhz$(uid, continuation); }; ClazzDao_ReplicateWrapper.prototype.updateAsync_yczdf2$ = function (entity, continuation) { entity.clazzLct = systemTimeInMillis(); return this._dao_0.updateAsync_yczdf2$(entity, continuation); }; ClazzDao_ReplicateWrapper.prototype.findAllClazzesBySchool_s8cxhz$ = function (schoolUid, continuation) { return this._dao_0.findAllClazzesBySchool_s8cxhz$(schoolUid, continuation); }; ClazzDao_ReplicateWrapper.prototype.findAllClazzesBySchoolLive_s8cxhz$ = function (schoolUid) { return this._dao_0.findAllClazzesBySchoolLive_s8cxhz$(schoolUid); }; ClazzDao_ReplicateWrapper.prototype.findClazzesWithPermission_dchjmd$ = function (searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool) { return this._dao_0.findClazzesWithPermission_dchjmd$(searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool); }; ClazzDao_ReplicateWrapper.prototype.getClassNamesFromListOfIds_gox9k8$ = function (ids, continuation) { return this._dao_0.getClassNamesFromListOfIds_gox9k8$(ids, continuation); }; ClazzDao_ReplicateWrapper.prototype.findByClazzName_61zpoe$ = function (name) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0($this, clazzUid_0, timeChanged_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$timeChanged = timeChanged_0; } Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.prototype.constructor = Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateClazzAttendanceAverageAsync_3pjtqy$(this.local$clazzUid, this.local$timeChanged, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.updateClazzAttendanceAverageAsync_3pjtqy$ = function (clazzUid_0, timeChanged_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0(this, clazzUid_0, timeChanged_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_ReplicateWrapper.prototype.personHasPermissionWithClazz_b9bd0d$ = function (accountPersonUid, clazzUid, permission, continuation) { return this._dao_0.personHasPermissionWithClazz_b9bd0d$(accountPersonUid, clazzUid, permission, continuation); }; ClazzDao_ReplicateWrapper.prototype.selectDelegatablePermissions_3pjtqy$ = function (accountPersonUid, clazzUid, continuation) { return this._dao_0.selectDelegatablePermissions_3pjtqy$(accountPersonUid, clazzUid, continuation); }; ClazzDao_ReplicateWrapper.prototype.getClazzWithDisplayDetails_3pjtqy$ = function (clazzUid, currentTime) { return this._dao_0.getClazzWithDisplayDetails_3pjtqy$(clazzUid, currentTime); }; ClazzDao_ReplicateWrapper.prototype.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$ = function (filterUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.getClazzWithSchool_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getClazzWithSchool_s8cxhz$(clazzUid, continuation); }; ClazzDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_20($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_20.prototype.constructor = Coroutine$insertAsync_20; Coroutine$insertAsync_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(6, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_20(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao_ReplicateWrapper', interfaces: [ClazzDao]}; var receiveOrNull$lambda = wrapFunction(function () { var throwCCE = Kotlin.throwCCE; var reflect = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect; var getKClass = Kotlin.getKClass; var typeInfoImpl = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect.typeInfoImpl_1lvkm8$; function Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$typeClosure$T = typeClosure$T_0; this.local$isT = isT_0; this.local$isT_0 = void 0; this.local$it = it_0; } Coroutine$receiveOrNull$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$receiveOrNull$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$receiveOrNull$lambda.prototype.constructor = Coroutine$receiveOrNull$lambda; Coroutine$receiveOrNull$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; if ((tmp$ = this.local$it.status) != null ? tmp$.equals(HttpStatusCode.Companion.NoContent) : null) { return null; } else { var T_0 = this.local$typeClosure$T; this.local$isT_0 = this.local$isT; var tmp$_1; var tmp$_2 = this.local$it.call; var typeInfo$result_0; typeInfo$break: do { try { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), getReifiedTypeParameterKType(this.local$typeClosure$T)); } catch (_) { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_2.receive_qi9ur9$(typeInfo$result_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } case 1: throw this.exception_0; case 2: this.result_0 = this.local$isT_0(tmp$_1 = this.result_0) ? tmp$_1 : throwCCE(); return this.result_0; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; return function (typeClosure$T_0, isT_0) { return function (it_0, continuation_0, suspended) { var instance = new Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; }; }); function getOrNull$lambda_0(closure$block) { return function ($receiver) { closure$block($receiver); return Unit; }; } function ClazzDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_22($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_22.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_22; Coroutine$replicateOnNewNode_s8cxhz$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_22(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_22($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_22.prototype.constructor = Coroutine$replicateOnChange_22; Coroutine$replicateOnChange_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_22(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; ClazzDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$findByClazzCode_61zpoe$_0($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$code = code_0; } Coroutine$findByClazzCode_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzCode_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzCode_61zpoe$_0.prototype.constructor = Coroutine$findByClazzCode_61zpoe$_0; Coroutine$findByClazzCode_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzCode_61zpoe$(this.local$code, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByClazzCode_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzCode_61zpoe$_0(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_Repo$findByClazzCodeFromWeb$lambda$lambda(this$ClazzDao_Repo) { return function ($receiver, it) { takeFrom($receiver, this$ClazzDao_Repo._endpoint); $receiver.encodedPath = $receiver.encodedPath + 'ClazzDao/findByClazzCodeFromWeb'; return Unit; }; } function ClazzDao_Repo$findByClazzCodeFromWeb$lambda(this$ClazzDao_Repo, closure$code) { return function ($receiver) { $receiver.url_6yzzjr$(ClazzDao_Repo$findByClazzCodeFromWeb$lambda$lambda(this$ClazzDao_Repo)); doorNodeAndVersionHeaders($receiver, this$ClazzDao_Repo._repo); header($receiver, 'x-nid', this$ClazzDao_Repo._clientId); parameter($receiver, 'code', closure$code); return Unit; }; } function Coroutine$findByClazzCodeFromWeb_61zpoe$_0($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.$this = $this; this.local$response = void 0; this.local$code = code_0; } Coroutine$findByClazzCodeFromWeb_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzCodeFromWeb_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzCodeFromWeb_61zpoe$_0.prototype.constructor = Coroutine$findByClazzCodeFromWeb_61zpoe$_0; Coroutine$findByClazzCodeFromWeb_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var $receiver = this.$this._httpClient; var host_0; var body_0; host_0 = 'localhost'; body_0 = utils.EmptyContent; var $receiver_1_0 = new HttpRequestBuilder_init(); url($receiver_1_0, 'http', host_0, 0, '/'); $receiver_1_0.method = HttpMethod.Companion.Get; $receiver_1_0.body = body_0; getOrNull$lambda_0(ClazzDao_Repo$findByClazzCodeFromWeb$lambda(this.$this, this.local$code))($receiver_1_0); var $this_0_0 = new HttpStatement($receiver_1_0, $receiver); var tmp$_4_0, tmp$_5_0, tmp$_6_0; tmp$_4_0 = getKClass(HttpStatement); if (equals(tmp$_4_0, getKClass(HttpStatement))) { this.result_0 = Kotlin.isType(tmp$_5_0 = $this_0_0, HttpStatement) ? tmp$_5_0 : throwCCE(); this.state_0 = 9; continue; } else { if (equals(tmp$_4_0, getKClass(HttpResponse))) { this.state_0 = 7; this.result_0 = $this_0_0.execute(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 1; this.result_0 = $this_0_0.executeUnsafe(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } } case 1: this.local$response = this.result_0; this.exceptionState_0 = 4; var tmp$_7_0; var tmp$_8_0 = this.local$response.call; var typeInfo$result_0_0; typeInfo$break: do { try { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), createKType(getKClass(HttpStatement), [], false)); } catch (_) { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_8_0.receive_qi9ur9$(typeInfo$result_0_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 2: this.result_0 = Kotlin.isType(tmp$_7_0 = this.result_0, HttpStatement) ? tmp$_7_0 : throwCCE(); this.exceptionState_0 = 6; this.finallyPath_0 = [3]; this.state_0 = 5; continue; case 3: this.state_0 = 8; continue; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; complete(this.local$response); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; case 7: this.result_0 = Kotlin.isType(tmp$_6_0 = this.result_0, HttpStatement) ? tmp$_6_0 : throwCCE(); this.state_0 = 8; continue; case 8: this.state_0 = 9; continue; case 9: this.result_0; var httpStatement_0 = this.result_0; this.state_0 = 10; this.result_0 = httpStatement_0.execute_2rh6on$(receiveOrNull$lambda(Clazz, Kotlin.orNull(Kotlin.isInstanceOf(Clazz))), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 10: this.result_0; return this.result_0; default:this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByClazzCodeFromWeb_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzCodeFromWeb_61zpoe$_0(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findAllLive = function () { var _result = this._dao.findAllLive(); return _result; }; ClazzDao_Repo.prototype.findAll = function () { var _result = this._dao.findAll(); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_4($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_4.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_4; Coroutine$findByUidAsync_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_4(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithHolidayCalendarAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_yczdf2$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_yczdf2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_yczdf2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_yczdf2$_0.prototype.constructor = Coroutine$updateAsync_yczdf2$_0; Coroutine$updateAsync_yczdf2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_yczdf2$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.updateAsync_yczdf2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_yczdf2$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllClazzesBySchool_s8cxhz$_0($this, schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; } Coroutine$findAllClazzesBySchool_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllClazzesBySchool_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllClazzesBySchool_s8cxhz$_0.prototype.constructor = Coroutine$findAllClazzesBySchool_s8cxhz$_0; Coroutine$findAllClazzesBySchool_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllClazzesBySchool_s8cxhz$(this.local$schoolUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findAllClazzesBySchool_s8cxhz$ = function (schoolUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllClazzesBySchool_s8cxhz$_0(this, schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findAllClazzesBySchoolLive_s8cxhz$ = function (schoolUid) { var _result = this._dao.findAllClazzesBySchoolLive_s8cxhz$(schoolUid); return _result; }; ClazzDao_Repo.prototype.findClazzesWithPermission_dchjmd$ = function (searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool) { var _result = this._dao.findClazzesWithPermission_dchjmd$(searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool); return _result; }; function Coroutine$getClassNamesFromListOfIds_gox9k8$_0($this, ids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ids = ids_0; } Coroutine$getClassNamesFromListOfIds_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getClassNamesFromListOfIds_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getClassNamesFromListOfIds_gox9k8$_0.prototype.constructor = Coroutine$getClassNamesFromListOfIds_gox9k8$_0; Coroutine$getClassNamesFromListOfIds_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getClassNamesFromListOfIds_gox9k8$(this.local$ids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.getClassNamesFromListOfIds_gox9k8$ = function (ids_0, continuation_0, suspended) { var instance = new Coroutine$getClassNamesFromListOfIds_gox9k8$_0(this, ids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findByClazzName_61zpoe$ = function (name) { var _result = this._dao.findByClazzName_61zpoe$(name); return _result; }; function Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1($this, clazzUid_0, timeChanged_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$timeChanged = timeChanged_0; } Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.prototype.constructor = Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateClazzAttendanceAverageAsync_3pjtqy$(this.local$clazzUid, this.local$timeChanged, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.updateClazzAttendanceAverageAsync_3pjtqy$ = function (clazzUid_0, timeChanged_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1(this, clazzUid_0, timeChanged_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$personHasPermissionWithClazz_b9bd0d$_0($this, accountPersonUid_0, clazzUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$clazzUid = clazzUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithClazz_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithClazz_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithClazz_b9bd0d$_0.prototype.constructor = Coroutine$personHasPermissionWithClazz_b9bd0d$_0; Coroutine$personHasPermissionWithClazz_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionWithClazz_b9bd0d$(this.local$accountPersonUid, this.local$clazzUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.personHasPermissionWithClazz_b9bd0d$ = function (accountPersonUid_0, clazzUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithClazz_b9bd0d$_0(this, accountPersonUid_0, clazzUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$selectDelegatablePermissions_3pjtqy$_0($this, accountPersonUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$selectDelegatablePermissions_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$selectDelegatablePermissions_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$selectDelegatablePermissions_3pjtqy$_0.prototype.constructor = Coroutine$selectDelegatablePermissions_3pjtqy$_0; Coroutine$selectDelegatablePermissions_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.selectDelegatablePermissions_3pjtqy$(this.local$accountPersonUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.selectDelegatablePermissions_3pjtqy$ = function (accountPersonUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$selectDelegatablePermissions_3pjtqy$_0(this, accountPersonUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.getClazzWithDisplayDetails_3pjtqy$ = function (clazzUid, currentTime) { var _result = this._dao.getClazzWithDisplayDetails_3pjtqy$(clazzUid, currentTime); return _result; }; ClazzDao_Repo.prototype.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$ = function (filterUid) { var _result = this._dao.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$(filterUid); return _result; }; function Coroutine$getClazzWithSchool_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getClazzWithSchool_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getClazzWithSchool_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getClazzWithSchool_s8cxhz$_0.prototype.constructor = Coroutine$getClazzWithSchool_s8cxhz$_0; Coroutine$getClazzWithSchool_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getClazzWithSchool_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.getClazzWithSchool_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getClazzWithSchool_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_21($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_21.prototype.constructor = Coroutine$insertAsync_21; Coroutine$insertAsync_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_21(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao_Repo', interfaces: [ClazzDao]}; function ClazzEnrolmentDao_JdbcKt(_db) { ClazzEnrolmentDao.call(this); this._db = _db; this._insertAdapterClazzEnrolment_ = new ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral(this._db); } function Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_23($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_23.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_23; Coroutine$replicateOnNewNode_s8cxhz$_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | ? AS ceDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 64 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = ?), 0) \n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | ? AS ceDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 64 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = ?), 0) \n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_23(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateClazzEnrolmentOnChange($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateClazzEnrolmentOnChange.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateClazzEnrolmentOnChange.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateClazzEnrolmentOnChange.prototype.constructor = Coroutine$replicateClazzEnrolmentOnChange; Coroutine$replicateClazzEnrolmentOnChange.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | UserSession.usClientNodeId AS ceDestination\n | FROM ChangeLog\n | JOIN ClazzEnrolment\n | ON ChangeLog.chTableId = 65\n | AND ChangeLog.chEntityPk = ClazzEnrolment.clazzEnrolmentUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | UserSession.usClientNodeId AS ceDestination\n | FROM ChangeLog\n | JOIN ClazzEnrolment\n | ON ChangeLog.chTableId = 65\n | AND ChangeLog.chEntityPk = ClazzEnrolment.clazzEnrolmentUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.replicateClazzEnrolmentOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateClazzEnrolmentOnChange(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_JdbcKt.prototype.insertListAsync_9f9sqv$ = function (entityList) { this._insertAdapterClazzEnrolment_.insertList_4ezy5m$(entityList); }; function ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolment(); _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(closure$personUid_0, closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(closure$personUid_0, closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(closure$personUid_0, closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$($this, personUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.prototype.constructor = Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$; Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzEnrolment) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ? \n | AND clazzEnrolmentOutcome = 200 LIMIT 1\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ? \n | AND clazzEnrolmentOutcome = 200 LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(this.local$personUid, this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.findByPersonUidAndClazzUidAsync_3pjtqy$ = function (personUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$(this, personUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral(this$ClazzEnrolmentDao_JdbcKt, closure$personUid, closure$clazzUid) { this.this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$clazzUid = closure$clazzUid; DoorDataSourceFactory.call(this); } function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_timeZone = _resultSet.getString_61zpoe$('timeZone'); var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolmentWithLeavingReason(); _entity.timeZone = tmp_timeZone; _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; var _leavingReason_nullFieldCount = 0; var tmp_leavingReasonUid = _resultSet.getLong_61zpoe$('leavingReasonUid'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonTitle = _resultSet.getString_61zpoe$('leavingReasonTitle'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonMCSN = _resultSet.getLong_61zpoe$('leavingReasonMCSN'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonCSN = _resultSet.getLong_61zpoe$('leavingReasonCSN'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonLCB = _resultSet.getInt_61zpoe$('leavingReasonLCB'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonLct = _resultSet.getLong_61zpoe$('leavingReasonLct'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }if (_leavingReason_nullFieldCount < 6) { if (_entity.leavingReason == null) { _entity.leavingReason = new LeavingReason(); }ensureNotNull(_entity.leavingReason).leavingReasonUid = tmp_leavingReasonUid; ensureNotNull(_entity.leavingReason).leavingReasonTitle = tmp_leavingReasonTitle; ensureNotNull(_entity.leavingReason).leavingReasonMCSN = tmp_leavingReasonMCSN; ensureNotNull(_entity.leavingReason).leavingReasonCSN = tmp_leavingReasonCSN; ensureNotNull(_entity.leavingReason).leavingReasonLCB = tmp_leavingReasonLCB; ensureNotNull(_entity.leavingReason).leavingReasonLct = tmp_leavingReasonLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (SELECT ClazzEnrolment.*, LeavingReason.*, \n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? ORDER BY clazzEnrolmentDateLeft DESC) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (SELECT ClazzEnrolment.*, LeavingReason.*, \n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? ORDER BY clazzEnrolmentDateLeft DESC) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'LeavingReason', 'Clazz', 'School']), ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid, this.closure$clazzUid, _limit, _offset)); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (SELECT ClazzEnrolment.*, LeavingReason.*, \n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? ORDER BY clazzEnrolmentDateLeft DESC) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (SELECT ClazzEnrolment.*, LeavingReason.*, \n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? ORDER BY clazzEnrolmentDateLeft DESC) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'LeavingReason', 'Clazz', 'School']), ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid, this.closure$clazzUid)); }; ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzEnrolmentDao_JdbcKt.prototype.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$ = function (personUid, clazzUid) { var _result = new ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral(this, personUid, clazzUid); return _result; }; function ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_timeZone = _resultSet.getString_61zpoe$('timeZone'); var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolmentWithLeavingReason(); _entity.timeZone = tmp_timeZone; _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; var _leavingReason_nullFieldCount = 0; var tmp_leavingReasonUid = _resultSet.getLong_61zpoe$('leavingReasonUid'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonTitle = _resultSet.getString_61zpoe$('leavingReasonTitle'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonMCSN = _resultSet.getLong_61zpoe$('leavingReasonMCSN'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonCSN = _resultSet.getLong_61zpoe$('leavingReasonCSN'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonLCB = _resultSet.getInt_61zpoe$('leavingReasonLCB'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }var tmp_leavingReasonLct = _resultSet.getLong_61zpoe$('leavingReasonLct'); if (_resultSet.wasNull()) { _leavingReason_nullFieldCount = _leavingReason_nullFieldCount + 1 | 0; }if (_leavingReason_nullFieldCount < 6) { if (_entity.leavingReason == null) { _entity.leavingReason = new LeavingReason(); }ensureNotNull(_entity.leavingReason).leavingReasonUid = tmp_leavingReasonUid; ensureNotNull(_entity.leavingReason).leavingReasonTitle = tmp_leavingReasonTitle; ensureNotNull(_entity.leavingReason).leavingReasonMCSN = tmp_leavingReasonMCSN; ensureNotNull(_entity.leavingReason).leavingReasonCSN = tmp_leavingReasonCSN; ensureNotNull(_entity.leavingReason).leavingReasonLCB = tmp_leavingReasonLCB; ensureNotNull(_entity.leavingReason).leavingReasonLct = tmp_leavingReasonLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(closure$enrolmentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$enrolmentUid = closure$enrolmentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$enrolmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(closure$enrolmentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(closure$enrolmentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findEnrolmentWithLeavingReason_s8cxhz$($this, enrolmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$enrolmentUid = enrolmentUid_0; } Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.prototype.constructor = Coroutine$findEnrolmentWithLeavingReason_s8cxhz$; Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzEnrolmentWithLeavingReason) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT ClazzEnrolment.*, LeavingReason.*,\n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE ClazzEnrolment.clazzEnrolmentUid = ?\n "), void 0, void 0, void 0, trimMargin("\n |SELECT ClazzEnrolment.*, LeavingReason.*,\n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE ClazzEnrolment.clazzEnrolmentUid = ?\n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(this.local$enrolmentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.findEnrolmentWithLeavingReason_s8cxhz$ = function (enrolmentUid_0, continuation_0, suspended) { var instance = new Coroutine$findEnrolmentWithLeavingReason_s8cxhz$(this, enrolmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(closure$endDate_0, closure$updateTime_0, closure$clazzEnrolmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$endDate = closure$endDate_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$clazzEnrolmentUid = closure$clazzEnrolmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$endDate); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzEnrolmentUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(closure$endDate_0, closure$updateTime_0, closure$clazzEnrolmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(closure$endDate_0, closure$updateTime_0, closure$clazzEnrolmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateDateLeftByUid_b9bd0d$($this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzEnrolmentUid = clazzEnrolmentUid_0; this.local$endDate = endDate_0; this.local$updateTime = updateTime_0; } Coroutine$updateDateLeftByUid_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDateLeftByUid_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDateLeftByUid_b9bd0d$.prototype.constructor = Coroutine$updateDateLeftByUid_b9bd0d$; Coroutine$updateDateLeftByUid_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentDateLeft = ?,\n | clazzEnrolmentLct = ?\n | WHERE clazzEnrolmentUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentDateLeft = ?,\n | clazzEnrolmentLct = ?\n | WHERE clazzEnrolmentUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(this.local$endDate, this.local$updateTime, this.local$clazzEnrolmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.updateDateLeftByUid_b9bd0d$ = function (clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateDateLeftByUid_b9bd0d$(this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.clazzEnrolmentPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.clazzEnrolmentClazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.clazzEnrolmentDateJoined); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.clazzEnrolmentDateLeft); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.clazzEnrolmentRole); this.local$_stmt.setFloat_24o109$(6, this.local$closure$entity.clazzEnrolmentAttendancePercentage); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$entity.clazzEnrolmentActive); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.clazzEnrolmentLeavingReasonUid); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.clazzEnrolmentOutcome); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.clazzEnrolmentLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.clazzEnrolmentMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$entity.clazzEnrolmentLastChangedBy); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.clazzEnrolmentLct); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.clazzEnrolmentUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_95p8s2$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_95p8s2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_95p8s2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_95p8s2$.prototype.constructor = Coroutine$updateAsync_95p8s2$; Coroutine$updateAsync_95p8s2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE ClazzEnrolment SET clazzEnrolmentPersonUid = ?, clazzEnrolmentClazzUid = ?, clazzEnrolmentDateJoined = ?, clazzEnrolmentDateLeft = ?, clazzEnrolmentRole = ?, clazzEnrolmentAttendancePercentage = ?, clazzEnrolmentActive = ?, clazzEnrolmentLeavingReasonUid = ?, clazzEnrolmentOutcome = ?, clazzEnrolmentLocalChangeSeqNum = ?, clazzEnrolmentMasterChangeSeqNum = ?, clazzEnrolmentLastChangedBy = ?, clazzEnrolmentLct = ? WHERE clazzEnrolmentUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.updateAsync_95p8s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_95p8s2$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral(this$ClazzEnrolmentDao_JdbcKt, closure$personUid) { this.this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt; this.closure$personUid = closure$personUid; DoorDataSourceFactory.call(this); } function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_attendance = _resultSet.getFloat_61zpoe$('attendance'); var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolmentWithClazzAndAttendance(); _entity.attendance = tmp_attendance; _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; var _clazz_nullFieldCount = 0; var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }if (_clazz_nullFieldCount < 24) { if (_entity.clazz == null) { _entity.clazz = new Clazz(); }ensureNotNull(_entity.clazz).clazzUid = tmp_clazzUid; ensureNotNull(_entity.clazz).clazzName = tmp_clazzName; ensureNotNull(_entity.clazz).clazzDesc = tmp_clazzDesc; ensureNotNull(_entity.clazz).attendanceAverage = tmp_attendanceAverage; ensureNotNull(_entity.clazz).clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; ensureNotNull(_entity.clazz).clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; ensureNotNull(_entity.clazz).isClazzActive = tmp_isClazzActive; ensureNotNull(_entity.clazz).clazzLocationUid = tmp_clazzLocationUid; ensureNotNull(_entity.clazz).clazzStartTime = tmp_clazzStartTime; ensureNotNull(_entity.clazz).clazzEndTime = tmp_clazzEndTime; ensureNotNull(_entity.clazz).clazzFeatures = tmp_clazzFeatures; ensureNotNull(_entity.clazz).clazzSchoolUid = tmp_clazzSchoolUid; ensureNotNull(_entity.clazz).clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; ensureNotNull(_entity.clazz).clazzTerminologyUid = tmp_clazzTerminologyUid; ensureNotNull(_entity.clazz).clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; ensureNotNull(_entity.clazz).clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; ensureNotNull(_entity.clazz).clazzLastChangedBy = tmp_clazzLastChangedBy; ensureNotNull(_entity.clazz).clazzLct = tmp_clazzLct; ensureNotNull(_entity.clazz).clazzTimeZone = tmp_clazzTimeZone; ensureNotNull(_entity.clazz).clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; ensureNotNull(_entity.clazz).clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; ensureNotNull(_entity.clazz).clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; ensureNotNull(_entity.clazz).clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; ensureNotNull(_entity.clazz).clazzCode = tmp_clazzCode; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | GREATEST(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | ) LIMIT ? OFFSET ? \n ')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzLogAttendanceRecord', 'ClazzLog', 'ClazzEnrolment', 'Clazz']), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid, _limit, _offset)); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | ) \n ')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzLogAttendanceRecord', 'ClazzLog', 'ClazzEnrolment', 'Clazz']), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid)); }; ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzEnrolmentDao_JdbcKt.prototype.findAllClazzesByPersonWithClazz_s8cxhz$ = function (personUid) { var _result = new ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral(this, personUid); return _result; }; function ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(closure$selectedPerson_0, closure$selectedClazz_0, closure$selectedEnrolment_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$selectedPerson = closure$selectedPerson_0; this.local$closure$selectedClazz = closure$selectedClazz_0; this.local$closure$selectedEnrolment = closure$selectedEnrolment_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$selectedPerson); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$selectedClazz); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$selectedEnrolment); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(closure$selectedPerson_0, closure$selectedClazz_0, closure$selectedEnrolment_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(closure$selectedPerson_0, closure$selectedClazz_0, closure$selectedEnrolment_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findMaxEndDateForEnrolment_b9bd0d$($this, selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$selectedClazz = selectedClazz_0; this.local$selectedPerson = selectedPerson_0; this.local$selectedEnrolment = selectedEnrolment_0; } Coroutine$findMaxEndDateForEnrolment_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findMaxEndDateForEnrolment_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findMaxEndDateForEnrolment_b9bd0d$.prototype.constructor = Coroutine$findMaxEndDateForEnrolment_b9bd0d$; Coroutine$findMaxEndDateForEnrolment_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COALESCE(MAX(clazzEnrolmentDateLeft),0) FROM ClazzEnrolment WHERE \n | ClazzEnrolment.clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? AND clazzEnrolmentUid != ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COALESCE(MAX(clazzEnrolmentDateLeft),0) FROM ClazzEnrolment WHERE \n | ClazzEnrolment.clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? AND clazzEnrolmentUid != ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(this.local$selectedPerson, this.local$selectedClazz, this.local$selectedEnrolment, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.findMaxEndDateForEnrolment_b9bd0d$ = function (selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0, suspended) { var instance = new Coroutine$findMaxEndDateForEnrolment_b9bd0d$(this, selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolmentWithClazz(); _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; var _clazz_nullFieldCount = 0; var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzName = _resultSet.getString_61zpoe$('clazzName'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzDesc = _resultSet.getString_61zpoe$('clazzDesc'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_attendanceAverage = _resultSet.getFloat_61zpoe$('attendanceAverage'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzHolidayUMCalendarUid = _resultSet.getLong_61zpoe$('clazzHolidayUMCalendarUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzScheuleUMCalendarUid = _resultSet.getLong_61zpoe$('clazzScheuleUMCalendarUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_isClazzActive = _resultSet.getBoolean_61zpoe$('isClazzActive'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLocationUid = _resultSet.getLong_61zpoe$('clazzLocationUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzStartTime = _resultSet.getLong_61zpoe$('clazzStartTime'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzEndTime = _resultSet.getLong_61zpoe$('clazzEndTime'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzFeatures = _resultSet.getLong_61zpoe$('clazzFeatures'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzSchoolUid = _resultSet.getLong_61zpoe$('clazzSchoolUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzEnrolmentPolicy = _resultSet.getInt_61zpoe$('clazzEnrolmentPolicy'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzTerminologyUid = _resultSet.getLong_61zpoe$('clazzTerminologyUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzMasterChangeSeqNum'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLocalChangeSeqNum'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLastChangedBy = _resultSet.getInt_61zpoe$('clazzLastChangedBy'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzLct = _resultSet.getLong_61zpoe$('clazzLct'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzTimeZone = _resultSet.getString_61zpoe$('clazzTimeZone'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('clazzTeachersPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzParentsPersonGroupUid = _resultSet.getLong_61zpoe$('clazzParentsPersonGroupUid'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }var tmp_clazzCode = _resultSet.getString_61zpoe$('clazzCode'); if (_resultSet.wasNull()) { _clazz_nullFieldCount = _clazz_nullFieldCount + 1 | 0; }if (_clazz_nullFieldCount < 24) { if (_entity.clazz == null) { _entity.clazz = new Clazz(); }ensureNotNull(_entity.clazz).clazzUid = tmp_clazzUid; ensureNotNull(_entity.clazz).clazzName = tmp_clazzName; ensureNotNull(_entity.clazz).clazzDesc = tmp_clazzDesc; ensureNotNull(_entity.clazz).attendanceAverage = tmp_attendanceAverage; ensureNotNull(_entity.clazz).clazzHolidayUMCalendarUid = tmp_clazzHolidayUMCalendarUid; ensureNotNull(_entity.clazz).clazzScheuleUMCalendarUid = tmp_clazzScheuleUMCalendarUid; ensureNotNull(_entity.clazz).isClazzActive = tmp_isClazzActive; ensureNotNull(_entity.clazz).clazzLocationUid = tmp_clazzLocationUid; ensureNotNull(_entity.clazz).clazzStartTime = tmp_clazzStartTime; ensureNotNull(_entity.clazz).clazzEndTime = tmp_clazzEndTime; ensureNotNull(_entity.clazz).clazzFeatures = tmp_clazzFeatures; ensureNotNull(_entity.clazz).clazzSchoolUid = tmp_clazzSchoolUid; ensureNotNull(_entity.clazz).clazzEnrolmentPolicy = tmp_clazzEnrolmentPolicy; ensureNotNull(_entity.clazz).clazzTerminologyUid = tmp_clazzTerminologyUid; ensureNotNull(_entity.clazz).clazzMasterChangeSeqNum = tmp_clazzMasterChangeSeqNum; ensureNotNull(_entity.clazz).clazzLocalChangeSeqNum = tmp_clazzLocalChangeSeqNum; ensureNotNull(_entity.clazz).clazzLastChangedBy = tmp_clazzLastChangedBy; ensureNotNull(_entity.clazz).clazzLct = tmp_clazzLct; ensureNotNull(_entity.clazz).clazzTimeZone = tmp_clazzTimeZone; ensureNotNull(_entity.clazz).clazzStudentsPersonGroupUid = tmp_clazzStudentsPersonGroupUid; ensureNotNull(_entity.clazz).clazzTeachersPersonGroupUid = tmp_clazzTeachersPersonGroupUid; ensureNotNull(_entity.clazz).clazzPendingStudentsPersonGroupUid = tmp_clazzPendingStudentsPersonGroupUid; ensureNotNull(_entity.clazz).clazzParentsPersonGroupUid = tmp_clazzParentsPersonGroupUid; ensureNotNull(_entity.clazz).clazzCode = tmp_clazzCode; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; } Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.prototype.constructor = Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$; Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ClazzEnrolment.*, Clazz.* \n | FROM ClazzEnrolment \n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzEnrolment.*, Clazz.* \n | FROM ClazzEnrolment \n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolmentWithPerson(); _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(closure$clazzUid_0, closure$date_0, closure$roleFilter_0, closure$personUidFilter_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$date = closure$date_0; this.local$closure$roleFilter = closure$roleFilter_0; this.local$closure$personUidFilter = closure$personUidFilter_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$date); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$roleFilter); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$roleFilter); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUidFilter); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$personUidFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(closure$clazzUid_0, closure$date_0, closure$roleFilter_0, closure$personUidFilter_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(closure$clazzUid_0, closure$date_0, closure$roleFilter_0, closure$personUidFilter_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default($this, clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; this.local$date = date_0; this.local$roleFilter = roleFilter_0; this.local$personUidFilter = personUidFilter_0; } Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.prototype.constructor = Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default; Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ClazzEnrolment.*, Person.*\n | FROM ClazzEnrolment\n | LEFT JOIN Person ON ClazzEnrolment.clazzEnrolmentPersonUid = Person.personUid\n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ?\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND CAST(clazzEnrolmentActive AS INTEGER) = 1\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentRole = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ClazzEnrolment.*, Person.*\n | FROM ClazzEnrolment\n | LEFT JOIN Person ON ClazzEnrolment.clazzEnrolmentPersonUid = Person.personUid\n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ?\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND CAST(clazzEnrolmentActive AS INTEGER) = 1\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentRole = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(this.local$clazzUid, this.local$date, this.local$roleFilter, this.local$personUidFilter, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default = function (clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0, suspended) { var instance = new Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default(this, clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolment(); _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$.prototype.constructor = Coroutine$findByUid_s8cxhz$; Coroutine$findByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzEnrolment) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findByUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzEnrolmentUid = _resultSet.getLong_61zpoe$('clazzEnrolmentUid'); var tmp_clazzEnrolmentPersonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentPersonUid'); var tmp_clazzEnrolmentClazzUid = _resultSet.getLong_61zpoe$('clazzEnrolmentClazzUid'); var tmp_clazzEnrolmentDateJoined = _resultSet.getLong_61zpoe$('clazzEnrolmentDateJoined'); var tmp_clazzEnrolmentDateLeft = _resultSet.getLong_61zpoe$('clazzEnrolmentDateLeft'); var tmp_clazzEnrolmentRole = _resultSet.getInt_61zpoe$('clazzEnrolmentRole'); var tmp_clazzEnrolmentAttendancePercentage = _resultSet.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var tmp_clazzEnrolmentActive = _resultSet.getBoolean_61zpoe$('clazzEnrolmentActive'); var tmp_clazzEnrolmentLeavingReasonUid = _resultSet.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var tmp_clazzEnrolmentOutcome = _resultSet.getInt_61zpoe$('clazzEnrolmentOutcome'); var tmp_clazzEnrolmentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var tmp_clazzEnrolmentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var tmp_clazzEnrolmentLastChangedBy = _resultSet.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var tmp_clazzEnrolmentLct = _resultSet.getLong_61zpoe$('clazzEnrolmentLct'); var _entity = new ClazzEnrolment(); _entity.clazzEnrolmentUid = tmp_clazzEnrolmentUid; _entity.clazzEnrolmentPersonUid = tmp_clazzEnrolmentPersonUid; _entity.clazzEnrolmentClazzUid = tmp_clazzEnrolmentClazzUid; _entity.clazzEnrolmentDateJoined = tmp_clazzEnrolmentDateJoined; _entity.clazzEnrolmentDateLeft = tmp_clazzEnrolmentDateLeft; _entity.clazzEnrolmentRole = tmp_clazzEnrolmentRole; _entity.clazzEnrolmentAttendancePercentage = tmp_clazzEnrolmentAttendancePercentage; _entity.clazzEnrolmentActive = tmp_clazzEnrolmentActive; _entity.clazzEnrolmentLeavingReasonUid = tmp_clazzEnrolmentLeavingReasonUid; _entity.clazzEnrolmentOutcome = tmp_clazzEnrolmentOutcome; _entity.clazzEnrolmentLocalChangeSeqNum = tmp_clazzEnrolmentLocalChangeSeqNum; _entity.clazzEnrolmentMasterChangeSeqNum = tmp_clazzEnrolmentMasterChangeSeqNum; _entity.clazzEnrolmentLastChangedBy = tmp_clazzEnrolmentLastChangedBy; _entity.clazzEnrolmentLct = tmp_clazzEnrolmentLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzEnrolment) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ClazzEnrolment'), ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(closure$active_0, closure$changeTime_0, closure$personUid_0, closure$clazzUid_0, closure$roleId_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$roleId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return this.local$closure$_result.v = _numUpdates, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(closure$active_0, closure$changeTime_0, closure$personUid_0, closure$clazzUid_0, closure$roleId_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(closure$active_0, closure$changeTime_0, closure$personUid_0, closure$clazzUid_0, closure$roleId_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$($this, personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; this.local$roleId = roleId_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.prototype.constructor = Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$; Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment\n | SET clazzEnrolmentActive = ?,\n | clazzEnrolmentLct= ?\n | WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentRole = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzEnrolment\n | SET clazzEnrolmentActive = ?,\n | clazzEnrolmentLct= ?\n | WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentRole = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(this.local$active, this.local$changeTime, this.local$personUid, this.local$clazzUid, this.local$roleId, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$ = function (personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$(this, personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral(this$ClazzEnrolmentDao_JdbcKt, closure$clazzUid, closure$accountPersonUid, closure$roleId, closure$filter, closure$currentTime, closure$searchText, closure$sortOrder) { this.this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$roleId = closure$roleId; this.closure$filter = closure$filter; this.closure$currentTime = closure$currentTime; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_attendance = _resultSet.getFloat_61zpoe$('attendance'); var tmp_earliestJoinDate = _resultSet.getLong_61zpoe$('earliestJoinDate'); var tmp_latestDateLeft = _resultSet.getLong_61zpoe$('latestDateLeft'); var tmp_enrolmentRole = _resultSet.getInt_61zpoe$('enrolmentRole'); var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new PersonWithClazzEnrolmentDetails(); _entity.attendance = tmp_attendance; _entity.earliestJoinDate = tmp_earliestJoinDate; _entity.latestDateLeft = tmp_latestDateLeft; _entity.enrolmentRole = tmp_enrolmentRole; _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$roleId); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$currentTime); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Person.*, \n | (SELECT ((CAST(COUNT(DISTINCT \n | CASE WHEN ClazzLogAttendanceRecord.attendanceStatus = 1 \n | THEN ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid \n | ELSE NULL \n | END) \n | AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord \n | JOIN ClazzLog \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid \n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid \n | AND ClazzLog.clazzLogClazzUid = ?) AS attendance, \n | \n | \t (SELECT MIN(ClazzEnrolment.clazzEnrolmentDateJoined) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS earliestJoinDate, \n | \n | \t (SELECT MAX(ClazzEnrolment.clazzEnrolmentDateLeft) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS latestDateLeft, \n | \n | (SELECT clazzEnrolmentRole \n | FROM clazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid \n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive) AS enrolmentRole\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND Person.personUid IN (SELECT clazzEnrolmentPersonUid \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND ClazzEnrolment.clazzEnrolmentRole = ? \n | AND (? != 1 \n | OR (? \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft))) \n | AND Person.firstNames || ' ' || Person.lastName LIKE ?\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN attendance\n | WHEN 7 THEN earliestJoinDate\n | WHEN 9 THEN latestDateLeft\n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 THEN attendance\n | WHEN 8 THEN earliestJoinDate\n | WHEN 10 THEN latestDateLeft\n | ELSE 0\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT Person.*, \n | (SELECT ((CAST(COUNT(DISTINCT \n | CASE WHEN ClazzLogAttendanceRecord.attendanceStatus = 1 \n | THEN ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid \n | ELSE NULL \n | END) \n | AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord \n | JOIN ClazzLog \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid \n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid \n | AND ClazzLog.clazzLogClazzUid = ?) AS attendance, \n | \n | \t (SELECT MIN(ClazzEnrolment.clazzEnrolmentDateJoined) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS earliestJoinDate, \n | \n | \t (SELECT MAX(ClazzEnrolment.clazzEnrolmentDateLeft) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS latestDateLeft, \n | \n | (SELECT clazzEnrolmentRole \n | FROM clazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid \n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive) AS enrolmentRole\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND Person.personUid IN (SELECT clazzEnrolmentPersonUid \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND ClazzEnrolment.clazzEnrolmentRole = ? \n | AND (? != 1 \n | OR (? \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft))) \n | AND Person.firstNames || ' ' || Person.lastName LIKE ?\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN attendance\n | WHEN 7 THEN earliestJoinDate\n | WHEN 9 THEN latestDateLeft\n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 THEN attendance\n | WHEN 8 THEN earliestJoinDate\n | WHEN 10 THEN latestDateLeft\n | ELSE 0\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$accountPersonUid, this.local$closure$roleId, this.local$closure$filter, this.local$closure$currentTime, this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['Clazz', 'Person', 'ClazzEnrolment', 'PersonGroupMember', 'ScopedGrant']), ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$clazzUid, this.closure$accountPersonUid, this.closure$roleId, this.closure$filter, this.closure$currentTime, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$roleId); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$currentTime); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Person.*, \n | (SELECT ((CAST(COUNT(DISTINCT \n | CASE WHEN ClazzLogAttendanceRecord.attendanceStatus = 1 \n | THEN ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid \n | ELSE NULL \n | END) \n | AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord \n | JOIN ClazzLog \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid \n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid \n | AND ClazzLog.clazzLogClazzUid = ?) AS attendance, \n | \n | \t (SELECT MIN(ClazzEnrolment.clazzEnrolmentDateJoined) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS earliestJoinDate, \n | \n | \t (SELECT MAX(ClazzEnrolment.clazzEnrolmentDateLeft) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS latestDateLeft, \n | \n | (SELECT clazzEnrolmentRole \n | FROM clazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid \n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive) AS enrolmentRole\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND Person.personUid IN (SELECT clazzEnrolmentPersonUid \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND ClazzEnrolment.clazzEnrolmentRole = ? \n | AND (? != 1 \n | OR (? \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft))) \n | AND Person.firstNames || ' ' || Person.lastName LIKE ?\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN attendance\n | WHEN 7 THEN earliestJoinDate\n | WHEN 9 THEN latestDateLeft\n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 THEN attendance\n | WHEN 8 THEN earliestJoinDate\n | WHEN 10 THEN latestDateLeft\n | ELSE 0\n | END DESC\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Person.*, \n | (SELECT ((CAST(COUNT(DISTINCT \n | CASE WHEN ClazzLogAttendanceRecord.attendanceStatus = 1 \n | THEN ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid \n | ELSE NULL \n | END) \n | AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord \n | JOIN ClazzLog \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid \n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid \n | AND ClazzLog.clazzLogClazzUid = ?) AS attendance, \n | \n | \t (SELECT MIN(ClazzEnrolment.clazzEnrolmentDateJoined) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS earliestJoinDate, \n | \n | \t (SELECT MAX(ClazzEnrolment.clazzEnrolmentDateLeft) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS latestDateLeft, \n | \n | (SELECT clazzEnrolmentRole \n | FROM clazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid \n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive) AS enrolmentRole\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND Person.personUid IN (SELECT clazzEnrolmentPersonUid \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND ClazzEnrolment.clazzEnrolmentRole = ? \n | AND (? != 1 \n | OR (? \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft))) \n | AND Person.firstNames || ' ' || Person.lastName LIKE ?\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN attendance\n | WHEN 7 THEN earliestJoinDate\n | WHEN 9 THEN latestDateLeft\n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 THEN attendance\n | WHEN 8 THEN earliestJoinDate\n | WHEN 10 THEN latestDateLeft\n | ELSE 0\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$closure$accountPersonUid, this.local$closure$roleId, this.local$closure$filter, this.local$closure$currentTime, this.local$closure$searchText, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['Clazz', 'Person', 'ClazzEnrolment', 'PersonGroupMember', 'ScopedGrant']), ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$clazzUid, this.closure$accountPersonUid, this.closure$roleId, this.closure$filter, this.closure$currentTime, this.closure$searchText, this.closure$sortOrder)); }; ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzEnrolmentDao_JdbcKt.prototype.findByClazzUidAndRole_i7yiqk$$default = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) { var _result = new ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral(this, clazzUid, accountPersonUid, roleId, filter, currentTime, searchText, sortOrder); return _result; }; function ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForClazzEnrolment$lambda(closure$enrolled, closure$timeChanged, closure$clazzEnrolmentUid, closure$_result) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$enrolled); _stmt.setLong_6svq3l$(2, closure$timeChanged); _stmt.setLong_6svq3l$(3, closure$clazzEnrolmentUid); var _numUpdates = _stmt.executeUpdate(); closure$_result.v = _numUpdates; return Unit; }; } ClazzEnrolmentDao_JdbcKt.prototype.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$ = function (clazzEnrolmentUid, enrolled, timeChanged) { var _result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentActive = ?,\n | clazzEnrolmentLct = ?\n | WHERE clazzEnrolmentUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentActive = ?,\n | clazzEnrolmentLct = ?\n | WHERE clazzEnrolmentUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForClazzEnrolment$lambda(enrolled, timeChanged, clazzEnrolmentUid, _result)); return _result.v; }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(closure$newRole_0, closure$updateTime_0, closure$personUid_0, closure$clazzUid_0, closure$oldRole_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newRole = closure$newRole_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$oldRole = closure$oldRole_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newRole); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$oldRole); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return this.local$closure$_result.v = _numUpdates, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(closure$newRole_0, closure$updateTime_0, closure$personUid_0, closure$clazzUid_0, closure$oldRole_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(closure$newRole_0, closure$updateTime_0, closure$personUid_0, closure$clazzUid_0, closure$oldRole_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateClazzEnrolmentRole_d2c2sj$($this, personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; this.local$newRole = newRole_0; this.local$oldRole = oldRole_0; this.local$updateTime = updateTime_0; } Coroutine$updateClazzEnrolmentRole_d2c2sj$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzEnrolmentRole_d2c2sj$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzEnrolmentRole_d2c2sj$.prototype.constructor = Coroutine$updateClazzEnrolmentRole_d2c2sj$; Coroutine$updateClazzEnrolmentRole_d2c2sj$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentRole = ?,\n | clazzEnrolmentLct = ? \n | -- Avoid potential for duplicate approvals if user was previously refused \n | WHERE clazzEnrolmentUid = COALESCE( \n | (SELECT clazzEnrolmentUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentRole = ?\n | AND CAST(clazzEnrolmentActive AS INTEGER) = 1\n | LIMIT 1), 0)\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentRole = ?,\n | clazzEnrolmentLct = ? \n | -- Avoid potential for duplicate approvals if user was previously refused \n | WHERE clazzEnrolmentUid = COALESCE( \n | (SELECT clazzEnrolmentUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentRole = ?\n | AND CAST(clazzEnrolmentActive AS INTEGER) = 1\n | LIMIT 1), 0)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(this.local$newRole, this.local$updateTime, this.local$personUid, this.local$clazzUid, this.local$oldRole, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.updateClazzEnrolmentRole_d2c2sj$ = function (personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzEnrolmentRole_d2c2sj$(this, personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzEnrolment_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_22($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_22.prototype.constructor = Coroutine$insertAsync_22; Coroutine$insertAsync_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzEnrolment_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_22(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzEnrolment_.insertList_4ezy5m$(entityList); }; function ClazzEnrolmentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.clazzEnrolmentPersonUid); _stmt.setLong_6svq3l$(2, _entity.clazzEnrolmentClazzUid); _stmt.setLong_6svq3l$(3, _entity.clazzEnrolmentDateJoined); _stmt.setLong_6svq3l$(4, _entity.clazzEnrolmentDateLeft); _stmt.setInt_vux9f0$(5, _entity.clazzEnrolmentRole); _stmt.setFloat_24o109$(6, _entity.clazzEnrolmentAttendancePercentage); _stmt.setBoolean_fzusl$(7, _entity.clazzEnrolmentActive); _stmt.setLong_6svq3l$(8, _entity.clazzEnrolmentLeavingReasonUid); _stmt.setInt_vux9f0$(9, _entity.clazzEnrolmentOutcome); _stmt.setLong_6svq3l$(10, _entity.clazzEnrolmentLocalChangeSeqNum); _stmt.setLong_6svq3l$(11, _entity.clazzEnrolmentMasterChangeSeqNum); _stmt.setInt_vux9f0$(12, _entity.clazzEnrolmentLastChangedBy); _stmt.setLong_6svq3l$(13, _entity.clazzEnrolmentLct); _stmt.setLong_6svq3l$(14, _entity.clazzEnrolmentUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzEnrolmentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzEnrolment SET clazzEnrolmentPersonUid = ?, clazzEnrolmentClazzUid = ?, clazzEnrolmentDateJoined = ?, clazzEnrolmentDateLeft = ?, clazzEnrolmentRole = ?, clazzEnrolmentAttendancePercentage = ?, clazzEnrolmentActive = ?, clazzEnrolmentLeavingReasonUid = ?, clazzEnrolmentOutcome = ?, clazzEnrolmentLocalChangeSeqNum = ?, clazzEnrolmentMasterChangeSeqNum = ?, clazzEnrolmentLastChangedBy = ?, clazzEnrolmentLct = ? WHERE clazzEnrolmentUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzEnrolmentDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzEnrolmentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.clazzEnrolmentPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.clazzEnrolmentClazzUid); _stmt.setLong_6svq3l$(3, closure$entity.clazzEnrolmentDateJoined); _stmt.setLong_6svq3l$(4, closure$entity.clazzEnrolmentDateLeft); _stmt.setInt_vux9f0$(5, closure$entity.clazzEnrolmentRole); _stmt.setFloat_24o109$(6, closure$entity.clazzEnrolmentAttendancePercentage); _stmt.setBoolean_fzusl$(7, closure$entity.clazzEnrolmentActive); _stmt.setLong_6svq3l$(8, closure$entity.clazzEnrolmentLeavingReasonUid); _stmt.setInt_vux9f0$(9, closure$entity.clazzEnrolmentOutcome); _stmt.setLong_6svq3l$(10, closure$entity.clazzEnrolmentLocalChangeSeqNum); _stmt.setLong_6svq3l$(11, closure$entity.clazzEnrolmentMasterChangeSeqNum); _stmt.setInt_vux9f0$(12, closure$entity.clazzEnrolmentLastChangedBy); _stmt.setLong_6svq3l$(13, closure$entity.clazzEnrolmentLct); _stmt.setLong_6svq3l$(14, closure$entity.clazzEnrolmentUid); return _stmt.executeUpdate(); }; } ClazzEnrolmentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzEnrolment SET clazzEnrolmentPersonUid = ?, clazzEnrolmentClazzUid = ?, clazzEnrolmentDateJoined = ?, clazzEnrolmentDateLeft = ?, clazzEnrolmentRole = ?, clazzEnrolmentAttendancePercentage = ?, clazzEnrolmentActive = ?, clazzEnrolmentLeavingReasonUid = ?, clazzEnrolmentOutcome = ?, clazzEnrolmentLocalChangeSeqNum = ?, clazzEnrolmentMasterChangeSeqNum = ?, clazzEnrolmentLastChangedBy = ?, clazzEnrolmentLct = ? WHERE clazzEnrolmentUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzEnrolmentDao_JdbcKt$update$lambda(entity)); }; function ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzEnrolment (clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING clazzEnrolmentUid'; } else tmp$ = ''; return "INSERT INTO ClazzEnrolment (clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES(COALESCE(?,nextval('ClazzEnrolment_clazzEnrolmentUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzEnrolmentUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzEnrolmentUid); } stmt.setLong_6svq3l$(2, entity.clazzEnrolmentPersonUid); stmt.setLong_6svq3l$(3, entity.clazzEnrolmentClazzUid); stmt.setLong_6svq3l$(4, entity.clazzEnrolmentDateJoined); stmt.setLong_6svq3l$(5, entity.clazzEnrolmentDateLeft); stmt.setInt_vux9f0$(6, entity.clazzEnrolmentRole); stmt.setFloat_24o109$(7, entity.clazzEnrolmentAttendancePercentage); stmt.setBoolean_fzusl$(8, entity.clazzEnrolmentActive); stmt.setLong_6svq3l$(9, entity.clazzEnrolmentLeavingReasonUid); stmt.setInt_vux9f0$(10, entity.clazzEnrolmentOutcome); stmt.setLong_6svq3l$(11, entity.clazzEnrolmentLocalChangeSeqNum); stmt.setLong_6svq3l$(12, entity.clazzEnrolmentMasterChangeSeqNum); stmt.setInt_vux9f0$(13, entity.clazzEnrolmentLastChangedBy); stmt.setLong_6svq3l$(14, entity.clazzEnrolmentLct); }; ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzEnrolmentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao_JdbcKt', interfaces: [ClazzEnrolmentDao]}; function ClazzEnrolmentDao_ReplicateWrapper(_db, _dao) { ClazzEnrolmentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_24($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_24.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_24; Coroutine$replicateOnNewNode_s8cxhz$_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_24(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateClazzEnrolmentOnChange_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateClazzEnrolmentOnChange_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateClazzEnrolmentOnChange_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateClazzEnrolmentOnChange_0.prototype.constructor = Coroutine$replicateClazzEnrolmentOnChange_0; Coroutine$replicateClazzEnrolmentOnChange_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateClazzEnrolmentOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.replicateClazzEnrolmentOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateClazzEnrolmentOnChange_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insertListAsync_9f9sqv$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByPersonUidAndClazzUidAsync_3pjtqy$ = function (personUid, clazzUid, continuation) { return this._dao_0.findByPersonUidAndClazzUidAsync_3pjtqy$(personUid, clazzUid, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$ = function (personUid, clazzUid) { return this._dao_0.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$(personUid, clazzUid); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findEnrolmentWithLeavingReason_s8cxhz$ = function (enrolmentUid, continuation) { return this._dao_0.findEnrolmentWithLeavingReason_s8cxhz$(enrolmentUid, continuation); }; function Coroutine$updateDateLeftByUid_b9bd0d$_0($this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzEnrolmentUid = clazzEnrolmentUid_0; this.local$endDate = endDate_0; this.local$updateTime = updateTime_0; } Coroutine$updateDateLeftByUid_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDateLeftByUid_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDateLeftByUid_b9bd0d$_0.prototype.constructor = Coroutine$updateDateLeftByUid_b9bd0d$_0; Coroutine$updateDateLeftByUid_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateDateLeftByUid_b9bd0d$(this.local$clazzEnrolmentUid, this.local$endDate, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateDateLeftByUid_b9bd0d$ = function (clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateDateLeftByUid_b9bd0d$_0(this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateAsync_95p8s2$ = function (entity, continuation) { entity.clazzEnrolmentLct = systemTimeInMillis(); return this._dao_0.updateAsync_95p8s2$(entity, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findAllClazzesByPersonWithClazz_s8cxhz$ = function (personUid) { return this._dao_0.findAllClazzesByPersonWithClazz_s8cxhz$(personUid); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findMaxEndDateForEnrolment_b9bd0d$ = function (selectedClazz, selectedPerson, selectedEnrolment, continuation) { return this._dao_0.findMaxEndDateForEnrolment_b9bd0d$(selectedClazz, selectedPerson, selectedEnrolment, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$(personUid, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default = function (clazzUid, date, roleFilter, personUidFilter, continuation) { return this._dao_0.getAllClazzEnrolledAtTimeAsync_6qtc6d$(clazzUid, date, roleFilter, personUidFilter, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUid_s8cxhz$(uid, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$ = function (personUid, clazzUid, roleId, active, changeTime, continuation) { return this._dao_0.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$(personUid, clazzUid, roleId, active, changeTime, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByClazzUidAndRole_i7yiqk$$default = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) { return this._dao_0.findByClazzUidAndRole_i7yiqk$(clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$ = function (clazzEnrolmentUid, enrolled, timeChanged) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateClazzEnrolmentRole_d2c2sj$ = function (personUid, clazzUid, newRole, oldRole, updateTime, continuation) { return this._dao_0.updateClazzEnrolmentRole_d2c2sj$(personUid, clazzUid, newRole, oldRole, updateTime, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_23($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_23.prototype.constructor = Coroutine$insertAsync_23; Coroutine$insertAsync_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzEnrolmentUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(65, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzEnrolmentUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzEnrolmentLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzEnrolmentUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_23(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao_ReplicateWrapper', interfaces: [ClazzEnrolmentDao]}; function ClazzEnrolmentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzEnrolmentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_25($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_25.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_25; Coroutine$replicateOnNewNode_s8cxhz$_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_25(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateClazzEnrolmentOnChange_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateClazzEnrolmentOnChange_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateClazzEnrolmentOnChange_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateClazzEnrolmentOnChange_1.prototype.constructor = Coroutine$replicateClazzEnrolmentOnChange_1; Coroutine$replicateClazzEnrolmentOnChange_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateClazzEnrolmentOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.replicateClazzEnrolmentOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateClazzEnrolmentOnChange_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.insertListAsync_9f9sqv$ = function (entityList) { this._dao.insertListAsync_9f9sqv$(entityList); }; function Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0($this, personUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0.prototype.constructor = Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0; Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUidAndClazzUidAsync_3pjtqy$(this.local$personUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findByPersonUidAndClazzUidAsync_3pjtqy$ = function (personUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$_0(this, personUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$ = function (personUid, clazzUid) { var _result = this._dao.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$(personUid, clazzUid); return _result; }; function Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0($this, enrolmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$enrolmentUid = enrolmentUid_0; } Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0.prototype.constructor = Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0; Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEnrolmentWithLeavingReason_s8cxhz$(this.local$enrolmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findEnrolmentWithLeavingReason_s8cxhz$ = function (enrolmentUid_0, continuation_0, suspended) { var instance = new Coroutine$findEnrolmentWithLeavingReason_s8cxhz$_0(this, enrolmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateDateLeftByUid_b9bd0d$_1($this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzEnrolmentUid = clazzEnrolmentUid_0; this.local$endDate = endDate_0; this.local$updateTime = updateTime_0; } Coroutine$updateDateLeftByUid_b9bd0d$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDateLeftByUid_b9bd0d$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDateLeftByUid_b9bd0d$_1.prototype.constructor = Coroutine$updateDateLeftByUid_b9bd0d$_1; Coroutine$updateDateLeftByUid_b9bd0d$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateDateLeftByUid_b9bd0d$(this.local$clazzEnrolmentUid, this.local$endDate, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateDateLeftByUid_b9bd0d$ = function (clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateDateLeftByUid_b9bd0d$_1(this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_95p8s2$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_95p8s2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_95p8s2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_95p8s2$_0.prototype.constructor = Coroutine$updateAsync_95p8s2$_0; Coroutine$updateAsync_95p8s2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_95p8s2$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateAsync_95p8s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_95p8s2$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findAllClazzesByPersonWithClazz_s8cxhz$ = function (personUid) { var _result = this._dao.findAllClazzesByPersonWithClazz_s8cxhz$(personUid); return _result; }; function Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0($this, selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$selectedClazz = selectedClazz_0; this.local$selectedPerson = selectedPerson_0; this.local$selectedEnrolment = selectedEnrolment_0; } Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0.prototype.constructor = Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0; Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findMaxEndDateForEnrolment_b9bd0d$(this.local$selectedClazz, this.local$selectedPerson, this.local$selectedEnrolment, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findMaxEndDateForEnrolment_b9bd0d$ = function (selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0, suspended) { var instance = new Coroutine$findMaxEndDateForEnrolment_b9bd0d$_0(this, selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0.prototype.constructor = Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0; Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$_0(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0($this, clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$date = date_0; this.local$roleFilter = roleFilter_0; this.local$personUidFilter = personUidFilter_0; } Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0.prototype.constructor = Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0; Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getAllClazzEnrolledAtTimeAsync_6qtc6d$(this.local$clazzUid, this.local$date, this.local$roleFilter, this.local$personUidFilter, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default = function (clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0, suspended) { var instance = new Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default_0(this, clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_0.prototype.constructor = Coroutine$findByUid_s8cxhz$_0; Coroutine$findByUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0($this, personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; this.local$roleId = roleId_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0.prototype.constructor = Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0; Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$(this.local$personUid, this.local$clazzUid, this.local$roleId, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$ = function (personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$_0(this, personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findByClazzUidAndRole_i7yiqk$$default = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) { var _result = this._dao.findByClazzUidAndRole_i7yiqk$(clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime); return _result; }; ClazzEnrolmentDao_Repo.prototype.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$ = function (clazzEnrolmentUid, enrolled, timeChanged) { var _result = this._dao.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$(clazzEnrolmentUid, enrolled, timeChanged); return _result; }; function Coroutine$updateClazzEnrolmentRole_d2c2sj$_0($this, personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; this.local$newRole = newRole_0; this.local$oldRole = oldRole_0; this.local$updateTime = updateTime_0; } Coroutine$updateClazzEnrolmentRole_d2c2sj$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzEnrolmentRole_d2c2sj$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzEnrolmentRole_d2c2sj$_0.prototype.constructor = Coroutine$updateClazzEnrolmentRole_d2c2sj$_0; Coroutine$updateClazzEnrolmentRole_d2c2sj$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateClazzEnrolmentRole_d2c2sj$(this.local$personUid, this.local$clazzUid, this.local$newRole, this.local$oldRole, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateClazzEnrolmentRole_d2c2sj$ = function (personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzEnrolmentRole_d2c2sj$_0(this, personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_24($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_24.prototype.constructor = Coroutine$insertAsync_24; Coroutine$insertAsync_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_24(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzEnrolmentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzEnrolmentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzEnrolmentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao_Repo', interfaces: [ClazzEnrolmentDao]}; function ClazzLogAttendanceRecordDao_JdbcKt(_db) { ClazzLogAttendanceRecordDao.call(this); this._db = _db; this._insertAdapterClazzLogAttendanceRecord_ = new ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral(this._db); } function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_26($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_26.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_26; Coroutine$replicateOnNewNode_s8cxhz$_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | ? AS clarDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2048 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | JOIN ClazzLogAttendanceRecord \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid\n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = ?), 0) \n | /*psql ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | ? AS clarDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2048 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | JOIN ClazzLogAttendanceRecord \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid\n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = ?), 0) \n | ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_26(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_23($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_23.prototype.constructor = Coroutine$replicateOnChange_23; Coroutine$replicateOnChange_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | UserSession.usClientNodeId AS clarDestination\n | FROM ChangeLog\n | JOIN ClazzLogAttendanceRecord \n | ON ChangeLog.chTableId = 15 \n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid = ChangeLog.chEntityPk\n | JOIN ClazzLog\n | ON ClazzLog.clazzLogUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | UserSession.usClientNodeId AS clarDestination\n | FROM ChangeLog\n | JOIN ClazzLogAttendanceRecord \n | ON ChangeLog.chTableId = 15 \n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid = ChangeLog.chEntityPk\n | JOIN ClazzLog\n | ON ClazzLog.clazzLogUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_23(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_7quahr$($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$insertListAsync_7quahr$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7quahr$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7quahr$.prototype.constructor = Coroutine$insertListAsync_7quahr$; Coroutine$insertListAsync_7quahr$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzLogAttendanceRecord_.insertListAsync_4ezy5m$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insertListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7quahr$(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzLogAttendanceRecordUid = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordUid'); var tmp_clazzLogAttendanceRecordClazzLogUid = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordClazzLogUid'); var tmp_clazzLogAttendanceRecordPersonUid = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordPersonUid'); var tmp_attendanceStatus = _resultSet.getInt_61zpoe$('attendanceStatus'); var tmp_clazzLogAttendanceRecordMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordMasterChangeSeqNum'); var tmp_clazzLogAttendanceRecordLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordLocalChangeSeqNum'); var tmp_clazzLogAttendanceRecordLastChangedBy = _resultSet.getInt_61zpoe$('clazzLogAttendanceRecordLastChangedBy'); var tmp_clazzLogAttendanceRecordLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordLastChangedTime'); var _entity = new ClazzLogAttendanceRecord(); _entity.clazzLogAttendanceRecordUid = tmp_clazzLogAttendanceRecordUid; _entity.clazzLogAttendanceRecordClazzLogUid = tmp_clazzLogAttendanceRecordClazzLogUid; _entity.clazzLogAttendanceRecordPersonUid = tmp_clazzLogAttendanceRecordPersonUid; _entity.attendanceStatus = tmp_attendanceStatus; _entity.clazzLogAttendanceRecordMasterChangeSeqNum = tmp_clazzLogAttendanceRecordMasterChangeSeqNum; _entity.clazzLogAttendanceRecordLocalChangeSeqNum = tmp_clazzLogAttendanceRecordLocalChangeSeqNum; _entity.clazzLogAttendanceRecordLastChangedBy = tmp_clazzLogAttendanceRecordLastChangedBy; _entity.clazzLogAttendanceRecordLastChangedTime = tmp_clazzLogAttendanceRecordLastChangedTime; closure$_result.v = _entity; }return Unit; }; } function ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzLogAttendanceRecord) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from ClazzLogAttendanceRecord WHERE clazzLogAttendanceRecordUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * from ClazzLogAttendanceRecord WHERE clazzLogAttendanceRecordUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(closure$entities_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entities = closure$entities_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entities.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.clazzLogAttendanceRecordClazzLogUid); this.local$_stmt.setLong_6svq3l$(2, _entity.clazzLogAttendanceRecordPersonUid); this.local$_stmt.setInt_vux9f0$(3, _entity.attendanceStatus); this.local$_stmt.setLong_6svq3l$(4, _entity.clazzLogAttendanceRecordMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(5, _entity.clazzLogAttendanceRecordLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(6, _entity.clazzLogAttendanceRecordLastChangedBy); this.local$_stmt.setLong_6svq3l$(7, _entity.clazzLogAttendanceRecordLastChangedTime); this.local$_stmt.setLong_6svq3l$(8, _entity.clazzLogAttendanceRecordUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(closure$entities_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(closure$entities_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_7quahr$($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$updateListAsync_7quahr$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_7quahr$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_7quahr$.prototype.constructor = Coroutine$updateListAsync_7quahr$; Coroutine$updateListAsync_7quahr$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordClazzLogUid = ?, clazzLogAttendanceRecordPersonUid = ?, attendanceStatus = ?, clazzLogAttendanceRecordMasterChangeSeqNum = ?, clazzLogAttendanceRecordLocalChangeSeqNum = ?, clazzLogAttendanceRecordLastChangedBy = ?, clazzLogAttendanceRecordLastChangedTime = ? WHERE clazzLogAttendanceRecordUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(this.local$entities), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.updateListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_7quahr$(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogAttendanceRecordUid = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordUid'); var tmp_clazzLogAttendanceRecordClazzLogUid = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordClazzLogUid'); var tmp_clazzLogAttendanceRecordPersonUid = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordPersonUid'); var tmp_attendanceStatus = _resultSet.getInt_61zpoe$('attendanceStatus'); var tmp_clazzLogAttendanceRecordMasterChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordMasterChangeSeqNum'); var tmp_clazzLogAttendanceRecordLocalChangeSeqNum = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordLocalChangeSeqNum'); var tmp_clazzLogAttendanceRecordLastChangedBy = _resultSet.getInt_61zpoe$('clazzLogAttendanceRecordLastChangedBy'); var tmp_clazzLogAttendanceRecordLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogAttendanceRecordLastChangedTime'); var _entity = new ClazzLogAttendanceRecordWithPerson(); _entity.clazzLogAttendanceRecordUid = tmp_clazzLogAttendanceRecordUid; _entity.clazzLogAttendanceRecordClazzLogUid = tmp_clazzLogAttendanceRecordClazzLogUid; _entity.clazzLogAttendanceRecordPersonUid = tmp_clazzLogAttendanceRecordPersonUid; _entity.attendanceStatus = tmp_attendanceStatus; _entity.clazzLogAttendanceRecordMasterChangeSeqNum = tmp_clazzLogAttendanceRecordMasterChangeSeqNum; _entity.clazzLogAttendanceRecordLocalChangeSeqNum = tmp_clazzLogAttendanceRecordLocalChangeSeqNum; _entity.clazzLogAttendanceRecordLastChangedBy = tmp_clazzLogAttendanceRecordLastChangedBy; _entity.clazzLogAttendanceRecordLastChangedTime = tmp_clazzLogAttendanceRecordLastChangedTime; var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(closure$clazzLogUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzLogUid = closure$clazzLogUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzLogUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(closure$clazzLogUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(closure$clazzLogUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByClazzLogUid_s8cxhz$($this, clazzLogUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzLogUid = clazzLogUid_0; } Coroutine$findByClazzLogUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzLogUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzLogUid_s8cxhz$.prototype.constructor = Coroutine$findByClazzLogUid_s8cxhz$; Coroutine$findByClazzLogUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLogAttendanceRecord.*, Person.*\n | FROM ClazzLogAttendanceRecord \n | LEFT JOIN Person ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid\n | WHERE clazzLogAttendanceRecordClazzLogUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzLogAttendanceRecord.*, Person.*\n | FROM ClazzLogAttendanceRecord \n | LEFT JOIN Person ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid\n | WHERE clazzLogAttendanceRecordClazzLogUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(this.local$clazzLogUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.findByClazzLogUid_s8cxhz$ = function (clazzLogUid_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzLogUid_s8cxhz$(this, clazzLogUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogAttendanceRecordDao_JdbcKt$updateRescheduledClazzLogUids$lambda(closure$newClazzLogUid, closure$changedTime, closure$oldClazzLogUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$newClazzLogUid); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$oldClazzLogUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.updateRescheduledClazzLogUids_b9bd0d$ = function (oldClazzLogUid, newClazzLogUid, changedTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzLogAttendanceRecord\n | SET clazzLogAttendanceRecordClazzLogUid = ?,\n | clazzLogAttendanceRecordLastChangedTime = ?\n | WHERE clazzLogAttendanceRecordClazzLogUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ClazzLogAttendanceRecord\n | SET clazzLogAttendanceRecordClazzLogUid = ?,\n | clazzLogAttendanceRecordLastChangedTime = ?\n | WHERE clazzLogAttendanceRecordClazzLogUid = ?\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzLogAttendanceRecordDao_JdbcKt$updateRescheduledClazzLogUids$lambda(newClazzLogUid, changedTime, oldClazzLogUid)); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzLogAttendanceRecord_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_25($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_25.prototype.constructor = Coroutine$insertAsync_25; Coroutine$insertAsync_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzLogAttendanceRecord_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_25(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzLogAttendanceRecord_.insertList_4ezy5m$(entityList); }; function ClazzLogAttendanceRecordDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.clazzLogAttendanceRecordClazzLogUid); _stmt.setLong_6svq3l$(2, _entity.clazzLogAttendanceRecordPersonUid); _stmt.setInt_vux9f0$(3, _entity.attendanceStatus); _stmt.setLong_6svq3l$(4, _entity.clazzLogAttendanceRecordMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.clazzLogAttendanceRecordLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.clazzLogAttendanceRecordLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.clazzLogAttendanceRecordLastChangedTime); _stmt.setLong_6svq3l$(8, _entity.clazzLogAttendanceRecordUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordClazzLogUid = ?, clazzLogAttendanceRecordPersonUid = ?, attendanceStatus = ?, clazzLogAttendanceRecordMasterChangeSeqNum = ?, clazzLogAttendanceRecordLocalChangeSeqNum = ?, clazzLogAttendanceRecordLastChangedBy = ?, clazzLogAttendanceRecordLastChangedTime = ? WHERE clazzLogAttendanceRecordUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzLogAttendanceRecordDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzLogAttendanceRecordDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.clazzLogAttendanceRecordClazzLogUid); _stmt.setLong_6svq3l$(2, closure$entity.clazzLogAttendanceRecordPersonUid); _stmt.setInt_vux9f0$(3, closure$entity.attendanceStatus); _stmt.setLong_6svq3l$(4, closure$entity.clazzLogAttendanceRecordMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.clazzLogAttendanceRecordLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.clazzLogAttendanceRecordLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.clazzLogAttendanceRecordLastChangedTime); _stmt.setLong_6svq3l$(8, closure$entity.clazzLogAttendanceRecordUid); return _stmt.executeUpdate(); }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordClazzLogUid = ?, clazzLogAttendanceRecordPersonUid = ?, attendanceStatus = ?, clazzLogAttendanceRecordMasterChangeSeqNum = ?, clazzLogAttendanceRecordLocalChangeSeqNum = ?, clazzLogAttendanceRecordLastChangedBy = ?, clazzLogAttendanceRecordLastChangedTime = ? WHERE clazzLogAttendanceRecordUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzLogAttendanceRecordDao_JdbcKt$update$lambda(entity)); }; function ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzLogAttendanceRecord (clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING clazzLogAttendanceRecordUid'; } else tmp$ = ''; return "INSERT INTO ClazzLogAttendanceRecord (clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES(COALESCE(?,nextval('ClazzLogAttendanceRecord_clazzLogAttendanceRecordUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzLogAttendanceRecordUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzLogAttendanceRecordUid); } stmt.setLong_6svq3l$(2, entity.clazzLogAttendanceRecordClazzLogUid); stmt.setLong_6svq3l$(3, entity.clazzLogAttendanceRecordPersonUid); stmt.setInt_vux9f0$(4, entity.attendanceStatus); stmt.setLong_6svq3l$(5, entity.clazzLogAttendanceRecordMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.clazzLogAttendanceRecordLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.clazzLogAttendanceRecordLastChangedBy); stmt.setLong_6svq3l$(8, entity.clazzLogAttendanceRecordLastChangedTime); }; ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzLogAttendanceRecordDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao_JdbcKt', interfaces: [ClazzLogAttendanceRecordDao]}; function ClazzLogAttendanceRecordDao_ReplicateWrapper(_db, _dao) { ClazzLogAttendanceRecordDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_27($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_27.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_27; Coroutine$replicateOnNewNode_s8cxhz$_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_27(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_24($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_24.prototype.constructor = Coroutine$replicateOnChange_24; Coroutine$replicateOnChange_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_24(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_7quahr$_0($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entities = entities_0; } Coroutine$insertListAsync_7quahr$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7quahr$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7quahr$_0.prototype.constructor = Coroutine$insertListAsync_7quahr$_0; Coroutine$insertListAsync_7quahr$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entities.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.clazzLogAttendanceRecordUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(15, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.clazzLogAttendanceRecordUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.clazzLogAttendanceRecordLastChangedTime = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insertListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7quahr$_0(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateListAsync_7quahr$_0($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$updateListAsync_7quahr$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_7quahr$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_7quahr$_0.prototype.constructor = Coroutine$updateListAsync_7quahr$_0; Coroutine$updateListAsync_7quahr$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entities.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.clazzLogAttendanceRecordLastChangedTime = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.updateListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_7quahr$_0(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.findByClazzLogUid_s8cxhz$ = function (clazzLogUid, continuation) { return this._dao_0.findByClazzLogUid_s8cxhz$(clazzLogUid, continuation); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.updateRescheduledClazzLogUids_b9bd0d$ = function (oldClazzLogUid, newClazzLogUid, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_26($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_26.prototype.constructor = Coroutine$insertAsync_26; Coroutine$insertAsync_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzLogAttendanceRecordUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(15, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzLogAttendanceRecordUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzLogAttendanceRecordLastChangedTime = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzLogAttendanceRecordUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_26(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao_ReplicateWrapper', interfaces: [ClazzLogAttendanceRecordDao]}; function ClazzLogAttendanceRecordDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzLogAttendanceRecordDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_28($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_28.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_28; Coroutine$replicateOnNewNode_s8cxhz$_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_28(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_25($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_25.prototype.constructor = Coroutine$replicateOnChange_25; Coroutine$replicateOnChange_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_25(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_7quahr$_1($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$insertListAsync_7quahr$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7quahr$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7quahr$_1.prototype.constructor = Coroutine$insertListAsync_7quahr$_1; Coroutine$insertListAsync_7quahr$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.insertListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7quahr$_1(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$updateListAsync_7quahr$_1($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$updateListAsync_7quahr$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_7quahr$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_7quahr$_1.prototype.constructor = Coroutine$updateListAsync_7quahr$_1; Coroutine$updateListAsync_7quahr$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.updateListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_7quahr$_1(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByClazzLogUid_s8cxhz$_0($this, clazzLogUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLogUid = clazzLogUid_0; } Coroutine$findByClazzLogUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzLogUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzLogUid_s8cxhz$_0.prototype.constructor = Coroutine$findByClazzLogUid_s8cxhz$_0; Coroutine$findByClazzLogUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzLogUid_s8cxhz$(this.local$clazzLogUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.findByClazzLogUid_s8cxhz$ = function (clazzLogUid_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzLogUid_s8cxhz$_0(this, clazzLogUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_Repo.prototype.updateRescheduledClazzLogUids_b9bd0d$ = function (oldClazzLogUid, newClazzLogUid, changedTime) { this._dao.updateRescheduledClazzLogUids_b9bd0d$(oldClazzLogUid, newClazzLogUid, changedTime); }; ClazzLogAttendanceRecordDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_27($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_27.prototype.constructor = Coroutine$insertAsync_27; Coroutine$insertAsync_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_27(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzLogAttendanceRecordDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzLogAttendanceRecordDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzLogAttendanceRecordDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao_Repo', interfaces: [ClazzLogAttendanceRecordDao]}; function ClazzLogDao_JdbcKt(_db) { ClazzLogDao.call(this); this._db = _db; this._insertAdapterClazzLog_upsert = new ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral(this._db); this._insertAdapterClazzLog_ = new ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral(this._db); } function Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_29($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_29.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_29; Coroutine$replicateOnNewNode_s8cxhz$_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | ? AS clDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | WHERE ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = ?), 0) \n | /*psql ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | ? AS clDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | WHERE ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = ?), 0) \n | ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_29(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_JdbcKt.prototype.replace_b1okmm$ = function (entity) { var _retVal = this._insertAdapterClazzLog_upsert.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_26($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_26.prototype.constructor = Coroutine$replicateOnChange_26; Coroutine$replicateOnChange_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | UserSession.usClientNodeId AS clDestination\n | FROM ChangeLog\n | JOIN ClazzLog \n | ON ChangeLog.chTableId = 14 \n | AND ClazzLog.clazzLogUid = ChangeLog.chEntityPk\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | UserSession.usClientNodeId AS clDestination\n | FROM ChangeLog\n | JOIN ClazzLog \n | ON ChangeLog.chTableId = 14 \n | AND ClazzLog.clazzLogUid = ChangeLog.chEntityPk\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_26(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_result.v = _entity; }return Unit; }; } function ClazzLogDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ClazzLogDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ClazzLogDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzLog) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ClazzLog WHERE clazzLogUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ClazzLog WHERE clazzLogUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzLogDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function ClazzLogDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_5($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_5.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_5; Coroutine$findByUidAsync_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzLog) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ClazzLog WHERE clazzLogUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ClazzLog WHERE clazzLogUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_5(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ClazzLog) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ClazzLog WHERE clazzLogUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ClazzLog WHERE clazzLogUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, _stmtConfig, ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByUidLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral(this$ClazzLogDao_JdbcKt, closure$clazzUid, closure$excludeStatus) { this.this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; this.closure$excludeStatus = closure$excludeStatus; DoorDataSourceFactory.call(this); } function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatus); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate DESC) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate DESC) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, _stmtConfig, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$excludeStatus, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ClazzLogDao_JdbcKt._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this.this$ClazzLogDao_JdbcKt, this.closure$clazzUid, this.closure$excludeStatus, _limit, _offset)); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatus); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$_liveResult = void 0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate DESC) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate DESC) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, _stmtConfig, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$closure$excludeStatus, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ClazzLogDao_JdbcKt._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this.this$ClazzLogDao_JdbcKt, this.closure$clazzUid, this.closure$excludeStatus)); }; ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ClazzLogDao_JdbcKt.prototype.findByClazzUidAsFactory_yhmem3$ = function (clazzUid, excludeStatus) { var _result = new ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral(this, clazzUid, excludeStatus); return _result; }; function ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatus); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByClazzUidAsync_yhmem3$($this, clazzUid_0, excludeStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; this.local$excludeStatus = excludeStatus_0; } Coroutine$findByClazzUidAsync_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidAsync_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidAsync_yhmem3$.prototype.constructor = Coroutine$findByClazzUidAsync_yhmem3$; Coroutine$findByClazzUidAsync_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate ASC\n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate ASC\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(this.local$clazzUid, this.local$excludeStatus, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.findByClazzUidAsync_yhmem3$ = function (clazzUid_0, excludeStatus_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidAsync_yhmem3$(this, clazzUid_0, excludeStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$excludeStatusFilter_0, closure$limit_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$fromTime = closure$fromTime_0; this.local$closure$toTime = closure$toTime_0; this.local$closure$excludeStatusFilter = closure$excludeStatusFilter_0; this.local$closure$limit = closure$limit_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$fromTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$toTime); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$excludeStatusFilter); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$excludeStatusFilter); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$limit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$excludeStatusFilter_0, closure$limit_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$excludeStatusFilter_0, closure$limit_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$($this, clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; this.local$fromTime = fromTime_0; this.local$toTime = toTime_0; this.local$excludeStatusFilter = excludeStatusFilter_0; this.local$limit = limit_0; } Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.prototype.constructor = Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$; Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0))\n | ORDER BY ClazzLog.logDate DESC\n | LIMIT ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0))\n | ORDER BY ClazzLog.logDate DESC\n | LIMIT ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(this.local$clazzUid, this.local$fromTime, this.local$toTime, this.local$excludeStatusFilter, this.local$limit, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.findByClazzUidWithinTimeRangeAsync_ttedgd$ = function (clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$(this, clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda(closure$clazzUid, closure$fromTime, closure$toTime, closure$excludeStatusFilter, closure$limit, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$clazzUid); _stmt.setLong_6svq3l$(2, closure$fromTime); _stmt.setLong_6svq3l$(3, closure$toTime); _stmt.setInt_vux9f0$(4, closure$excludeStatusFilter); _stmt.setInt_vux9f0$(5, closure$excludeStatusFilter); _stmt.setInt_vux9f0$(6, closure$limit); useResults(_stmt.executeQuery(), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda$lambda(closure$_result)); return Unit; }; } ClazzLogDao_JdbcKt.prototype.findByClazzUidWithinTimeRange_ttedgd$$default = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0))\n | ORDER BY ClazzLog.logDate DESC\n | LIMIT ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0))\n | ORDER BY ClazzLog.logDate DESC\n | LIMIT ?\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda(clazzUid, fromTime, toTime, excludeStatusFilter, limit, _result)); return _result.v; }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$fromTime = closure$fromTime_0; this.local$closure$toTime = closure$toTime_0; this.local$closure$statusFilter = closure$statusFilter_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$fromTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$toTime); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$statusFilter); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$statusFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$fromTime = closure$fromTime_0; this.local$closure$toTime = closure$toTime_0; this.local$closure$statusFilter = closure$statusFilter_0; this.local$_liveResult = void 0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ClazzLog.clazzLogStatusFlag = ?)\n | ORDER BY ClazzLog.logDate\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ClazzLog.clazzLogStatusFlag = ?)\n | ORDER BY ClazzLog.logDate\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, _stmtConfig, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(this.local$closure$clazzUid, this.local$closure$fromTime, this.local$closure$toTime, this.local$closure$statusFilter, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByClazzUidWithinTimeRangeLive_kxxcc5$ = function (clazzUid, fromTime, toTime, statusFilter) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this, clazzUid, fromTime, toTime, statusFilter)); return _result; }; function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(closure$clazzUid_0, closure$excludeStatusFilter_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatusFilter = closure$excludeStatusFilter_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatusFilter); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$excludeStatusFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(closure$clazzUid_0, closure$excludeStatusFilter_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(closure$clazzUid_0, closure$excludeStatusFilter_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatusFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatusFilter = closure$excludeStatusFilter_0; this.local$_liveResult = void 0; } Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(SELECT ClazzLog.clazzLogUid FROM ClazzLog WHERE clazzLogClazzUid = ? \n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0)))\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT EXISTS(SELECT ClazzLog.clazzLogUid FROM ClazzLog WHERE clazzLogClazzUid = ? \n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0)))\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, _stmtConfig, ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(this.local$closure$clazzUid, this.local$closure$excludeStatusFilter, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatusFilter_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatusFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.clazzHasScheduleLive_yhmem3$ = function (clazzUid, excludeStatusFilter) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this, clazzUid, excludeStatusFilter)); return _result; }; function ClazzLogDao_JdbcKt$updateStatusByClazzLogUid$lambda(closure$newStatus, closure$timeChanged, closure$clazzLogUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$newStatus); _stmt.setLong_6svq3l$(2, closure$timeChanged); _stmt.setLong_6svq3l$(3, closure$clazzLogUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ClazzLogDao_JdbcKt.prototype.updateStatusByClazzLogUid_ro19vi$ = function (clazzLogUid, newStatus, timeChanged) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |UPDATE ClazzLog \n | SET clazzLogStatusFlag = ?,\n | clazzLogLastChangedTime = ?\n | WHERE clazzLogUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |UPDATE ClazzLog \n | SET clazzLogStatusFlag = ?,\n | clazzLogLastChangedTime = ?\n | WHERE clazzLogUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ClazzLogDao_JdbcKt$updateStatusByClazzLogUid$lambda(newStatus, timeChanged, clazzLogUid)); }; function Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda(closure$clazzLog_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzLog = closure$clazzLog_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzLog.clazzLogClazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzLog.logDate); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzLog.timeRecorded); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$clazzLog.clazzLogDone); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$clazzLog.cancellationNote); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$clazzLog.clazzLogCancelled); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$clazzLog.clazzLogNumPresent); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$clazzLog.clazzLogNumAbsent); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$clazzLog.clazzLogNumPartial); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$clazzLog.clazzLogScheduleUid); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$clazzLog.clazzLogStatusFlag); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$clazzLog.clazzLogMSQN); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$clazzLog.clazzLogLCSN); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$clazzLog.clazzLogLCB); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$clazzLog.clazzLogLastChangedTime); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$clazzLog.clazzLogUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$updateAsync$lambda(closure$clazzLog_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda(closure$clazzLog_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_b1okmm$($this, clazzLog_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLog = clazzLog_0; } Coroutine$updateAsync_b1okmm$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_b1okmm$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_b1okmm$.prototype.constructor = Coroutine$updateAsync_b1okmm$; Coroutine$updateAsync_b1okmm$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzLog SET clazzLogClazzUid = ?, logDate = ?, timeRecorded = ?, clazzLogDone = ?, cancellationNote = ?, clazzLogCancelled = ?, clazzLogNumPresent = ?, clazzLogNumAbsent = ?, clazzLogNumPartial = ?, clazzLogScheduleUid = ?, clazzLogStatusFlag = ?, clazzLogMSQN = ?, clazzLogLCSN = ?, clazzLogLCB = ?, clazzLogLastChangedTime = ? WHERE clazzLogUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzLogDao_JdbcKt$updateAsync$lambda(this.local$clazzLog), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.updateAsync_b1okmm$ = function (clazzLog_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_b1okmm$(this, clazzLog_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzLog_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_28($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_28.prototype.constructor = Coroutine$insertAsync_28; Coroutine$insertAsync_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzLog_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_28(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzLog_.insertList_4ezy5m$(entityList); }; function ClazzLogDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.clazzLogClazzUid); _stmt.setLong_6svq3l$(2, _entity.logDate); _stmt.setLong_6svq3l$(3, _entity.timeRecorded); _stmt.setBoolean_fzusl$(4, _entity.clazzLogDone); _stmt.setString_vqvrqt$(5, _entity.cancellationNote); _stmt.setBoolean_fzusl$(6, _entity.clazzLogCancelled); _stmt.setInt_vux9f0$(7, _entity.clazzLogNumPresent); _stmt.setInt_vux9f0$(8, _entity.clazzLogNumAbsent); _stmt.setInt_vux9f0$(9, _entity.clazzLogNumPartial); _stmt.setLong_6svq3l$(10, _entity.clazzLogScheduleUid); _stmt.setInt_vux9f0$(11, _entity.clazzLogStatusFlag); _stmt.setLong_6svq3l$(12, _entity.clazzLogMSQN); _stmt.setLong_6svq3l$(13, _entity.clazzLogLCSN); _stmt.setInt_vux9f0$(14, _entity.clazzLogLCB); _stmt.setLong_6svq3l$(15, _entity.clazzLogLastChangedTime); _stmt.setLong_6svq3l$(16, _entity.clazzLogUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzLogDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzLog SET clazzLogClazzUid = ?, logDate = ?, timeRecorded = ?, clazzLogDone = ?, cancellationNote = ?, clazzLogCancelled = ?, clazzLogNumPresent = ?, clazzLogNumAbsent = ?, clazzLogNumPartial = ?, clazzLogScheduleUid = ?, clazzLogStatusFlag = ?, clazzLogMSQN = ?, clazzLogLCSN = ?, clazzLogLCB = ?, clazzLogLastChangedTime = ? WHERE clazzLogUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzLogDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzLogDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.clazzLogClazzUid); _stmt.setLong_6svq3l$(2, closure$entity.logDate); _stmt.setLong_6svq3l$(3, closure$entity.timeRecorded); _stmt.setBoolean_fzusl$(4, closure$entity.clazzLogDone); _stmt.setString_vqvrqt$(5, closure$entity.cancellationNote); _stmt.setBoolean_fzusl$(6, closure$entity.clazzLogCancelled); _stmt.setInt_vux9f0$(7, closure$entity.clazzLogNumPresent); _stmt.setInt_vux9f0$(8, closure$entity.clazzLogNumAbsent); _stmt.setInt_vux9f0$(9, closure$entity.clazzLogNumPartial); _stmt.setLong_6svq3l$(10, closure$entity.clazzLogScheduleUid); _stmt.setInt_vux9f0$(11, closure$entity.clazzLogStatusFlag); _stmt.setLong_6svq3l$(12, closure$entity.clazzLogMSQN); _stmt.setLong_6svq3l$(13, closure$entity.clazzLogLCSN); _stmt.setInt_vux9f0$(14, closure$entity.clazzLogLCB); _stmt.setLong_6svq3l$(15, closure$entity.clazzLogLastChangedTime); _stmt.setLong_6svq3l$(16, closure$entity.clazzLogUid); return _stmt.executeUpdate(); }; } ClazzLogDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzLog SET clazzLogClazzUid = ?, logDate = ?, timeRecorded = ?, clazzLogDone = ?, cancellationNote = ?, clazzLogCancelled = ?, clazzLogNumPresent = ?, clazzLogNumAbsent = ?, clazzLogNumPartial = ?, clazzLogScheduleUid = ?, clazzLogStatusFlag = ?, clazzLogMSQN = ?, clazzLogLCSN = ?, clazzLogLCB = ?, clazzLogLastChangedTime = ? WHERE clazzLogUid = ?'; prepareAndUseStatement_0(this._db, _sql, ClazzLogDao_JdbcKt$update$lambda(entity)); }; function ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO ClazzLog (clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING clazzLogUid'; } else tmp$ = ''; return "INSERT INTO ClazzLog (clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES(COALESCE(?,nextval('ClazzLog_clazzLogUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = excluded.clazzLogClazzUid,logDate = excluded.logDate,timeRecorded = excluded.timeRecorded,clazzLogDone = excluded.clazzLogDone,cancellationNote = excluded.cancellationNote,clazzLogCancelled = excluded.clazzLogCancelled,clazzLogNumPresent = excluded.clazzLogNumPresent,clazzLogNumAbsent = excluded.clazzLogNumAbsent,clazzLogNumPartial = excluded.clazzLogNumPartial,clazzLogScheduleUid = excluded.clazzLogScheduleUid,clazzLogStatusFlag = excluded.clazzLogStatusFlag,clazzLogMSQN = excluded.clazzLogMSQN,clazzLogLCSN = excluded.clazzLogLCSN,clazzLogLCB = excluded.clazzLogLCB,clazzLogLastChangedTime = excluded.clazzLogLastChangedTime" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzLogUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzLogUid); } stmt.setLong_6svq3l$(2, entity.clazzLogClazzUid); stmt.setLong_6svq3l$(3, entity.logDate); stmt.setLong_6svq3l$(4, entity.timeRecorded); stmt.setBoolean_fzusl$(5, entity.clazzLogDone); stmt.setString_vqvrqt$(6, entity.cancellationNote); stmt.setBoolean_fzusl$(7, entity.clazzLogCancelled); stmt.setInt_vux9f0$(8, entity.clazzLogNumPresent); stmt.setInt_vux9f0$(9, entity.clazzLogNumAbsent); stmt.setInt_vux9f0$(10, entity.clazzLogNumPartial); stmt.setLong_6svq3l$(11, entity.clazzLogScheduleUid); stmt.setInt_vux9f0$(12, entity.clazzLogStatusFlag); stmt.setLong_6svq3l$(13, entity.clazzLogMSQN); stmt.setLong_6svq3l$(14, entity.clazzLogLCSN); stmt.setInt_vux9f0$(15, entity.clazzLogLCB); stmt.setLong_6svq3l$(16, entity.clazzLogLastChangedTime); }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ClazzLog (clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING clazzLogUid'; } else tmp$ = ''; return "INSERT INTO ClazzLog (clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES(COALESCE(?,nextval('ClazzLog_clazzLogUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzLogUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzLogUid); } stmt.setLong_6svq3l$(2, entity.clazzLogClazzUid); stmt.setLong_6svq3l$(3, entity.logDate); stmt.setLong_6svq3l$(4, entity.timeRecorded); stmt.setBoolean_fzusl$(5, entity.clazzLogDone); stmt.setString_vqvrqt$(6, entity.cancellationNote); stmt.setBoolean_fzusl$(7, entity.clazzLogCancelled); stmt.setInt_vux9f0$(8, entity.clazzLogNumPresent); stmt.setInt_vux9f0$(9, entity.clazzLogNumAbsent); stmt.setInt_vux9f0$(10, entity.clazzLogNumPartial); stmt.setLong_6svq3l$(11, entity.clazzLogScheduleUid); stmt.setInt_vux9f0$(12, entity.clazzLogStatusFlag); stmt.setLong_6svq3l$(13, entity.clazzLogMSQN); stmt.setLong_6svq3l$(14, entity.clazzLogLCSN); stmt.setInt_vux9f0$(15, entity.clazzLogLCB); stmt.setLong_6svq3l$(16, entity.clazzLogLastChangedTime); }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzLogDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao_JdbcKt', interfaces: [ClazzLogDao]}; function ClazzLogDao_ReplicateWrapper(_db, _dao) { ClazzLogDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_30($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_30.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_30; Coroutine$replicateOnNewNode_s8cxhz$_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_30(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.replace_b1okmm$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$replicateOnChange_27($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_27.prototype.constructor = Coroutine$replicateOnChange_27; Coroutine$replicateOnChange_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_27(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ClazzLogDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidAsFactory_yhmem3$ = function (clazzUid, excludeStatus) { return this._dao_0.findByClazzUidAsFactory_yhmem3$(clazzUid, excludeStatus); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidAsync_yhmem3$ = function (clazzUid, excludeStatus, continuation) { return this._dao_0.findByClazzUidAsync_yhmem3$(clazzUid, excludeStatus, continuation); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidWithinTimeRangeAsync_ttedgd$ = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit, continuation) { return this._dao_0.findByClazzUidWithinTimeRangeAsync_ttedgd$(clazzUid, fromTime, toTime, excludeStatusFilter, limit, continuation); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidWithinTimeRange_ttedgd$$default = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidWithinTimeRangeLive_kxxcc5$ = function (clazzUid, fromTime, toTime, statusFilter) { return this._dao_0.findByClazzUidWithinTimeRangeLive_kxxcc5$(clazzUid, fromTime, toTime, statusFilter); }; ClazzLogDao_ReplicateWrapper.prototype.clazzHasScheduleLive_yhmem3$ = function (clazzUid, excludeStatusFilter) { return this._dao_0.clazzHasScheduleLive_yhmem3$(clazzUid, excludeStatusFilter); }; ClazzLogDao_ReplicateWrapper.prototype.updateStatusByClazzLogUid_ro19vi$ = function (clazzLogUid, newStatus, timeChanged) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateAsync_b1okmm$_0($this, clazzLog_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLog = clazzLog_0; } Coroutine$updateAsync_b1okmm$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_b1okmm$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_b1okmm$_0.prototype.constructor = Coroutine$updateAsync_b1okmm$_0; Coroutine$updateAsync_b1okmm$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$clazzLog.clazzLogLastChangedTime = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_b1okmm$(this.local$clazzLog, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.updateAsync_b1okmm$ = function (clazzLog_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_b1okmm$_0(this, clazzLog_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_29($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_29.prototype.constructor = Coroutine$insertAsync_29; Coroutine$insertAsync_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzLogUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(14, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzLogUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzLogLastChangedTime = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzLogUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_29(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao_ReplicateWrapper', interfaces: [ClazzLogDao]}; function ClazzLogDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzLogDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_31($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_31.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_31; Coroutine$replicateOnNewNode_s8cxhz$_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_31(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.replace_b1okmm$ = function (entity) { var _result = this._dao.replace_b1okmm$(entity); return _result; }; function Coroutine$replicateOnChange_28($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_28.prototype.constructor = Coroutine$replicateOnChange_28; Coroutine$replicateOnChange_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_28(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_6($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_6.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_6; Coroutine$findByUidAsync_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_6(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; ClazzLogDao_Repo.prototype.findByClazzUidAsFactory_yhmem3$ = function (clazzUid, excludeStatus) { var _result = this._dao.findByClazzUidAsFactory_yhmem3$(clazzUid, excludeStatus); return _result; }; function Coroutine$findByClazzUidAsync_yhmem3$_0($this, clazzUid_0, excludeStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$excludeStatus = excludeStatus_0; } Coroutine$findByClazzUidAsync_yhmem3$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidAsync_yhmem3$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidAsync_yhmem3$_0.prototype.constructor = Coroutine$findByClazzUidAsync_yhmem3$_0; Coroutine$findByClazzUidAsync_yhmem3$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzUidAsync_yhmem3$(this.local$clazzUid, this.local$excludeStatus, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.findByClazzUidAsync_yhmem3$ = function (clazzUid_0, excludeStatus_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidAsync_yhmem3$_0(this, clazzUid_0, excludeStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0($this, clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$fromTime = fromTime_0; this.local$toTime = toTime_0; this.local$excludeStatusFilter = excludeStatusFilter_0; this.local$limit = limit_0; } Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0.prototype.constructor = Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0; Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzUidWithinTimeRangeAsync_ttedgd$(this.local$clazzUid, this.local$fromTime, this.local$toTime, this.local$excludeStatusFilter, this.local$limit, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.findByClazzUidWithinTimeRangeAsync_ttedgd$ = function (clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$_0(this, clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.findByClazzUidWithinTimeRange_ttedgd$$default = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit) { var _result = this._dao.findByClazzUidWithinTimeRange_ttedgd$(clazzUid, fromTime, toTime, excludeStatusFilter, limit); return _result; }; ClazzLogDao_Repo.prototype.findByClazzUidWithinTimeRangeLive_kxxcc5$ = function (clazzUid, fromTime, toTime, statusFilter) { var _result = this._dao.findByClazzUidWithinTimeRangeLive_kxxcc5$(clazzUid, fromTime, toTime, statusFilter); return _result; }; ClazzLogDao_Repo.prototype.clazzHasScheduleLive_yhmem3$ = function (clazzUid, excludeStatusFilter) { var _result = this._dao.clazzHasScheduleLive_yhmem3$(clazzUid, excludeStatusFilter); return _result; }; ClazzLogDao_Repo.prototype.updateStatusByClazzLogUid_ro19vi$ = function (clazzLogUid, newStatus, timeChanged) { this._dao.updateStatusByClazzLogUid_ro19vi$(clazzLogUid, newStatus, timeChanged); }; function Coroutine$updateAsync_b1okmm$_1($this, clazzLog_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLog = clazzLog_0; } Coroutine$updateAsync_b1okmm$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_b1okmm$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_b1okmm$_1.prototype.constructor = Coroutine$updateAsync_b1okmm$_1; Coroutine$updateAsync_b1okmm$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_b1okmm$(this.local$clazzLog, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.updateAsync_b1okmm$ = function (clazzLog_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_b1okmm$_1(this, clazzLog_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_30($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_30.prototype.constructor = Coroutine$insertAsync_30; Coroutine$insertAsync_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_30(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzLogDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzLogDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzLogDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao_Repo', interfaces: [ClazzLogDao]}; function CommentsDao_JdbcKt(_db) { CommentsDao.call(this); this._db = _db; this._insertAdapterComments_ = new CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral(this._db); } function Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_32($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_32.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_32.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_32.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_32; Coroutine$replicateOnNewNode_s8cxhz$_32.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | ? AS commentsDestination\n | FROM Comments\n | WHERE Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = ?), 0) \n | /*psql ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | ? AS commentsDestination\n | FROM Comments\n | WHERE Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = ?), 0) \n | ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CommentsDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_32(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda; Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_29($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_29.prototype.constructor = Coroutine$replicateOnChange_29; Coroutine$replicateOnChange_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | UserSession.usClientNodeId AS commentsDestination\n | FROM ChangeLog\n | JOIN Comments\n | ON ChangeLog.chTableId = 208\n | AND ChangeLog.chEntityPk = Comments.commentsUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | UserSession.usClientNodeId AS commentsDestination\n | FROM ChangeLog\n | JOIN Comments\n | ON ChangeLog.chTableId = 208\n | AND ChangeLog.chEntityPk = Comments.commentsUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CommentsDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_29(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CommentsDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new Comments(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; closure$_result.v = _entity; }return Unit; }; } function CommentsDao_JdbcKt$findByUidAsync$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), CommentsDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result)); return Unit; }; } CommentsDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Comments) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Comments WHERE commentsUid = ? AND CAST(commentsInActive AS INTEGER) = 0', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Comments WHERE commentsUid = ? AND CAST(commentsInActive AS INTEGER) = 0\n |')); prepareAndUseStatement(this._db, _stmtConfig, CommentsDao_JdbcKt$findByUidAsync$lambda(uid, _result)); return _result.v; }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; DoorDataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new CommentsWithPerson(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; var _commentsPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }if (_commentsPerson_nullFieldCount < 24) { if (_entity.commentsPerson == null) { _entity.commentsPerson = new Person(); }ensureNotNull(_entity.commentsPerson).personUid = tmp_personUid; ensureNotNull(_entity.commentsPerson).username = tmp_username; ensureNotNull(_entity.commentsPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.commentsPerson).lastName = tmp_lastName; ensureNotNull(_entity.commentsPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.commentsPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.commentsPerson).gender = tmp_gender; ensureNotNull(_entity.commentsPerson).active = tmp_active; ensureNotNull(_entity.commentsPerson).admin = tmp_admin; ensureNotNull(_entity.commentsPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.commentsPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.commentsPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.commentsPerson).motherName = tmp_motherName; ensureNotNull(_entity.commentsPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.commentsPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.commentsPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.commentsPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.commentsPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.commentsPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.commentsPerson).personLct = tmp_personLct; ensureNotNull(_entity.commentsPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.commentsPerson).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 1\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 1\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 1\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 1\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid)); }; CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPublicByEntityTypeAndUidLive_6svq3l$ = function (entityType, entityUid) { var _result = new CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral(this, entityType, entityUid); return _result; }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$personUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$personUid = closure$personUid; DoorDataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new CommentsWithPerson(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; var _commentsPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }if (_commentsPerson_nullFieldCount < 24) { if (_entity.commentsPerson == null) { _entity.commentsPerson = new Person(); }ensureNotNull(_entity.commentsPerson).personUid = tmp_personUid; ensureNotNull(_entity.commentsPerson).username = tmp_username; ensureNotNull(_entity.commentsPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.commentsPerson).lastName = tmp_lastName; ensureNotNull(_entity.commentsPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.commentsPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.commentsPerson).gender = tmp_gender; ensureNotNull(_entity.commentsPerson).active = tmp_active; ensureNotNull(_entity.commentsPerson).admin = tmp_admin; ensureNotNull(_entity.commentsPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.commentsPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.commentsPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.commentsPerson).motherName = tmp_motherName; ensureNotNull(_entity.commentsPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.commentsPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.commentsPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.commentsPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.commentsPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.commentsPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.commentsPerson).personLct = tmp_personLct; ensureNotNull(_entity.commentsPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.commentsPerson).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentsPersonUid = ? OR Comments.commentsToPersonUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentsPersonUid = ? OR Comments.commentsToPersonUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentsPersonUid = ? OR Comments.commentsToPersonUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentsPersonUid = ? OR Comments.commentsToPersonUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid)); }; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$ = function (entityType, entityUid, personUid) { var _result = new CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral(this, entityType, entityUid, personUid); return _result; }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$submitterUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$submitterUid = closure$submitterUid; DoorDataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new CommentsWithPerson(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; var _commentsPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }if (_commentsPerson_nullFieldCount < 24) { if (_entity.commentsPerson == null) { _entity.commentsPerson = new Person(); }ensureNotNull(_entity.commentsPerson).personUid = tmp_personUid; ensureNotNull(_entity.commentsPerson).username = tmp_username; ensureNotNull(_entity.commentsPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.commentsPerson).lastName = tmp_lastName; ensureNotNull(_entity.commentsPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.commentsPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.commentsPerson).gender = tmp_gender; ensureNotNull(_entity.commentsPerson).active = tmp_active; ensureNotNull(_entity.commentsPerson).admin = tmp_admin; ensureNotNull(_entity.commentsPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.commentsPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.commentsPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.commentsPerson).motherName = tmp_motherName; ensureNotNull(_entity.commentsPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.commentsPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.commentsPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.commentsPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.commentsPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.commentsPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.commentsPerson).personLct = tmp_personLct; ensureNotNull(_entity.commentsPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.commentsPerson).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$submitterUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, \n | Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid\n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentSubmitterUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, \n | Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid\n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentSubmitterUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$submitterUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$submitterUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, \n | Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid\n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentSubmitterUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, \n | Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid\n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentSubmitterUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$submitterUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$submitterUid)); }; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$ = function (entityType, entityUid, submitterUid) { var _result = new CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral(this, entityType, entityUid, submitterUid); return _result; }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$personUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$personUid = closure$personUid; DoorDataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new CommentsWithPerson(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; var _commentsPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }if (_commentsPerson_nullFieldCount < 24) { if (_entity.commentsPerson == null) { _entity.commentsPerson = new Person(); }ensureNotNull(_entity.commentsPerson).personUid = tmp_personUid; ensureNotNull(_entity.commentsPerson).username = tmp_username; ensureNotNull(_entity.commentsPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.commentsPerson).lastName = tmp_lastName; ensureNotNull(_entity.commentsPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.commentsPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.commentsPerson).gender = tmp_gender; ensureNotNull(_entity.commentsPerson).active = tmp_active; ensureNotNull(_entity.commentsPerson).admin = tmp_admin; ensureNotNull(_entity.commentsPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.commentsPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.commentsPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.commentsPerson).motherName = tmp_motherName; ensureNotNull(_entity.commentsPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.commentsPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.commentsPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.commentsPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.commentsPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.commentsPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.commentsPerson).personLct = tmp_personLct; ensureNotNull(_entity.commentsPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.commentsPerson).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid)); }; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$ = function (entityType, entityUid, personUid) { var _result = new CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral(this, entityType, entityUid, personUid); return _result; }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$personFrom) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$personFrom = closure$personFrom; DoorDataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new CommentsWithPerson(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; var _commentsPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }if (_commentsPerson_nullFieldCount < 24) { if (_entity.commentsPerson == null) { _entity.commentsPerson = new Person(); }ensureNotNull(_entity.commentsPerson).personUid = tmp_personUid; ensureNotNull(_entity.commentsPerson).username = tmp_username; ensureNotNull(_entity.commentsPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.commentsPerson).lastName = tmp_lastName; ensureNotNull(_entity.commentsPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.commentsPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.commentsPerson).gender = tmp_gender; ensureNotNull(_entity.commentsPerson).active = tmp_active; ensureNotNull(_entity.commentsPerson).admin = tmp_admin; ensureNotNull(_entity.commentsPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.commentsPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.commentsPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.commentsPerson).motherName = tmp_motherName; ensureNotNull(_entity.commentsPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.commentsPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.commentsPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.commentsPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.commentsPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.commentsPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.commentsPerson).personLct = tmp_personLct; ensureNotNull(_entity.commentsPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.commentsPerson).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personFrom); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personFrom); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND (Comments.commentsToPersonUid = ? \n | OR Comments.commentsPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND (Comments.commentsToPersonUid = ? \n | OR Comments.commentsPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personFrom, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personFrom, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personFrom); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personFrom); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$_liveResult = void 0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND (Comments.commentsToPersonUid = ? \n | OR Comments.commentsPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND (Comments.commentsToPersonUid = ? \n | OR Comments.commentsPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personFrom, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personFrom)); }; CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$ = function (entityType, entityUid, personFrom) { var _result = new CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral(this, entityType, entityUid, personFrom); return _result; }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_commentsUid = _resultSet.getLong_61zpoe$('commentsUid'); var tmp_commentsText = _resultSet.getString_61zpoe$('commentsText'); var tmp_commentsEntityType = _resultSet.getInt_61zpoe$('commentsEntityType'); var tmp_commentsEntityUid = _resultSet.getLong_61zpoe$('commentsEntityUid'); var tmp_commentsPublic = _resultSet.getBoolean_61zpoe$('commentsPublic'); var tmp_commentsStatus = _resultSet.getInt_61zpoe$('commentsStatus'); var tmp_commentsPersonUid = _resultSet.getLong_61zpoe$('commentsPersonUid'); var tmp_commentsToPersonUid = _resultSet.getLong_61zpoe$('commentsToPersonUid'); var tmp_commentSubmitterUid = _resultSet.getLong_61zpoe$('commentSubmitterUid'); var tmp_commentsFlagged = _resultSet.getBoolean_61zpoe$('commentsFlagged'); var tmp_commentsInActive = _resultSet.getBoolean_61zpoe$('commentsInActive'); var tmp_commentsDateTimeAdded = _resultSet.getLong_61zpoe$('commentsDateTimeAdded'); var tmp_commentsDateTimeUpdated = _resultSet.getLong_61zpoe$('commentsDateTimeUpdated'); var tmp_commentsMCSN = _resultSet.getLong_61zpoe$('commentsMCSN'); var tmp_commentsLCSN = _resultSet.getLong_61zpoe$('commentsLCSN'); var tmp_commentsLCB = _resultSet.getInt_61zpoe$('commentsLCB'); var tmp_commentsLct = _resultSet.getLong_61zpoe$('commentsLct'); var _entity = new CommentsWithPerson(); _entity.commentsUid = tmp_commentsUid; _entity.commentsText = tmp_commentsText; _entity.commentsEntityType = tmp_commentsEntityType; _entity.commentsEntityUid = tmp_commentsEntityUid; _entity.commentsPublic = tmp_commentsPublic; _entity.commentsStatus = tmp_commentsStatus; _entity.commentsPersonUid = tmp_commentsPersonUid; _entity.commentsToPersonUid = tmp_commentsToPersonUid; _entity.commentSubmitterUid = tmp_commentSubmitterUid; _entity.commentsFlagged = tmp_commentsFlagged; _entity.commentsInActive = tmp_commentsInActive; _entity.commentsDateTimeAdded = tmp_commentsDateTimeAdded; _entity.commentsDateTimeUpdated = tmp_commentsDateTimeUpdated; _entity.commentsMCSN = tmp_commentsMCSN; _entity.commentsLCSN = tmp_commentsLCSN; _entity.commentsLCB = tmp_commentsLCB; _entity.commentsLct = tmp_commentsLct; var _commentsPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _commentsPerson_nullFieldCount = _commentsPerson_nullFieldCount + 1 | 0; }if (_commentsPerson_nullFieldCount < 24) { if (_entity.commentsPerson == null) { _entity.commentsPerson = new Person(); }ensureNotNull(_entity.commentsPerson).personUid = tmp_personUid; ensureNotNull(_entity.commentsPerson).username = tmp_username; ensureNotNull(_entity.commentsPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.commentsPerson).lastName = tmp_lastName; ensureNotNull(_entity.commentsPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.commentsPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.commentsPerson).gender = tmp_gender; ensureNotNull(_entity.commentsPerson).active = tmp_active; ensureNotNull(_entity.commentsPerson).admin = tmp_admin; ensureNotNull(_entity.commentsPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.commentsPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.commentsPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.commentsPerson).motherName = tmp_motherName; ensureNotNull(_entity.commentsPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.commentsPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.commentsPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.commentsPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.commentsPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.commentsPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.commentsPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.commentsPerson).personLct = tmp_personLct; ensureNotNull(_entity.commentsPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.commentsPerson).personType = tmp_personType; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda(closure$entityType, closure$entityUid, closure$personFrom, closure$personTo, closure$_result) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$entityType); _stmt.setLong_6svq3l$(2, closure$entityUid); _stmt.setLong_6svq3l$(3, closure$personFrom); _stmt.setLong_6svq3l$(4, closure$personTo); _stmt.setLong_6svq3l$(5, closure$personFrom); useResults(_stmt.executeQuery(), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda$lambda(closure$_result)); return Unit; }; } CommentsDao_JdbcKt.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$ = function (entityType, entityUid, personFrom, personTo) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Comments.commentsPersonUid = ? \n | OR (? = 0 OR Comments.commentsToPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Comments.commentsPersonUid = ? \n | OR (? = 0 OR Comments.commentsToPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda(entityType, entityUid, personFrom, personTo, _result)); return _result.v; }; function Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(closure$inActive_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$inActive = closure$inActive_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda; Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$inActive); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(closure$inActive_0, closure$changeTime_0, closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(closure$inActive_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateInActiveByCommentUid_zaz62j$($this, uid_0, inActive_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$inActive = inActive_0; this.local$changeTime = changeTime_0; } Coroutine$updateInActiveByCommentUid_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateInActiveByCommentUid_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateInActiveByCommentUid_zaz62j$.prototype.constructor = Coroutine$updateInActiveByCommentUid_zaz62j$; Coroutine$updateInActiveByCommentUid_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Comments \n | SET commentsInActive = ?,\n | commentsLct = ?\n | WHERE Comments.commentsUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Comments \n | SET commentsInActive = ?,\n | commentsLct = ?\n | WHERE Comments.commentsUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(this.local$inActive, this.local$changeTime, this.local$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.updateInActiveByCommentUid_zaz62j$ = function (uid_0, inActive_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateInActiveByCommentUid_zaz62j$(this, uid_0, inActive_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterComments_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_31($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_31.prototype.constructor = Coroutine$insertAsync_31; Coroutine$insertAsync_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterComments_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_31(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterComments_.insertList_4ezy5m$(entityList); }; function CommentsDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.commentsText); _stmt.setInt_vux9f0$(2, _entity.commentsEntityType); _stmt.setLong_6svq3l$(3, _entity.commentsEntityUid); _stmt.setBoolean_fzusl$(4, _entity.commentsPublic); _stmt.setInt_vux9f0$(5, _entity.commentsStatus); _stmt.setLong_6svq3l$(6, _entity.commentsPersonUid); _stmt.setLong_6svq3l$(7, _entity.commentsToPersonUid); _stmt.setLong_6svq3l$(8, _entity.commentSubmitterUid); _stmt.setBoolean_fzusl$(9, _entity.commentsFlagged); _stmt.setBoolean_fzusl$(10, _entity.commentsInActive); _stmt.setLong_6svq3l$(11, _entity.commentsDateTimeAdded); _stmt.setLong_6svq3l$(12, _entity.commentsDateTimeUpdated); _stmt.setLong_6svq3l$(13, _entity.commentsMCSN); _stmt.setLong_6svq3l$(14, _entity.commentsLCSN); _stmt.setInt_vux9f0$(15, _entity.commentsLCB); _stmt.setLong_6svq3l$(16, _entity.commentsLct); _stmt.setLong_6svq3l$(17, _entity.commentsUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CommentsDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Comments SET commentsText = ?, commentsEntityType = ?, commentsEntityUid = ?, commentsPublic = ?, commentsStatus = ?, commentsPersonUid = ?, commentsToPersonUid = ?, commentSubmitterUid = ?, commentsFlagged = ?, commentsInActive = ?, commentsDateTimeAdded = ?, commentsDateTimeUpdated = ?, commentsMCSN = ?, commentsLCSN = ?, commentsLCB = ?, commentsLct = ? WHERE commentsUid = ?'; prepareAndUseStatement_0(this._db, _sql, CommentsDao_JdbcKt$updateList$lambda(entityList)); }; function CommentsDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.commentsText); _stmt.setInt_vux9f0$(2, closure$entity.commentsEntityType); _stmt.setLong_6svq3l$(3, closure$entity.commentsEntityUid); _stmt.setBoolean_fzusl$(4, closure$entity.commentsPublic); _stmt.setInt_vux9f0$(5, closure$entity.commentsStatus); _stmt.setLong_6svq3l$(6, closure$entity.commentsPersonUid); _stmt.setLong_6svq3l$(7, closure$entity.commentsToPersonUid); _stmt.setLong_6svq3l$(8, closure$entity.commentSubmitterUid); _stmt.setBoolean_fzusl$(9, closure$entity.commentsFlagged); _stmt.setBoolean_fzusl$(10, closure$entity.commentsInActive); _stmt.setLong_6svq3l$(11, closure$entity.commentsDateTimeAdded); _stmt.setLong_6svq3l$(12, closure$entity.commentsDateTimeUpdated); _stmt.setLong_6svq3l$(13, closure$entity.commentsMCSN); _stmt.setLong_6svq3l$(14, closure$entity.commentsLCSN); _stmt.setInt_vux9f0$(15, closure$entity.commentsLCB); _stmt.setLong_6svq3l$(16, closure$entity.commentsLct); _stmt.setLong_6svq3l$(17, closure$entity.commentsUid); return _stmt.executeUpdate(); }; } CommentsDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Comments SET commentsText = ?, commentsEntityType = ?, commentsEntityUid = ?, commentsPublic = ?, commentsStatus = ?, commentsPersonUid = ?, commentsToPersonUid = ?, commentSubmitterUid = ?, commentsFlagged = ?, commentsInActive = ?, commentsDateTimeAdded = ?, commentsDateTimeUpdated = ?, commentsMCSN = ?, commentsLCSN = ?, commentsLCB = ?, commentsLct = ? WHERE commentsUid = ?'; prepareAndUseStatement_0(this._db, _sql, CommentsDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_5($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_5.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_5; Coroutine$insertListAsync_4ezy5m$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterComments_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_5(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda; Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.commentsText); this.local$_stmt.setInt_vux9f0$(2, _entity.commentsEntityType); this.local$_stmt.setLong_6svq3l$(3, _entity.commentsEntityUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.commentsPublic); this.local$_stmt.setInt_vux9f0$(5, _entity.commentsStatus); this.local$_stmt.setLong_6svq3l$(6, _entity.commentsPersonUid); this.local$_stmt.setLong_6svq3l$(7, _entity.commentsToPersonUid); this.local$_stmt.setLong_6svq3l$(8, _entity.commentSubmitterUid); this.local$_stmt.setBoolean_fzusl$(9, _entity.commentsFlagged); this.local$_stmt.setBoolean_fzusl$(10, _entity.commentsInActive); this.local$_stmt.setLong_6svq3l$(11, _entity.commentsDateTimeAdded); this.local$_stmt.setLong_6svq3l$(12, _entity.commentsDateTimeUpdated); this.local$_stmt.setLong_6svq3l$(13, _entity.commentsMCSN); this.local$_stmt.setLong_6svq3l$(14, _entity.commentsLCSN); this.local$_stmt.setInt_vux9f0$(15, _entity.commentsLCB); this.local$_stmt.setLong_6svq3l$(16, _entity.commentsLct); this.local$_stmt.setLong_6svq3l$(17, _entity.commentsUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_5($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_5.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_5; Coroutine$updateListAsync_4ezy5m$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Comments SET commentsText = ?, commentsEntityType = ?, commentsEntityUid = ?, commentsPublic = ?, commentsStatus = ?, commentsPersonUid = ?, commentsToPersonUid = ?, commentSubmitterUid = ?, commentsFlagged = ?, commentsInActive = ?, commentsDateTimeAdded = ?, commentsDateTimeUpdated = ?, commentsMCSN = ?, commentsLCSN = ?, commentsLCB = ?, commentsLct = ? WHERE commentsUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CommentsDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_5(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Comments (commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING commentsUid'; } else tmp$ = ''; return "INSERT INTO Comments (commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES(COALESCE(?,nextval('Comments_commentsUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.commentsUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.commentsUid); } stmt.setString_vqvrqt$(2, entity.commentsText); stmt.setInt_vux9f0$(3, entity.commentsEntityType); stmt.setLong_6svq3l$(4, entity.commentsEntityUid); stmt.setBoolean_fzusl$(5, entity.commentsPublic); stmt.setInt_vux9f0$(6, entity.commentsStatus); stmt.setLong_6svq3l$(7, entity.commentsPersonUid); stmt.setLong_6svq3l$(8, entity.commentsToPersonUid); stmt.setLong_6svq3l$(9, entity.commentSubmitterUid); stmt.setBoolean_fzusl$(10, entity.commentsFlagged); stmt.setBoolean_fzusl$(11, entity.commentsInActive); stmt.setLong_6svq3l$(12, entity.commentsDateTimeAdded); stmt.setLong_6svq3l$(13, entity.commentsDateTimeUpdated); stmt.setLong_6svq3l$(14, entity.commentsMCSN); stmt.setLong_6svq3l$(15, entity.commentsLCSN); stmt.setInt_vux9f0$(16, entity.commentsLCB); stmt.setLong_6svq3l$(17, entity.commentsLct); }; CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CommentsDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao_JdbcKt', interfaces: [CommentsDao]}; function CommentsDao_ReplicateWrapper(_db, _dao) { CommentsDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_33($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_33.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_33.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_33.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_33; Coroutine$replicateOnNewNode_s8cxhz$_33.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_33(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_30($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_30.prototype.constructor = Coroutine$replicateOnChange_30; Coroutine$replicateOnChange_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_30(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CommentsDao_ReplicateWrapper.prototype.findPublicByEntityTypeAndUidLive_6svq3l$ = function (entityType, entityUid) { return this._dao_0.findPublicByEntityTypeAndUidLive_6svq3l$(entityType, entityUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$ = function (entityType, entityUid, personUid) { return this._dao_0.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$(entityType, entityUid, personUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$ = function (entityType, entityUid, submitterUid) { return this._dao_0.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$(entityType, entityUid, submitterUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$ = function (entityType, entityUid, personUid) { return this._dao_0.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$(entityType, entityUid, personUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$ = function (entityType, entityUid, personFrom) { return this._dao_0.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$(entityType, entityUid, personFrom); }; CommentsDao_ReplicateWrapper.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$ = function (entityType, entityUid, personFrom, personTo) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateInActiveByCommentUid_zaz62j$_0($this, uid_0, inActive_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$inActive = inActive_0; this.local$changeTime = changeTime_0; } Coroutine$updateInActiveByCommentUid_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateInActiveByCommentUid_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateInActiveByCommentUid_zaz62j$_0.prototype.constructor = Coroutine$updateInActiveByCommentUid_zaz62j$_0; Coroutine$updateInActiveByCommentUid_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateInActiveByCommentUid_zaz62j$(this.local$uid, this.local$inActive, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.updateInActiveByCommentUid_zaz62j$ = function (uid_0, inActive_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateInActiveByCommentUid_zaz62j$_0(this, uid_0, inActive_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_32($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_32.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_32.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_32.prototype.constructor = Coroutine$insertAsync_32; Coroutine$insertAsync_32.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.commentsUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(208, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.commentsUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.commentsLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.commentsUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_32(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CommentsDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CommentsDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_6($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_6.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_6; Coroutine$insertListAsync_4ezy5m$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.commentsUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(208, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.commentsUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.commentsLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_6(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_6($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_6.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_6; Coroutine$updateListAsync_4ezy5m$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.commentsLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_6(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao_ReplicateWrapper', interfaces: [CommentsDao]}; function CommentsDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CommentsDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_34($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_34.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_34.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_34.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_34; Coroutine$replicateOnNewNode_s8cxhz$_34.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_34(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_31($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_31.prototype.constructor = Coroutine$replicateOnChange_31; Coroutine$replicateOnChange_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_31(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid) { var _result = this._dao.findByUidAsync_s8cxhz$(uid); return _result; }; CommentsDao_Repo.prototype.findPublicByEntityTypeAndUidLive_6svq3l$ = function (entityType, entityUid) { var _result = this._dao.findPublicByEntityTypeAndUidLive_6svq3l$(entityType, entityUid); return _result; }; CommentsDao_Repo.prototype.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$ = function (entityType, entityUid, personUid) { var _result = this._dao.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$(entityType, entityUid, personUid); return _result; }; CommentsDao_Repo.prototype.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$ = function (entityType, entityUid, submitterUid) { var _result = this._dao.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$(entityType, entityUid, submitterUid); return _result; }; CommentsDao_Repo.prototype.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$ = function (entityType, entityUid, personUid) { var _result = this._dao.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$(entityType, entityUid, personUid); return _result; }; CommentsDao_Repo.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$ = function (entityType, entityUid, personFrom) { var _result = this._dao.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$(entityType, entityUid, personFrom); return _result; }; CommentsDao_Repo.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$ = function (entityType, entityUid, personFrom, personTo) { var _result = this._dao.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$(entityType, entityUid, personFrom, personTo); return _result; }; function Coroutine$updateInActiveByCommentUid_zaz62j$_1($this, uid_0, inActive_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$inActive = inActive_0; this.local$changeTime = changeTime_0; } Coroutine$updateInActiveByCommentUid_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateInActiveByCommentUid_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateInActiveByCommentUid_zaz62j$_1.prototype.constructor = Coroutine$updateInActiveByCommentUid_zaz62j$_1; Coroutine$updateInActiveByCommentUid_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateInActiveByCommentUid_zaz62j$(this.local$uid, this.local$inActive, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.updateInActiveByCommentUid_zaz62j$ = function (uid_0, inActive_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateInActiveByCommentUid_zaz62j$_1(this, uid_0, inActive_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_33($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_33.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_33.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_33.prototype.constructor = Coroutine$insertAsync_33; Coroutine$insertAsync_33.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_33(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CommentsDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CommentsDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_7($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_7.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_7; Coroutine$insertListAsync_4ezy5m$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_7(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_7($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_7.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_7; Coroutine$updateListAsync_4ezy5m$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_7(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao_Repo', interfaces: [CommentsDao]}; function ConnectivityStatusDao_JdbcKt(_db) { ConnectivityStatusDao.call(this); this._db = _db; this._insertAdapterConnectivityStatus_upsert = new ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral(this._db); } function ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_csUid = _resultSet.getInt_61zpoe$('csUid'); var tmp_connectivityState = _resultSet.getInt_61zpoe$('connectivityState'); var tmp_wifiSsid = _resultSet.getString_61zpoe$('wifiSsid'); var tmp_connectedOrConnecting = _resultSet.getBoolean_61zpoe$('connectedOrConnecting'); var _entity = new ConnectivityStatus(); _entity.csUid = tmp_csUid; _entity.connectivityState = tmp_connectivityState; _entity.wifiSsid = tmp_wifiSsid; _entity.connectedOrConnecting = tmp_connectedOrConnecting; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda(this$ConnectivityStatusDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ConnectivityStatusDao_JdbcKt = this$ConnectivityStatusDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ConnectivityStatus) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ConnectivityStatus.* FROM ConnectivityStatus LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT ConnectivityStatus.* FROM ConnectivityStatus LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ConnectivityStatusDao_JdbcKt._db, _stmtConfig, ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$statusLive$lambda(this$ConnectivityStatusDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda(this$ConnectivityStatusDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ConnectivityStatusDao_JdbcKt.prototype.statusLive = function () { var _result = new DoorLiveDataImpl(this._db, listOf_0('ConnectivityStatus'), ConnectivityStatusDao_JdbcKt$statusLive$lambda(this)); return _result; }; function ConnectivityStatusDao_JdbcKt$status$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_csUid = _resultSet.getInt_61zpoe$('csUid'); var tmp_connectivityState = _resultSet.getInt_61zpoe$('connectivityState'); var tmp_wifiSsid = _resultSet.getString_61zpoe$('wifiSsid'); var tmp_connectedOrConnecting = _resultSet.getBoolean_61zpoe$('connectedOrConnecting'); var _entity = new ConnectivityStatus(); _entity.csUid = tmp_csUid; _entity.connectivityState = tmp_connectivityState; _entity.wifiSsid = tmp_wifiSsid; _entity.connectedOrConnecting = tmp_connectedOrConnecting; closure$_result.v = _entity; }return Unit; }; } function ConnectivityStatusDao_JdbcKt$status$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ConnectivityStatusDao_JdbcKt$status$lambda$lambda(closure$_result)); return Unit; }; } ConnectivityStatusDao_JdbcKt.prototype.status = function () { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ConnectivityStatus) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ConnectivityStatus.* FROM ConnectivityStatus LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT ConnectivityStatus.* FROM ConnectivityStatus LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ConnectivityStatusDao_JdbcKt$status$lambda(_result)); return _result.v; }; ConnectivityStatusDao_JdbcKt.prototype.insert_v0v7in$ = function (connectivityStatus) { var _retVal = this._insertAdapterConnectivityStatus_upsert.insertAndReturnId_11rb$(connectivityStatus); return _retVal; }; function Coroutine$insertAsync_v0v7in$($this, connectivityStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$connectivityStatus = connectivityStatus_0; } Coroutine$insertAsync_v0v7in$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_v0v7in$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_v0v7in$.prototype.constructor = Coroutine$insertAsync_v0v7in$; Coroutine$insertAsync_v0v7in$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterConnectivityStatus_upsert.insertAndReturnIdAsync_11rb$(this.local$connectivityStatus, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ConnectivityStatusDao_JdbcKt.prototype.insertAsync_v0v7in$ = function (connectivityStatus_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_v0v7in$(this, connectivityStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(closure$connectivityState_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$connectivityState = closure$connectivityState_0; this.local$_stmt = _stmt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$connectivityState); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(closure$connectivityState_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(closure$connectivityState_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateStateAsync_za3lpa$($this, connectivityState_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$connectivityState = connectivityState_0; } Coroutine$updateStateAsync_za3lpa$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateStateAsync_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateStateAsync_za3lpa$.prototype.constructor = Coroutine$updateStateAsync_za3lpa$; Coroutine$updateStateAsync_za3lpa$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig('UPDATE ConnectivityStatus SET connectivityState = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ConnectivityStatus SET connectivityState = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(this.local$connectivityState), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ConnectivityStatusDao_JdbcKt.prototype.updateStateAsync_za3lpa$ = function (connectivityState_0, continuation_0, suspended) { var instance = new Coroutine$updateStateAsync_za3lpa$(this, connectivityState_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda(closure$connectivityState_0, closure$wifiSsid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$connectivityState = closure$connectivityState_0; this.local$closure$wifiSsid = closure$wifiSsid_0; this.local$_stmt = _stmt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$connectivityState); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$wifiSsid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$updateState$lambda(closure$connectivityState_0, closure$wifiSsid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda(closure$connectivityState_0, closure$wifiSsid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateState_19mbxw$($this, connectivityState_0, wifiSsid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$connectivityState = connectivityState_0; this.local$wifiSsid = wifiSsid_0; } Coroutine$updateState_19mbxw$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateState_19mbxw$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateState_19mbxw$.prototype.constructor = Coroutine$updateState_19mbxw$; Coroutine$updateState_19mbxw$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig('UPDATE ConnectivityStatus SET connectivityState = ? , wifiSsid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ConnectivityStatus SET connectivityState = ? , wifiSsid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ConnectivityStatusDao_JdbcKt$updateState$lambda(this.local$connectivityState, this.local$wifiSsid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ConnectivityStatusDao_JdbcKt.prototype.updateState_19mbxw$ = function (connectivityState_0, wifiSsid_0, continuation_0, suspended) { var instance = new Coroutine$updateState_19mbxw$(this, connectivityState_0, wifiSsid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ConnectivityStatusDao_JdbcKt$updateStateSync$lambda(closure$connectivityState, closure$wifiSsid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$connectivityState); _stmt.setString_vqvrqt$(2, closure$wifiSsid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ConnectivityStatusDao_JdbcKt.prototype.updateStateSync_19mbxw$ = function (connectivityState, wifiSsid) { var _stmtConfig = new PreparedStatementConfig('UPDATE ConnectivityStatus SET connectivityState = ? , wifiSsid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ConnectivityStatus SET connectivityState = ? , wifiSsid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ConnectivityStatusDao_JdbcKt$updateStateSync$lambda(connectivityState, wifiSsid)); }; function ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO ConnectivityStatus (csUid, connectivityState, wifiSsid, connectedOrConnecting) VALUES(?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING csUid'; } else tmp$ = ''; return 'INSERT INTO ConnectivityStatus (csUid, connectivityState, wifiSsid, connectedOrConnecting) VALUES(?, ?, ?, ?) ON CONFLICT (csUid) DO UPDATE SET connectivityState = excluded.connectivityState,wifiSsid = excluded.wifiSsid,connectedOrConnecting = excluded.connectedOrConnecting' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setInt_vux9f0$(1, entity.csUid); stmt.setInt_vux9f0$(2, entity.connectivityState); stmt.setString_vqvrqt$(3, entity.wifiSsid); stmt.setBoolean_fzusl$(4, entity.connectedOrConnecting); }; ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ConnectivityStatusDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ConnectivityStatusDao_JdbcKt', interfaces: [ConnectivityStatusDao]}; function ContainerDao_JdbcKt(_db) { ContainerDao.call(this); this._db = _db; this._insertAdapterContainer_ = new ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral(this._db); this._insertAdapterContainer_upsert = new ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral(this._db); } function Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_35($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_35.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_35.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_35.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_35; Coroutine$replicateOnNewNode_s8cxhz$_35.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerPk,\n | ? AS containerDestination\n | FROM Container\n | WHERE Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = ?), 0) \n | /*psql ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerPk,\n | ? AS containerDestination\n | FROM Container\n | WHERE Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = ?), 0) \n | ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_35(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_32($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_32.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_32.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_32.prototype.constructor = Coroutine$replicateOnChange_32; Coroutine$replicateOnChange_32.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerUid,\n | UserSession.usClientNodeId AS containerDestination\n | FROM ChangeLog\n | JOIN Container\n | ON ChangeLog.chTableId = 51\n | AND ChangeLog.chEntityPk = Container.containerUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerUid,\n | UserSession.usClientNodeId AS containerDestination\n | FROM ChangeLog\n | JOIN Container\n | ON ChangeLog.chTableId = 51\n | AND ChangeLog.chEntityPk = Container.containerUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_32(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_5ys87q$($this, containerList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerList = containerList_0; } Coroutine$insertListAsync_5ys87q$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5ys87q$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5ys87q$.prototype.constructor = Coroutine$insertListAsync_5ys87q$; Coroutine$insertListAsync_5ys87q$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainer_.insertListAsync_4ezy5m$(this.local$containerList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.insertListAsync_5ys87q$ = function (containerList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5ys87q$(this, containerList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(closure$contentEntry_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntry = closure$contentEntry_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntry); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(closure$contentEntry_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(closure$contentEntry_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$($this, contentEntry_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntry = contentEntry_0; } Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$; Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Container) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('Select Container.* FROM Container WHERE Container.containerContentEntryUid = ? ORDER BY Container.cntLastModified DESC LIMIT 1', void 0, void 0, void 0, trimMargin('\n |Select Container.* FROM Container WHERE Container.containerContentEntryUid = ? ORDER BY Container.cntLastModified DESC LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(this.local$contentEntry, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$ = function (contentEntry_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$(this, contentEntry_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v = _entity; }return Unit; }; } function ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda(closure$contentEntryUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda$lambda(closure$_result)); return Unit; }; } ContainerDao_JdbcKt.prototype.getMostRecentContainerForContentEntry_s8cxhz$ = function (contentEntryUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Container) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.*\n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Container.*\n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda(contentEntryUid, _result)); return _result.v; }; function ContainerDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v = _entity; }return Unit; }; } function ContainerDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ContainerDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Container) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Container WHERE containerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Container WHERE containerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function ContainerDao_JdbcKt$findSizeByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda; Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findSizeByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findSizeByUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findSizeByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findSizeByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSizeByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSizeByUid_s8cxhz$.prototype.constructor = Coroutine$findSizeByUid_s8cxhz$; Coroutine$findSizeByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT(COALESCE((\n | SELECT fileSize\n | FROM Container\n | WHERE containerUid = ?), 0))\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT(COALESCE((\n | SELECT fileSize\n | FROM Container\n | WHERE containerUid = ?), 0))\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$findSizeByUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.findSizeByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findSizeByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntries_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerDao_JdbcKt = this$ContainerDao_JdbcKt_0; this.local$closure$contentEntries = closure$contentEntries_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda; Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ContainerDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$contentEntries))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntries_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntries_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$($this, contentEntries_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntries = contentEntries_0; } Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.prototype.constructor = Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$; Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT recent.* FROM Container recent LEFT JOIN Container old ON (recent.containerContentEntryUid = old.containerContentEntryUid AND recent.cntLastModified < old.cntLastModified) WHERE old.containerUid IS NULL AND recent.containerContentEntryUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT recent.* FROM Container recent LEFT JOIN Container old ON (recent.containerContentEntryUid = old.containerContentEntryUid AND recent.cntLastModified < old.cntLastModified) WHERE old.containerUid IS NULL AND recent.containerContentEntryUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(this.$this, this.local$contentEntries, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$ = function (contentEntries_0, continuation_0, suspended) { var instance = new Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$(this, contentEntries_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda; Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findContainersForContentEntryUid_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findContainersForContentEntryUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContainersForContentEntryUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContainersForContentEntryUid_s8cxhz$.prototype.constructor = Coroutine$findContainersForContentEntryUid_s8cxhz$; Coroutine$findContainersForContentEntryUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |Select Container.* FROM Container \n | WHERE Container.containerContentEntryUid = ?\n | ORDER BY Container.cntLastModified DESC\n '), void 0, void 0, void 0, trimMargin('\n |Select Container.* FROM Container \n | WHERE Container.containerContentEntryUid = ?\n | ORDER BY Container.cntLastModified DESC\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.findContainersForContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findContainersForContentEntryUid_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerDao_JdbcKt = this$ContainerDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_liveResult = void 0; } Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(SELECT 1\n | FROM Container \n | WHERE Container.containerContentEntryUid = ?\n | AND NOT EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid) \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT EXISTS(SELECT 1\n | FROM Container \n | WHERE Container.containerContentEntryUid = ?\n | AND NOT EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid) \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContainerDao_JdbcKt._db, _stmtConfig, ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(this.local$closure$contentEntryUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.hasContainerWithFilesToDownload_s8cxhz$ = function (contentEntryUid) { var _result = new DoorLiveDataImpl(this._db, listOf(['Container', 'ContainerEntry']), ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this, contentEntryUid)); return _result; }; function ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda; Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.prototype.constructor = Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$; Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Container) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.*\n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid) \n | ORDER BY Container.cntLastModified DESC LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Container.*\n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid) \n | ORDER BY Container.cntLastModified DESC LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.findContainerWithFilesByContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$findAllPublikContainers$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerDao_JdbcKt$findAllPublikContainers$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findAllPublikContainers$lambda$lambda(closure$_result)); return Unit; }; } ContainerDao_JdbcKt.prototype.findAllPublikContainers = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT Container.* FROM Container LEFT JOIN ContentEntry ON ContentEntry.contentEntryUid = containerContentEntryUid WHERE ContentEntry.publik', void 0, void 0, void 0, trimMargin('\n |SELECT Container.* FROM Container LEFT JOIN ContentEntry ON ContentEntry.contentEntryUid = containerContentEntryUid WHERE ContentEntry.publik\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$findAllPublikContainers$lambda(_result)); return _result.v; }; function ContainerDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda(closure$containerUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findByUidAsync$lambda(closure$containerUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda(closure$containerUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_7($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$containerUid = containerUid_0; } Coroutine$findByUidAsync_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_7.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_7; Coroutine$findByUidAsync_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Container) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From Container WHERE Container.containerUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * From Container WHERE Container.containerUid = ? LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$findByUidAsync$lambda(this.local$containerUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_7(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$updateContainerSizeAndNumEntries$lambda(closure$changeTime, closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$changeTime); _stmt.setLong_6svq3l$(2, closure$containerUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerDao_JdbcKt.prototype.updateContainerSizeAndNumEntries_3pjtqy$ = function (containerUid, changeTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Container \n | SET cntNumEntries = COALESCE(\n | (SELECT COUNT(*) \n | FROM ContainerEntry \n | WHERE ceContainerUid = Container.containerUid), 0),\n | fileSize = COALESCE(\n | (SELECT SUM(ContainerEntryFile.ceCompressedSize) AS totalSize \n | FROM ContainerEntry\n | JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid), 0),\n | cntLct = ? \n | \n | WHERE containerUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Container \n | SET cntNumEntries = COALESCE(\n | (SELECT COUNT(*) \n | FROM ContainerEntry \n | WHERE ceContainerUid = Container.containerUid), 0),\n | fileSize = COALESCE(\n | (SELECT SUM(ContainerEntryFile.ceCompressedSize) AS totalSize \n | FROM ContainerEntry\n | JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid), 0),\n | cntLct = ? \n | \n | WHERE containerUid = ?\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$updateContainerSizeAndNumEntries$lambda(changeTime, containerUid)); }; function Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(closure$changeTime_0, closure$containerUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$containerUid = closure$containerUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda; Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(closure$changeTime_0, closure$containerUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(closure$changeTime_0, closure$containerUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$($this, containerUid_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$changeTime = changeTime_0; } Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.prototype.constructor = Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Container \n | SET cntNumEntries = COALESCE(\n | (SELECT COUNT(*) \n | FROM ContainerEntry \n | WHERE ceContainerUid = Container.containerUid), 0),\n | fileSize = COALESCE(\n | (SELECT SUM(ContainerEntryFile.ceCompressedSize) AS totalSize \n | FROM ContainerEntry\n | JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid), 0),\n | cntLct = ? \n | \n | WHERE containerUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Container \n | SET cntNumEntries = COALESCE(\n | (SELECT COUNT(*) \n | FROM ContainerEntry \n | WHERE ceContainerUid = Container.containerUid), 0),\n | fileSize = COALESCE(\n | (SELECT SUM(ContainerEntryFile.ceCompressedSize) AS totalSize \n | FROM ContainerEntry\n | JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid), 0),\n | cntLct = ? \n | \n | WHERE containerUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(this.local$changeTime, this.local$containerUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.updateContainerSizeAndNumEntriesAsync_3pjtqy$ = function (containerUid_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$(this, containerUid_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda(closure$containerUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda$lambda(closure$_result)); return Unit; }; } ContainerDao_JdbcKt.prototype.findLocalAvailabilityByUid_s8cxhz$ = function (containerUid) { var _result = {v: L0}; var _stmtConfig = new PreparedStatementConfig('SELECT Container.containerUid FROM Container WHERE Container.containerUid = ? AND (SELECT COUNT(*) FROM ContainerEntry WHERE ceContainerUid = Container.containerUid) = Container.cntNumEntries', void 0, void 0, void 0, trimMargin('\n |SELECT Container.containerUid FROM Container WHERE Container.containerUid = ? AND (SELECT COUNT(*) FROM ContainerEntry WHERE ceContainerUid = Container.containerUid) = Container.cntNumEntries\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda(containerUid, _result)); return _result.v; }; function ContainerDao_JdbcKt$findAllWithId$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerDao_JdbcKt$findAllWithId$lambda(closure$containerUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findAllWithId$lambda$lambda(closure$_result)); return Unit; }; } ContainerDao_JdbcKt.prototype.findAllWithId_s8cxhz$ = function (containerUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Container WHERE Container.containerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Container WHERE Container.containerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$findAllWithId$lambda(containerUid, _result)); return _result.v; }; function ContainerDao_JdbcKt$findKhanContainers$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new ContainerWithContentEntry(); _entity.entryId = tmp_entryId; _entity.sourceUrl = tmp_sourceUrl; _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerDao_JdbcKt$findKhanContainers$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findKhanContainers$lambda$lambda(closure$_result)); return Unit; }; } ContainerDao_JdbcKt.prototype.findKhanContainers = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig("SELECT Container.*, ContentEntry.entryId, ContentEntry.sourceUrl FROM Container LEFT JOIN ContentEntry ON Container.containerContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publisher LIKE '%Khan Academy%' AND Container.mimeType = 'video/mp4'", void 0, void 0, void 0, trimMargin("\n |SELECT Container.*, ContentEntry.entryId, ContentEntry.sourceUrl FROM Container LEFT JOIN ContentEntry ON Container.containerContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publisher LIKE '%Khan Academy%' AND Container.mimeType = 'video/mp4'\n |")); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$findKhanContainers$lambda(_result)); return _result.v; }; function ContainerDao_JdbcKt$deleteByUid$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerDao_JdbcKt.prototype.deleteByUid_s8cxhz$ = function (containerUid) { var _stmtConfig = new PreparedStatementConfig('DELETE FROM Container WHERE containerUid = ?', void 0, void 0, void 0, trimMargin('\n |DELETE FROM Container WHERE containerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$deleteByUid$lambda(containerUid)); }; function ContainerDao_JdbcKt$updateMimeType$lambda(closure$mimeType, closure$containerUid) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$mimeType); _stmt.setLong_6svq3l$(2, closure$containerUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerDao_JdbcKt.prototype.updateMimeType_4wgjuj$ = function (mimeType, containerUid) { var _stmtConfig = new PreparedStatementConfig('UPDATE Container SET mimeType = ? WHERE Container.containerUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE Container SET mimeType = ? WHERE Container.containerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerDao_JdbcKt$updateMimeType$lambda(mimeType, containerUid)); }; function ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); var _entity = new Container(); _entity.containerUid = tmp_containerUid; _entity.cntLocalCsn = tmp_cntLocalCsn; _entity.cntMasterCsn = tmp_cntMasterCsn; _entity.cntLastModBy = tmp_cntLastModBy; _entity.cntLct = tmp_cntLct; _entity.fileSize = tmp_fileSize; _entity.containerContentEntryUid = tmp_containerContentEntryUid; _entity.cntLastModified = tmp_cntLastModified; _entity.mimeType = tmp_mimeType; _entity.remarks = tmp_remarks; _entity.mobileOptimized = tmp_mobileOptimized; _entity.cntNumEntries = tmp_cntNumEntries; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$; Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Container) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.*\n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Container.*\n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.getMostRecentContainerForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$; Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT containerUid \n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | ), 0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT containerUid \n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | ), 0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.getMostRecentContainerUidForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var _entity = new ContainerUidAndMimeType(); _entity.containerUid = tmp_containerUid; _entity.mimeType = tmp_mimeType; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(closure$contentEntryUid_0, closure$downloadRequired_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$downloadRequired = closure$downloadRequired_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setBoolean_fzusl$(2, this.local$closure$downloadRequired); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(closure$contentEntryUid_0, closure$downloadRequired_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(closure$contentEntryUid_0, closure$downloadRequired_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$($this, contentEntryUid_0, downloadRequired_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; this.local$downloadRequired = downloadRequired_0; } Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.prototype.constructor = Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$; Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerUidAndMimeType) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.containerUid, Container.mimeType \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | AND (CAST(? AS INTEGER) = 0\n | OR EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid))\n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Container.containerUid, Container.mimeType \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | AND (CAST(? AS INTEGER) = 0\n | OR EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid))\n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(this.local$contentEntryUid, this.local$downloadRequired, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.getMostRecentAvailableContainerUidAndMimeType_2gd3um$ = function (contentEntryUid_0, downloadRequired_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$(this, contentEntryUid_0, downloadRequired_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_JdbcKt.prototype.replaceList_5ys87q$ = function (entries) { this._insertAdapterContainer_upsert.insertList_4ezy5m$(entries); }; ContainerDao_JdbcKt.prototype.insertWithReplace_2nhbaz$ = function (container) { this._insertAdapterContainer_upsert.insert_11rb$(container); }; function ContainerDao_JdbcKt$getContainerSizeByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda(closure$containerUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda; Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getContainerSizeByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getContainerSizeByUid$lambda(closure$containerUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda(closure$containerUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getContainerSizeByUid_s8cxhz$($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$containerUid = containerUid_0; } Coroutine$getContainerSizeByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContainerSizeByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContainerSizeByUid_s8cxhz$.prototype.constructor = Coroutine$getContainerSizeByUid_s8cxhz$; Coroutine$getContainerSizeByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT fileSize\n | FROM Container\n | WHERE containerUid = ?), -1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT fileSize\n | FROM Container\n | WHERE containerUid = ?), -1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerDao_JdbcKt$getContainerSizeByUid$lambda(this.local$containerUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.getContainerSizeByUid_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$getContainerSizeByUid_s8cxhz$(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainer_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_34($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_34.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_34.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_34.prototype.constructor = Coroutine$insertAsync_34; Coroutine$insertAsync_34.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainer_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_34(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainer_.insertList_4ezy5m$(entityList); }; function ContainerDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cntLocalCsn); _stmt.setLong_6svq3l$(2, _entity.cntMasterCsn); _stmt.setInt_vux9f0$(3, _entity.cntLastModBy); _stmt.setLong_6svq3l$(4, _entity.cntLct); _stmt.setLong_6svq3l$(5, _entity.fileSize); _stmt.setLong_6svq3l$(6, _entity.containerContentEntryUid); _stmt.setLong_6svq3l$(7, _entity.cntLastModified); _stmt.setString_vqvrqt$(8, _entity.mimeType); _stmt.setString_vqvrqt$(9, _entity.remarks); _stmt.setBoolean_fzusl$(10, _entity.mobileOptimized); _stmt.setInt_vux9f0$(11, _entity.cntNumEntries); _stmt.setLong_6svq3l$(12, _entity.containerUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Container SET cntLocalCsn = ?, cntMasterCsn = ?, cntLastModBy = ?, cntLct = ?, fileSize = ?, containerContentEntryUid = ?, cntLastModified = ?, mimeType = ?, remarks = ?, mobileOptimized = ?, cntNumEntries = ? WHERE containerUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cntLocalCsn); _stmt.setLong_6svq3l$(2, closure$entity.cntMasterCsn); _stmt.setInt_vux9f0$(3, closure$entity.cntLastModBy); _stmt.setLong_6svq3l$(4, closure$entity.cntLct); _stmt.setLong_6svq3l$(5, closure$entity.fileSize); _stmt.setLong_6svq3l$(6, closure$entity.containerContentEntryUid); _stmt.setLong_6svq3l$(7, closure$entity.cntLastModified); _stmt.setString_vqvrqt$(8, closure$entity.mimeType); _stmt.setString_vqvrqt$(9, closure$entity.remarks); _stmt.setBoolean_fzusl$(10, closure$entity.mobileOptimized); _stmt.setInt_vux9f0$(11, closure$entity.cntNumEntries); _stmt.setLong_6svq3l$(12, closure$entity.containerUid); return _stmt.executeUpdate(); }; } ContainerDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Container SET cntLocalCsn = ?, cntMasterCsn = ?, cntLastModBy = ?, cntLct = ?, fileSize = ?, containerContentEntryUid = ?, cntLastModified = ?, mimeType = ?, remarks = ?, mobileOptimized = ?, cntNumEntries = ? WHERE containerUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerDao_JdbcKt$update$lambda(entity)); }; function ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Container (containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING containerUid'; } else tmp$ = ''; return "INSERT INTO Container (containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES(COALESCE(?,nextval('Container_containerUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.containerUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.containerUid); } stmt.setLong_6svq3l$(2, entity.cntLocalCsn); stmt.setLong_6svq3l$(3, entity.cntMasterCsn); stmt.setInt_vux9f0$(4, entity.cntLastModBy); stmt.setLong_6svq3l$(5, entity.cntLct); stmt.setLong_6svq3l$(6, entity.fileSize); stmt.setLong_6svq3l$(7, entity.containerContentEntryUid); stmt.setLong_6svq3l$(8, entity.cntLastModified); stmt.setString_vqvrqt$(9, entity.mimeType); stmt.setString_vqvrqt$(10, entity.remarks); stmt.setBoolean_fzusl$(11, entity.mobileOptimized); stmt.setInt_vux9f0$(12, entity.cntNumEntries); }; ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO Container (containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING containerUid'; } else tmp$ = ''; return "INSERT INTO Container (containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES(COALESCE(?,nextval('Container_containerUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = excluded.cntLocalCsn,cntMasterCsn = excluded.cntMasterCsn,cntLastModBy = excluded.cntLastModBy,cntLct = excluded.cntLct,fileSize = excluded.fileSize,containerContentEntryUid = excluded.containerContentEntryUid,cntLastModified = excluded.cntLastModified,mimeType = excluded.mimeType,remarks = excluded.remarks,mobileOptimized = excluded.mobileOptimized,cntNumEntries = excluded.cntNumEntries" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.containerUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.containerUid); } stmt.setLong_6svq3l$(2, entity.cntLocalCsn); stmt.setLong_6svq3l$(3, entity.cntMasterCsn); stmt.setInt_vux9f0$(4, entity.cntLastModBy); stmt.setLong_6svq3l$(5, entity.cntLct); stmt.setLong_6svq3l$(6, entity.fileSize); stmt.setLong_6svq3l$(7, entity.containerContentEntryUid); stmt.setLong_6svq3l$(8, entity.cntLastModified); stmt.setString_vqvrqt$(9, entity.mimeType); stmt.setString_vqvrqt$(10, entity.remarks); stmt.setBoolean_fzusl$(11, entity.mobileOptimized); stmt.setInt_vux9f0$(12, entity.cntNumEntries); }; ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao_JdbcKt', interfaces: [ContainerDao]}; function ContainerDao_ReplicateWrapper(_db, _dao) { ContainerDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_36($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_36.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_36.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_36.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_36; Coroutine$replicateOnNewNode_s8cxhz$_36.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_36(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_33($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_33.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_33.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_33.prototype.constructor = Coroutine$replicateOnChange_33; Coroutine$replicateOnChange_33.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_33(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_5ys87q$_0($this, containerList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$containerList = containerList_0; } Coroutine$insertListAsync_5ys87q$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5ys87q$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5ys87q$_0.prototype.constructor = Coroutine$insertListAsync_5ys87q$_0; Coroutine$insertListAsync_5ys87q$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$containerList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.containerUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(51, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.containerUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cntLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_5ys87q$(this.local$containerList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.insertListAsync_5ys87q$ = function (containerList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5ys87q$_0(this, containerList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$ = function (contentEntry, continuation) { return this._dao_0.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$(contentEntry, continuation); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentContainerForContentEntry_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findSizeByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findSizeByUid_s8cxhz$(uid, continuation); }; ContainerDao_ReplicateWrapper.prototype.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$ = function (contentEntries, continuation) { return this._dao_0.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$(contentEntries, continuation); }; ContainerDao_ReplicateWrapper.prototype.findContainersForContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findContainersForContentEntryUid_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.hasContainerWithFilesToDownload_s8cxhz$ = function (contentEntryUid) { return this._dao_0.hasContainerWithFilesToDownload_s8cxhz$(contentEntryUid); }; ContainerDao_ReplicateWrapper.prototype.findContainerWithFilesByContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findContainerWithFilesByContentEntryUid_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.findAllPublikContainers = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (containerUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(containerUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.updateContainerSizeAndNumEntries_3pjtqy$ = function (containerUid, changeTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0($this, containerUid_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$changeTime = changeTime_0; } Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.prototype.constructor = Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateContainerSizeAndNumEntriesAsync_3pjtqy$(this.local$containerUid, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.updateContainerSizeAndNumEntriesAsync_3pjtqy$ = function (containerUid_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0(this, containerUid_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_ReplicateWrapper.prototype.findLocalAvailabilityByUid_s8cxhz$ = function (containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findAllWithId_s8cxhz$ = function (containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findKhanContainers = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.deleteByUid_s8cxhz$ = function (containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.updateMimeType_4wgjuj$ = function (mimeType, containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentContainerForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.getMostRecentContainerForContentEntryAsync_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentContainerUidForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.getMostRecentContainerUidForContentEntryAsync_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentAvailableContainerUidAndMimeType_2gd3um$ = function (contentEntryUid, downloadRequired, continuation) { return this._dao_0.getMostRecentAvailableContainerUidAndMimeType_2gd3um$(contentEntryUid, downloadRequired, continuation); }; ContainerDao_ReplicateWrapper.prototype.replaceList_5ys87q$ = function (entries) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.insertWithReplace_2nhbaz$ = function (container) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.getContainerSizeByUid_s8cxhz$ = function (containerUid, continuation) { return this._dao_0.getContainerSizeByUid_s8cxhz$(containerUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_35($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_35.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_35.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_35.prototype.constructor = Coroutine$insertAsync_35; Coroutine$insertAsync_35.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.containerUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(51, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.containerUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cntLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.containerUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_35(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao_ReplicateWrapper', interfaces: [ContainerDao]}; function ContainerDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContainerDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_37($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_37.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_37.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_37.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_37; Coroutine$replicateOnNewNode_s8cxhz$_37.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_37(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_34($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_34.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_34.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_34.prototype.constructor = Coroutine$replicateOnChange_34; Coroutine$replicateOnChange_34.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_34(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_5ys87q$_1($this, containerList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerList = containerList_0; } Coroutine$insertListAsync_5ys87q$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5ys87q$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5ys87q$_1.prototype.constructor = Coroutine$insertListAsync_5ys87q$_1; Coroutine$insertListAsync_5ys87q$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_5ys87q$(this.local$containerList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.insertListAsync_5ys87q$ = function (containerList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5ys87q$_1(this, containerList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0($this, contentEntry_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntry = contentEntry_0; } Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0.prototype.constructor = Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0; Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$(this.local$contentEntry, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$ = function (contentEntry_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$_0(this, contentEntry_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.getMostRecentContainerForContentEntry_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.getMostRecentContainerForContentEntry_s8cxhz$(contentEntryUid); return _result; }; ContainerDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findSizeByUid_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findSizeByUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSizeByUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSizeByUid_s8cxhz$_0.prototype.constructor = Coroutine$findSizeByUid_s8cxhz$_0; Coroutine$findSizeByUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSizeByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findSizeByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findSizeByUid_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0($this, contentEntries_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntries = contentEntries_0; } Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0.prototype.constructor = Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0; Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$(this.local$contentEntries, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$ = function (contentEntries_0, continuation_0, suspended) { var instance = new Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$_0(this, contentEntries_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findContainersForContentEntryUid_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findContainersForContentEntryUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContainersForContentEntryUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContainersForContentEntryUid_s8cxhz$_0.prototype.constructor = Coroutine$findContainersForContentEntryUid_s8cxhz$_0; Coroutine$findContainersForContentEntryUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findContainersForContentEntryUid_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findContainersForContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findContainersForContentEntryUid_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.hasContainerWithFilesToDownload_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.hasContainerWithFilesToDownload_s8cxhz$(contentEntryUid); return _result; }; function Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0.prototype.constructor = Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0; Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findContainerWithFilesByContentEntryUid_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findContainerWithFilesByContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.findAllPublikContainers = function () { var _result = this._dao.findAllPublikContainers(); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_8($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; } Coroutine$findByUidAsync_s8cxhz$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_8.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_8; Coroutine$findByUidAsync_s8cxhz$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$containerUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_8(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.updateContainerSizeAndNumEntries_3pjtqy$ = function (containerUid, changeTime) { this._dao.updateContainerSizeAndNumEntries_3pjtqy$(containerUid, changeTime); }; function Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1($this, containerUid_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$changeTime = changeTime_0; } Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.prototype.constructor = Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateContainerSizeAndNumEntriesAsync_3pjtqy$(this.local$containerUid, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.updateContainerSizeAndNumEntriesAsync_3pjtqy$ = function (containerUid_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1(this, containerUid_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.findLocalAvailabilityByUid_s8cxhz$ = function (containerUid) { var _result = this._dao.findLocalAvailabilityByUid_s8cxhz$(containerUid); return _result; }; ContainerDao_Repo.prototype.findAllWithId_s8cxhz$ = function (containerUid) { var _result = this._dao.findAllWithId_s8cxhz$(containerUid); return _result; }; ContainerDao_Repo.prototype.findKhanContainers = function () { var _result = this._dao.findKhanContainers(); return _result; }; ContainerDao_Repo.prototype.deleteByUid_s8cxhz$ = function (containerUid) { this._dao.deleteByUid_s8cxhz$(containerUid); }; ContainerDao_Repo.prototype.updateMimeType_4wgjuj$ = function (mimeType, containerUid) { this._dao.updateMimeType_4wgjuj$(mimeType, containerUid); }; function Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0.prototype.constructor = Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0; Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentContainerForContentEntryAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentContainerForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0.prototype.constructor = Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0; Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentContainerUidForContentEntryAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentContainerUidForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0($this, contentEntryUid_0, downloadRequired_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$downloadRequired = downloadRequired_0; } Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0.prototype.constructor = Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0; Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentAvailableContainerUidAndMimeType_2gd3um$(this.local$contentEntryUid, this.local$downloadRequired, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentAvailableContainerUidAndMimeType_2gd3um$ = function (contentEntryUid_0, downloadRequired_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$_0(this, contentEntryUid_0, downloadRequired_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.replaceList_5ys87q$ = function (entries) { this._dao.replaceList_5ys87q$(entries); }; ContainerDao_Repo.prototype.insertWithReplace_2nhbaz$ = function (container) { this._dao.insertWithReplace_2nhbaz$(container); }; function Coroutine$getContainerSizeByUid_s8cxhz$_0($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; } Coroutine$getContainerSizeByUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContainerSizeByUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContainerSizeByUid_s8cxhz$_0.prototype.constructor = Coroutine$getContainerSizeByUid_s8cxhz$_0; Coroutine$getContainerSizeByUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContainerSizeByUid_s8cxhz$(this.local$containerUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getContainerSizeByUid_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$getContainerSizeByUid_s8cxhz$_0(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_36($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_36.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_36.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_36.prototype.constructor = Coroutine$insertAsync_36; Coroutine$insertAsync_36.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_36(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContainerDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContainerDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContainerDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao_Repo', interfaces: [ContainerDao]}; function ContainerETagDao_JdbcKt(_db) { ContainerETagDao.call(this); this._db = _db; this._insertAdapterContainerETag_ = new ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral(this._db); } function ContainerETagDao_JdbcKt$getEtagOfContainer$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function ContainerETagDao_JdbcKt$getEtagOfContainer$lambda(closure$containerUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); useResults(_stmt.executeQuery(), ContainerETagDao_JdbcKt$getEtagOfContainer$lambda$lambda(closure$_result)); return Unit; }; } ContainerETagDao_JdbcKt.prototype.getEtagOfContainer_s8cxhz$ = function (containerUid) { var tmp$; var _result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT cetag FROM ContainerETag WHERE ceContainerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT cetag FROM ContainerETag WHERE ceContainerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerETagDao_JdbcKt$getEtagOfContainer$lambda(containerUid, _result)); return _result.v; }; ContainerETagDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerETag_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_37($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_37.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_37.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_37.prototype.constructor = Coroutine$insertAsync_37; Coroutine$insertAsync_37.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerETag_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerETagDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_37(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerETagDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerETag_.insertList_4ezy5m$(entityList); }; function ContainerETagDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.cetag); _stmt.setLong_6svq3l$(2, _entity.ceContainerUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerETagDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerETag SET cetag = ? WHERE ceContainerUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerETagDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerETagDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.cetag); _stmt.setLong_6svq3l$(2, closure$entity.ceContainerUid); return _stmt.executeUpdate(); }; } ContainerETagDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerETag SET cetag = ? WHERE ceContainerUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerETagDao_JdbcKt$update$lambda(entity)); }; function ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContainerETag (ceContainerUid, cetag) VALUES(?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING ceContainerUid'; } else tmp$ = ''; return 'INSERT INTO ContainerETag (ceContainerUid, cetag) VALUES(?, ?)' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.ceContainerUid); stmt.setString_vqvrqt$(2, entity.cetag); }; ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerETagDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerETagDao_JdbcKt', interfaces: [ContainerETagDao]}; function ContainerEntryDao_JdbcKt(_db) { ContainerEntryDao.call(this); this._db = _db; this._insertAdapterContainerEntry_ = new ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_oe4mvo$($this, containerEntryList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerEntryList = containerEntryList_0; } Coroutine$insertListAsync_oe4mvo$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_oe4mvo$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_oe4mvo$.prototype.constructor = Coroutine$insertListAsync_oe4mvo$; Coroutine$insertListAsync_oe4mvo$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntry_.insertListAsync_4ezy5m$(this.local$containerEntryList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.insertListAsync_oe4mvo$ = function (containerEntryList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_oe4mvo$(this, containerEntryList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryDao_JdbcKt$findByContainer$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_ceUid = _resultSet.getLong_61zpoe$('ceUid'); var tmp_ceContainerUid = _resultSet.getLong_61zpoe$('ceContainerUid'); var tmp_cePath = _resultSet.getString_61zpoe$('cePath'); var tmp_ceCefUid = _resultSet.getLong_61zpoe$('ceCefUid'); var _entity = new ContainerEntryWithContainerEntryFile(); _entity.ceUid = tmp_ceUid; _entity.ceContainerUid = tmp_ceContainerUid; _entity.cePath = tmp_cePath; _entity.ceCefUid = tmp_ceCefUid; var _containerEntryFile_nullFieldCount = 0; var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_compression = _resultSet.getInt_61zpoe$('compression'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }if (_containerEntryFile_nullFieldCount < 7) { if (_entity.containerEntryFile == null) { _entity.containerEntryFile = new ContainerEntryFile(); }ensureNotNull(_entity.containerEntryFile).cefUid = tmp_cefUid; ensureNotNull(_entity.containerEntryFile).cefMd5 = tmp_cefMd5; ensureNotNull(_entity.containerEntryFile).cefPath = tmp_cefPath; ensureNotNull(_entity.containerEntryFile).ceTotalSize = tmp_ceTotalSize; ensureNotNull(_entity.containerEntryFile).ceCompressedSize = tmp_ceCompressedSize; ensureNotNull(_entity.containerEntryFile).compression = tmp_compression; ensureNotNull(_entity.containerEntryFile).lastModified = tmp_lastModified; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerEntryDao_JdbcKt$findByContainer$lambda(closure$containerUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); useResults(_stmt.executeQuery(), ContainerEntryDao_JdbcKt$findByContainer$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.findByContainer_s8cxhz$ = function (containerUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryDao_JdbcKt$findByContainer$lambda(containerUid, _result)); return _result.v; }; function ContainerEntryDao_JdbcKt$findByPathInContainer$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_ceUid = _resultSet.getLong_61zpoe$('ceUid'); var tmp_ceContainerUid = _resultSet.getLong_61zpoe$('ceContainerUid'); var tmp_cePath = _resultSet.getString_61zpoe$('cePath'); var tmp_ceCefUid = _resultSet.getLong_61zpoe$('ceCefUid'); var _entity = new ContainerEntryWithContainerEntryFile(); _entity.ceUid = tmp_ceUid; _entity.ceContainerUid = tmp_ceContainerUid; _entity.cePath = tmp_cePath; _entity.ceCefUid = tmp_ceCefUid; var _containerEntryFile_nullFieldCount = 0; var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_compression = _resultSet.getInt_61zpoe$('compression'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }if (_containerEntryFile_nullFieldCount < 7) { if (_entity.containerEntryFile == null) { _entity.containerEntryFile = new ContainerEntryFile(); }ensureNotNull(_entity.containerEntryFile).cefUid = tmp_cefUid; ensureNotNull(_entity.containerEntryFile).cefMd5 = tmp_cefMd5; ensureNotNull(_entity.containerEntryFile).cefPath = tmp_cefPath; ensureNotNull(_entity.containerEntryFile).ceTotalSize = tmp_ceTotalSize; ensureNotNull(_entity.containerEntryFile).ceCompressedSize = tmp_ceCompressedSize; ensureNotNull(_entity.containerEntryFile).compression = tmp_compression; ensureNotNull(_entity.containerEntryFile).lastModified = tmp_lastModified; }closure$_result.v = _entity; }return Unit; }; } function ContainerEntryDao_JdbcKt$findByPathInContainer$lambda(closure$containerUid, closure$pathInContainer, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); _stmt.setString_vqvrqt$(2, closure$pathInContainer); useResults(_stmt.executeQuery(), ContainerEntryDao_JdbcKt$findByPathInContainer$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.findByPathInContainer_a4hdmt$ = function (containerUid, pathInContainer) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerEntryWithContainerEntryFile) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ? AND ContainerEntry.cePath = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ? AND ContainerEntry.cePath = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryDao_JdbcKt$findByPathInContainer$lambda(containerUid, pathInContainer, _result)); return _result.v; }; function ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_ceUid = _resultSet.getLong_61zpoe$('ceUid'); var tmp_ceContainerUid = _resultSet.getLong_61zpoe$('ceContainerUid'); var tmp_cePath = _resultSet.getString_61zpoe$('cePath'); var tmp_ceCefUid = _resultSet.getLong_61zpoe$('ceCefUid'); var _entity = new ContainerEntryWithMd5(); _entity.cefMd5 = tmp_cefMd5; _entity.ceUid = tmp_ceUid; _entity.ceContainerUid = tmp_ceContainerUid; _entity.cePath = tmp_cePath; _entity.ceCefUid = tmp_ceCefUid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda(closure$containerUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); useResults(_stmt.executeQuery(), ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.findByContainerWithMd5_s8cxhz$ = function (containerUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.cefMd5 AS cefMd5 FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContainerEntry.*, ContainerEntryFile.cefMd5 AS cefMd5 FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda(containerUid, _result)); return _result.v; }; function ContainerEntryDao_JdbcKt$findByContainerAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_ceUid = _resultSet.getLong_61zpoe$('ceUid'); var tmp_ceContainerUid = _resultSet.getLong_61zpoe$('ceContainerUid'); var tmp_cePath = _resultSet.getString_61zpoe$('cePath'); var tmp_ceCefUid = _resultSet.getLong_61zpoe$('ceCefUid'); var _entity = new ContainerEntryWithContainerEntryFile(); _entity.ceUid = tmp_ceUid; _entity.ceContainerUid = tmp_ceContainerUid; _entity.cePath = tmp_cePath; _entity.ceCefUid = tmp_ceCefUid; var _containerEntryFile_nullFieldCount = 0; var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_compression = _resultSet.getInt_61zpoe$('compression'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); if (_resultSet.wasNull()) { _containerEntryFile_nullFieldCount = _containerEntryFile_nullFieldCount + 1 | 0; }if (_containerEntryFile_nullFieldCount < 7) { if (_entity.containerEntryFile == null) { _entity.containerEntryFile = new ContainerEntryFile(); }ensureNotNull(_entity.containerEntryFile).cefUid = tmp_cefUid; ensureNotNull(_entity.containerEntryFile).cefMd5 = tmp_cefMd5; ensureNotNull(_entity.containerEntryFile).cefPath = tmp_cefPath; ensureNotNull(_entity.containerEntryFile).ceTotalSize = tmp_ceTotalSize; ensureNotNull(_entity.containerEntryFile).ceCompressedSize = tmp_ceCompressedSize; ensureNotNull(_entity.containerEntryFile).compression = tmp_compression; ensureNotNull(_entity.containerEntryFile).lastModified = tmp_lastModified; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(closure$containerUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.prototype.constructor = Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda; Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryDao_JdbcKt$findByContainerAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(closure$containerUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(closure$containerUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByContainerAsync_s8cxhz$($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$containerUid = containerUid_0; } Coroutine$findByContainerAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByContainerAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByContainerAsync_s8cxhz$.prototype.constructor = Coroutine$findByContainerAsync_s8cxhz$; Coroutine$findByContainerAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(this.local$containerUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.findByContainerAsync_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$findByContainerAsync_s8cxhz$(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryDao_JdbcKt$deleteByContainerUid$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.deleteByContainerUid_s8cxhz$ = function (containerUid) { var _stmtConfig = new PreparedStatementConfig('DELETE FROM ContainerEntry WHERE ceContainerUid = ?', void 0, void 0, void 0, trimMargin('\n |DELETE FROM ContainerEntry WHERE ceContainerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryDao_JdbcKt$deleteByContainerUid$lambda(containerUid)); }; function ContainerEntryDao_JdbcKt$deleteList$lambda(closure$entries, closure$_numChanges) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entries.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ceUid); closure$_numChanges.v = closure$_numChanges.v + _stmt.executeUpdate() | 0; } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.deleteList_oe4mvo$ = function (entries) { var _numChanges = {v: 0}; prepareAndUseStatement_0(this._db, 'DELETE FROM ContainerEntry WHERE ceUid = ?', ContainerEntryDao_JdbcKt$deleteList$lambda(entries, _numChanges)); }; function ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda(closure$jobId) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$jobId); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.deleteContainerEntriesCreatedByJobs_s8cxhz$ = function (jobId) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | DELETE FROM ContainerEntry \n | WHERE ceContainerUid \n | IN (SELECT cjiContainerUid \n | FROM ContentJobItem\n | JOIN ContentJob \n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE ContentJob.cjUid = ?)\n '), void 0, void 0, void 0, trimMargin('\n |\n | DELETE FROM ContainerEntry \n | WHERE ceContainerUid \n | IN (SELECT cjiContainerUid \n | FROM ContentJobItem\n | JOIN ContentJob \n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE ContentJob.cjUid = ?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda(jobId)); }; function ContainerEntryDao_JdbcKt$deleteByContentEntryUid$lambda(closure$contentEntryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.deleteByContentEntryUid_s8cxhz$ = function (contentEntryUid) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | DELETE FROM ContainerEntry\n | WHERE ceContainerUid\n | IN (SELECT containerUid\n | FROM Container\n | WHERE containerContentEntryUid = ?) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | DELETE FROM ContainerEntry\n | WHERE ceContainerUid\n | IN (SELECT containerUid\n | FROM Container\n | WHERE containerContentEntryUid = ?) \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryDao_JdbcKt$deleteByContentEntryUid$lambda(contentEntryUid)); }; function Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(closure$containerUid_0, closure$path_0, closure$md5_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$path = closure$path_0; this.local$closure$md5 = closure$md5_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.prototype.constructor = Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda; Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$path); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$md5); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(closure$containerUid_0, closure$path_0, closure$md5_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(closure$containerUid_0, closure$path_0, closure$md5_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$insertWithMd5SumsAsync_r69jt9$($this, containerUid_0, path_0, md5_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$path = path_0; this.local$md5 = md5_0; } Coroutine$insertWithMd5SumsAsync_r69jt9$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertWithMd5SumsAsync_r69jt9$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertWithMd5SumsAsync_r69jt9$.prototype.constructor = Coroutine$insertWithMd5SumsAsync_r69jt9$; Coroutine$insertWithMd5SumsAsync_r69jt9$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | INSERT INTO ContainerEntry(ceContainerUid, cePath, ceCefUid) \n | SELECT ? AS ceContainerUid, ? AS cePath, \n | (SELECT COALESCE(\n | (SELECT cefUid \n | FROM ContainerEntryFile\n | WHERE cefMd5 = ?\n | LIMIT 1), 0)) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | INSERT INTO ContainerEntry(ceContainerUid, cePath, ceCefUid) \n | SELECT ? AS ceContainerUid, ? AS cePath, \n | (SELECT COALESCE(\n | (SELECT cefUid \n | FROM ContainerEntryFile\n | WHERE cefMd5 = ?\n | LIMIT 1), 0)) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(this.local$containerUid, this.local$path, this.local$md5), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.insertWithMd5SumsAsync_r69jt9$ = function (containerUid_0, path_0, md5_0, continuation_0, suspended) { var instance = new Coroutine$insertWithMd5SumsAsync_r69jt9$(this, containerUid_0, path_0, md5_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerEntry_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_38($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_38.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_38.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_38.prototype.constructor = Coroutine$insertAsync_38; Coroutine$insertAsync_38.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntry_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_38(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerEntry_.insertList_4ezy5m$(entityList); }; function ContainerEntryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ceContainerUid); _stmt.setString_vqvrqt$(2, _entity.cePath); _stmt.setLong_6svq3l$(3, _entity.ceCefUid); _stmt.setLong_6svq3l$(4, _entity.ceUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerEntry SET ceContainerUid = ?, cePath = ?, ceCefUid = ? WHERE ceUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerEntryDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerEntryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ceContainerUid); _stmt.setString_vqvrqt$(2, closure$entity.cePath); _stmt.setLong_6svq3l$(3, closure$entity.ceCefUid); _stmt.setLong_6svq3l$(4, closure$entity.ceUid); return _stmt.executeUpdate(); }; } ContainerEntryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerEntry SET ceContainerUid = ?, cePath = ?, ceCefUid = ? WHERE ceUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerEntryDao_JdbcKt$update$lambda(entity)); }; function ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContainerEntry (ceUid, ceContainerUid, cePath, ceCefUid) VALUES(?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING ceUid'; } else tmp$ = ''; return "INSERT INTO ContainerEntry (ceUid, ceContainerUid, cePath, ceCefUid) VALUES(COALESCE(?,nextval('ContainerEntry_ceUid_seq')), ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ceUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ceUid); } stmt.setLong_6svq3l$(2, entity.ceContainerUid); stmt.setString_vqvrqt$(3, entity.cePath); stmt.setLong_6svq3l$(4, entity.ceCefUid); }; ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerEntryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryDao_JdbcKt', interfaces: [ContainerEntryDao]}; function ContainerEntryFileDao_JdbcKt(_db) { ContainerEntryFileDao.call(this); this._db = _db; this._insertAdapterContainerEntryFile_ = new ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_aufyg$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$insertListAsync_aufyg$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_aufyg$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_aufyg$.prototype.constructor = Coroutine$insertListAsync_aufyg$; Coroutine$insertListAsync_aufyg$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntryFile_.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.insertListAsync_aufyg$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_aufyg$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda(this$ContainerEntryFileDao_JdbcKt, closure$md5Sums, closure$_result) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, this$ContainerEntryFileDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'TEXT', copyToArray(closure$md5Sums))); useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.findEntriesByMd5Sums_mhpeer$ = function (md5Sums) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 IN (?)', true, void 0, void 0, trimMargin('\n |SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 IN (?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda(this, md5Sums, _result)); return _result.v; }; function ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$md5Sums_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerEntryFileDao_JdbcKt = this$ContainerEntryFileDao_JdbcKt_0; this.local$closure$md5Sums = closure$md5Sums_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ContainerEntryFileDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'TEXT', copyToArray(this.local$closure$md5Sums))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$md5Sums_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$md5Sums_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findEntriesByMd5SumsAsync_mhpeer$($this, md5Sums_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$md5Sums = md5Sums_0; } Coroutine$findEntriesByMd5SumsAsync_mhpeer$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntriesByMd5SumsAsync_mhpeer$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntriesByMd5SumsAsync_mhpeer$.prototype.constructor = Coroutine$findEntriesByMd5SumsAsync_mhpeer$; Coroutine$findEntriesByMd5SumsAsync_mhpeer$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 IN (?)', true, void 0, void 0, trimMargin('\n |SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(this.$this, this.local$md5Sums, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.findEntriesByMd5SumsAsync_mhpeer$ = function (md5Sums_0, continuation_0, suspended) { var instance = new Coroutine$findEntriesByMd5SumsAsync_mhpeer$(this, md5Sums_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$md5Sums_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerEntryFileDao_JdbcKt = this$ContainerEntryFileDao_JdbcKt_0; this.local$closure$md5Sums = closure$md5Sums_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ContainerEntryFileDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'TEXT', copyToArray(this.local$closure$md5Sums))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$md5Sums_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$md5Sums_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$($this, md5Sums_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$md5Sums = md5Sums_0; } Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$.prototype.constructor = Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$; Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntryFile.cefMd5 FROM ContainerEntryFile WHERE cefMd5 IN (?)', true, void 0, void 0, trimMargin('\n |SELECT ContainerEntryFile.cefMd5 FROM ContainerEntryFile WHERE cefMd5 IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(this.$this, this.local$md5Sums, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.findExistingMd5SumsByMd5SumsAsync_mhpeer$ = function (md5Sums_0, continuation_0, suspended) { var instance = new Coroutine$findExistingMd5SumsByMd5SumsAsync_mhpeer$(this, md5Sums_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda(this$ContainerEntryFileDao_JdbcKt, closure$uidList, closure$_result) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, this$ContainerEntryFileDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.findEntriesByUids_gox9k8$ = function (uidList) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefUid IN (?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda(this, uidList, _result)); return _result.v; }; function ContainerEntryFileDao_JdbcKt$updateFilePath$lambda(closure$path, closure$cefUid) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$path); _stmt.setLong_6svq3l$(2, closure$cefUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.updateFilePath_a4hdmt$ = function (cefUid, path) { var _stmtConfig = new PreparedStatementConfig('UPDATE ContainerEntryFile SET cefPath = ? WHERE cefUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerEntryFile SET cefPath = ? WHERE cefUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$updateFilePath$lambda(path, cefUid)); }; function ContainerEntryFileDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v = _entity; }return Unit; }; } function ContainerEntryFileDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerEntryFile) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContainerEntryFile WHERE cefUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContainerEntryFile WHERE cefUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda(closure$containerUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.sumContainerFileEntrySizes_s8cxhz$ = function (containerUid) { var _result = {v: L0}; var _stmtConfig = new PreparedStatementConfig('SELECT SUM(ContainerEntryFile.ceCompressedSize) FROM ContainerEntry JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT SUM(ContainerEntryFile.ceCompressedSize) FROM ContainerEntry JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda(containerUid, _result)); return _result.v; }; function ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getAllFilesForCompression($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$getAllFilesForCompression.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllFilesForCompression.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllFilesForCompression.prototype.constructor = Coroutine$getAllFilesForCompression; Coroutine$getAllFilesForCompression.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig("SELECT * FROM ContainerEntryFile WHERE compression = 0 AND NOT EXISTS(SELECT * FROM ContainerEntry WHERE ceCefUid = ContainerEntryFile.cefUid AND (ContainerEntry.cePath LIKE '%.webm' OR ContainerEntry.cePath LIKE '%.mp4')) LIMIT 100", void 0, void 0, void 0, trimMargin("\n |SELECT * FROM ContainerEntryFile WHERE compression = 0 AND NOT EXISTS(SELECT * FROM ContainerEntry WHERE ceCefUid = ContainerEntryFile.cefUid AND (ContainerEntry.cePath LIKE '%.webm' OR ContainerEntry.cePath LIKE '%.mp4')) LIMIT 100\n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.getAllFilesForCompression = function (continuation_0, suspended) { var instance = new Coroutine$getAllFilesForCompression(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryFileDao_JdbcKt$updateCompressedFile$lambda(closure$compression, closure$ceCompressedSize, closure$cefUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$compression); _stmt.setLong_6svq3l$(2, closure$ceCompressedSize); _stmt.setLong_6svq3l$(3, closure$cefUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.updateCompressedFile_h639zw$ = function (compression, ceCompressedSize, cefUid) { var _stmtConfig = new PreparedStatementConfig('UPDATE ContainerEntryFile SET compression = ?, ceCompressedSize = ? WHERE cefUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerEntryFile SET compression = ?, ceCompressedSize = ? WHERE cefUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$updateCompressedFile$lambda(compression, ceCompressedSize, cefUid)); }; function ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda$lambda(closure$_result)); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.findZombieEntries = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ContainerEntryFile.* \n | FROM ContainerEntryFile \n | WHERE NOT EXISTS (SELECT ContainerEntry.ceCefUid \n | FROM ContainerEntry \n | WHERE ContainerEntryFile.cefUid = ContainerEntry.ceCefUid) \n | LIMIT 100\n '), void 0, void 0, void 0, trimMargin('\n |SELECT ContainerEntryFile.* \n | FROM ContainerEntryFile \n | WHERE NOT EXISTS (SELECT ContainerEntry.ceCefUid \n | FROM ContainerEntry \n | WHERE ContainerEntryFile.cefUid = ContainerEntry.ceCefUid) \n | LIMIT 100\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda(_result)); return _result.v; }; function ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var _entity = new ContainerEntryFileUidAndPath(); _entity.cefUid = tmp_cefUid; _entity.cefPath = tmp_cefPath; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(closure$limit_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$limit = closure$limit_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$limit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(closure$limit_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(closure$limit_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findZombieUidsAndPath_za3lpa$($this, limit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$limit = limit_0; } Coroutine$findZombieUidsAndPath_za3lpa$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findZombieUidsAndPath_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findZombieUidsAndPath_za3lpa$.prototype.constructor = Coroutine$findZombieUidsAndPath_za3lpa$; Coroutine$findZombieUidsAndPath_za3lpa$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT cefUid, cefPath\n | FROM ContainerEntryFile\n | WHERE NOT EXISTS \n | (SELECT ContainerEntry.ceCefUid \n | FROM ContainerEntry \n | WHERE ContainerEntry.ceCefUid = ContainerEntryFile.cefUid \n | LIMIT 1)\n | LIMIT ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT cefUid, cefPath\n | FROM ContainerEntryFile\n | WHERE NOT EXISTS \n | (SELECT ContainerEntry.ceCefUid \n | FROM ContainerEntry \n | WHERE ContainerEntry.ceCefUid = ContainerEntryFile.cefUid \n | LIMIT 1)\n | LIMIT ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(this.local$limit, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.findZombieUidsAndPath_za3lpa$ = function (limit_0, continuation_0, suspended) { var instance = new Coroutine$findZombieUidsAndPath_za3lpa$(this, limit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerEntryFileDao_JdbcKt = this$ContainerEntryFileDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ContainerEntryFileDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(this$ContainerEntryFileDao_JdbcKt_0, closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteByUidList_gox9k8$($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$deleteByUidList_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteByUidList_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteByUidList_gox9k8$.prototype.constructor = Coroutine$deleteByUidList_gox9k8$; Coroutine$deleteByUidList_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | DELETE FROM ContainerEntryFile\n | WHERE cefUid IN (?) \n | \n '), true, void 0, void 0, trimMargin('\n |\n | DELETE FROM ContainerEntryFile\n | WHERE cefUid IN (?) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(this.$this, this.local$uidList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.deleteByUidList_gox9k8$ = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$deleteByUidList_gox9k8$(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryFileDao_JdbcKt$deleteListOfEntryFiles$lambda(closure$entriesToDelete, closure$_numChanges) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entriesToDelete.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cefUid); closure$_numChanges.v = closure$_numChanges.v + _stmt.executeUpdate() | 0; } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.deleteListOfEntryFiles_aufyg$ = function (entriesToDelete) { var _numChanges = {v: 0}; prepareAndUseStatement_0(this._db, 'DELETE FROM ContainerEntryFile WHERE cefUid = ?', ContainerEntryFileDao_JdbcKt$deleteListOfEntryFiles$lambda(entriesToDelete, _numChanges)); }; function ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cefUid = _resultSet.getLong_61zpoe$('cefUid'); var tmp_cefMd5 = _resultSet.getString_61zpoe$('cefMd5'); var tmp_cefPath = _resultSet.getString_61zpoe$('cefPath'); var tmp_ceTotalSize = _resultSet.getLong_61zpoe$('ceTotalSize'); var tmp_ceCompressedSize = _resultSet.getLong_61zpoe$('ceCompressedSize'); var tmp_compression = _resultSet.getInt_61zpoe$('compression'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var _entity = new ContainerEntryFile(); _entity.cefUid = tmp_cefUid; _entity.cefMd5 = tmp_cefMd5; _entity.cefPath = tmp_cefPath; _entity.ceTotalSize = tmp_ceTotalSize; _entity.ceCompressedSize = tmp_ceCompressedSize; _entity.compression = tmp_compression; _entity.lastModified = tmp_lastModified; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(closure$md5Sum_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$md5Sum = closure$md5Sum_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$md5Sum); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(closure$md5Sum_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(closure$md5Sum_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findEntryByMd5Sum_61zpoe$($this, md5Sum_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$md5Sum = md5Sum_0; } Coroutine$findEntryByMd5Sum_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryByMd5Sum_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryByMd5Sum_61zpoe$.prototype.constructor = Coroutine$findEntryByMd5Sum_61zpoe$; Coroutine$findEntryByMd5Sum_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerEntryFile) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(this.local$md5Sum, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.findEntryByMd5Sum_61zpoe$ = function (md5Sum_0, continuation_0, suspended) { var instance = new Coroutine$findEntryByMd5Sum_61zpoe$(this, md5Sum_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryFileDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerEntryFile_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_39($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_39.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_39.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_39.prototype.constructor = Coroutine$insertAsync_39; Coroutine$insertAsync_39.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntryFile_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_39(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryFileDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerEntryFile_.insertList_4ezy5m$(entityList); }; function ContainerEntryFileDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.cefMd5); _stmt.setString_vqvrqt$(2, _entity.cefPath); _stmt.setLong_6svq3l$(3, _entity.ceTotalSize); _stmt.setLong_6svq3l$(4, _entity.ceCompressedSize); _stmt.setInt_vux9f0$(5, _entity.compression); _stmt.setLong_6svq3l$(6, _entity.lastModified); _stmt.setLong_6svq3l$(7, _entity.cefUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerEntryFile SET cefMd5 = ?, cefPath = ?, ceTotalSize = ?, ceCompressedSize = ?, compression = ?, lastModified = ? WHERE cefUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerEntryFileDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerEntryFileDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.cefMd5); _stmt.setString_vqvrqt$(2, closure$entity.cefPath); _stmt.setLong_6svq3l$(3, closure$entity.ceTotalSize); _stmt.setLong_6svq3l$(4, closure$entity.ceCompressedSize); _stmt.setInt_vux9f0$(5, closure$entity.compression); _stmt.setLong_6svq3l$(6, closure$entity.lastModified); _stmt.setLong_6svq3l$(7, closure$entity.cefUid); return _stmt.executeUpdate(); }; } ContainerEntryFileDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerEntryFile SET cefMd5 = ?, cefPath = ?, ceTotalSize = ?, ceCompressedSize = ?, compression = ?, lastModified = ? WHERE cefUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerEntryFileDao_JdbcKt$update$lambda(entity)); }; function ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContainerEntryFile (cefUid, cefMd5, cefPath, ceTotalSize, ceCompressedSize, compression, lastModified) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cefUid'; } else tmp$ = ''; return "INSERT INTO ContainerEntryFile (cefUid, cefMd5, cefPath, ceTotalSize, ceCompressedSize, compression, lastModified) VALUES(COALESCE(?,nextval('ContainerEntryFile_cefUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cefUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cefUid); } stmt.setString_vqvrqt$(2, entity.cefMd5); stmt.setString_vqvrqt$(3, entity.cefPath); stmt.setLong_6svq3l$(4, entity.ceTotalSize); stmt.setLong_6svq3l$(5, entity.ceCompressedSize); stmt.setInt_vux9f0$(6, entity.compression); stmt.setLong_6svq3l$(7, entity.lastModified); }; ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerEntryFileDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryFileDao_JdbcKt', interfaces: [ContainerEntryFileDao]}; function ContainerImportJobDao_JdbcKt(_db) { ContainerImportJobDao.call(this); this._db = _db; this._insertAdapterContainerImportJob_ = new ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral(this._db); } function ContainerImportJobDao_JdbcKt$findBySessionId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cijUid = _resultSet.getLong_61zpoe$('cijUid'); var tmp_cijContainerUid = _resultSet.getLong_61zpoe$('cijContainerUid'); var tmp_cijUri = _resultSet.getString_61zpoe$('cijUri'); var tmp_cijImportMode = _resultSet.getInt_61zpoe$('cijImportMode'); var tmp_cijContainerBaseDir = _resultSet.getString_61zpoe$('cijContainerBaseDir'); var tmp_cijContentEntryUid = _resultSet.getLong_61zpoe$('cijContentEntryUid'); var tmp_cijMimeType = _resultSet.getString_61zpoe$('cijMimeType'); var tmp_cijSessionId = _resultSet.getString_61zpoe$('cijSessionId'); var tmp_cijJobStatus = _resultSet.getInt_61zpoe$('cijJobStatus'); var tmp_cijBytesSoFar = _resultSet.getLong_61zpoe$('cijBytesSoFar'); var tmp_cijImportCompleted = _resultSet.getBoolean_61zpoe$('cijImportCompleted'); var tmp_cijContentLength = _resultSet.getLong_61zpoe$('cijContentLength'); var tmp_cijContainerEntryFileUids = _resultSet.getString_61zpoe$('cijContainerEntryFileUids'); var tmp_cijConversionParams = _resultSet.getString_61zpoe$('cijConversionParams'); var _entity = new ContainerImportJob(); _entity.cijUid = tmp_cijUid; _entity.cijContainerUid = tmp_cijContainerUid; _entity.cijUri = tmp_cijUri; _entity.cijImportMode = tmp_cijImportMode; _entity.cijContainerBaseDir = tmp_cijContainerBaseDir; _entity.cijContentEntryUid = tmp_cijContentEntryUid; _entity.cijMimeType = tmp_cijMimeType; _entity.cijSessionId = tmp_cijSessionId; _entity.cijJobStatus = tmp_cijJobStatus; _entity.cijBytesSoFar = tmp_cijBytesSoFar; _entity.cijImportCompleted = tmp_cijImportCompleted; _entity.cijContentLength = tmp_cijContentLength; _entity.cijContainerEntryFileUids = tmp_cijContainerEntryFileUids; _entity.cijConversionParams = tmp_cijConversionParams; closure$_result.v = _entity; }return Unit; }; } function ContainerImportJobDao_JdbcKt$findBySessionId$lambda(closure$sessionId, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$sessionId); useResults(_stmt.executeQuery(), ContainerImportJobDao_JdbcKt$findBySessionId$lambda$lambda(closure$_result)); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.findBySessionId_61zpoe$ = function (sessionId) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerImportJob) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContainerImportJob WHERE cijSessionId = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContainerImportJob WHERE cijSessionId = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$findBySessionId$lambda(sessionId, _result)); return _result.v; }; function ContainerImportJobDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cijUid = _resultSet.getLong_61zpoe$('cijUid'); var tmp_cijContainerUid = _resultSet.getLong_61zpoe$('cijContainerUid'); var tmp_cijUri = _resultSet.getString_61zpoe$('cijUri'); var tmp_cijImportMode = _resultSet.getInt_61zpoe$('cijImportMode'); var tmp_cijContainerBaseDir = _resultSet.getString_61zpoe$('cijContainerBaseDir'); var tmp_cijContentEntryUid = _resultSet.getLong_61zpoe$('cijContentEntryUid'); var tmp_cijMimeType = _resultSet.getString_61zpoe$('cijMimeType'); var tmp_cijSessionId = _resultSet.getString_61zpoe$('cijSessionId'); var tmp_cijJobStatus = _resultSet.getInt_61zpoe$('cijJobStatus'); var tmp_cijBytesSoFar = _resultSet.getLong_61zpoe$('cijBytesSoFar'); var tmp_cijImportCompleted = _resultSet.getBoolean_61zpoe$('cijImportCompleted'); var tmp_cijContentLength = _resultSet.getLong_61zpoe$('cijContentLength'); var tmp_cijContainerEntryFileUids = _resultSet.getString_61zpoe$('cijContainerEntryFileUids'); var tmp_cijConversionParams = _resultSet.getString_61zpoe$('cijConversionParams'); var _entity = new ContainerImportJob(); _entity.cijUid = tmp_cijUid; _entity.cijContainerUid = tmp_cijContainerUid; _entity.cijUri = tmp_cijUri; _entity.cijImportMode = tmp_cijImportMode; _entity.cijContainerBaseDir = tmp_cijContainerBaseDir; _entity.cijContentEntryUid = tmp_cijContentEntryUid; _entity.cijMimeType = tmp_cijMimeType; _entity.cijSessionId = tmp_cijSessionId; _entity.cijJobStatus = tmp_cijJobStatus; _entity.cijBytesSoFar = tmp_cijBytesSoFar; _entity.cijImportCompleted = tmp_cijImportCompleted; _entity.cijContentLength = tmp_cijContentLength; _entity.cijContainerEntryFileUids = tmp_cijContainerEntryFileUids; _entity.cijConversionParams = tmp_cijConversionParams; closure$_result.v = _entity; }return Unit; }; } function ContainerImportJobDao_JdbcKt$findByUid$lambda(closure$uploadId, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uploadId); useResults(_stmt.executeQuery(), ContainerImportJobDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uploadId) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerImportJob) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContainerImportJob where cijUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContainerImportJob where cijUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$findByUid$lambda(uploadId, _result)); return _result.v; }; function ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cijUid = _resultSet.getLong_61zpoe$('cijUid'); var tmp_cijContainerUid = _resultSet.getLong_61zpoe$('cijContainerUid'); var tmp_cijUri = _resultSet.getString_61zpoe$('cijUri'); var tmp_cijImportMode = _resultSet.getInt_61zpoe$('cijImportMode'); var tmp_cijContainerBaseDir = _resultSet.getString_61zpoe$('cijContainerBaseDir'); var tmp_cijContentEntryUid = _resultSet.getLong_61zpoe$('cijContentEntryUid'); var tmp_cijMimeType = _resultSet.getString_61zpoe$('cijMimeType'); var tmp_cijSessionId = _resultSet.getString_61zpoe$('cijSessionId'); var tmp_cijJobStatus = _resultSet.getInt_61zpoe$('cijJobStatus'); var tmp_cijBytesSoFar = _resultSet.getLong_61zpoe$('cijBytesSoFar'); var tmp_cijImportCompleted = _resultSet.getBoolean_61zpoe$('cijImportCompleted'); var tmp_cijContentLength = _resultSet.getLong_61zpoe$('cijContentLength'); var tmp_cijContainerEntryFileUids = _resultSet.getString_61zpoe$('cijContainerEntryFileUids'); var tmp_cijConversionParams = _resultSet.getString_61zpoe$('cijConversionParams'); var _entity = new ContainerImportJob(); _entity.cijUid = tmp_cijUid; _entity.cijContainerUid = tmp_cijContainerUid; _entity.cijUri = tmp_cijUri; _entity.cijImportMode = tmp_cijImportMode; _entity.cijContainerBaseDir = tmp_cijContainerBaseDir; _entity.cijContentEntryUid = tmp_cijContentEntryUid; _entity.cijMimeType = tmp_cijMimeType; _entity.cijSessionId = tmp_cijSessionId; _entity.cijJobStatus = tmp_cijJobStatus; _entity.cijBytesSoFar = tmp_cijBytesSoFar; _entity.cijImportCompleted = tmp_cijImportCompleted; _entity.cijContentLength = tmp_cijContentLength; _entity.cijContainerEntryFileUids = tmp_cijContainerEntryFileUids; _entity.cijConversionParams = tmp_cijConversionParams; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda(this$ContainerImportJobDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerImportJobDao_JdbcKt = this$ContainerImportJobDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContainerImportJob \n | WHERE cijJobStatus = 4\n | AND (NOT cijImportCompleted OR \n | (SELECT connectivityState \n | FROM ConnectivityStatus)\n | IN (3, 4))\n | LIMIT 10\n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ContainerImportJob \n | WHERE cijJobStatus = 4\n | AND (NOT cijImportCompleted OR \n | (SELECT connectivityState \n | FROM ConnectivityStatus)\n | IN (3, 4))\n | LIMIT 10\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContainerImportJobDao_JdbcKt._db, _stmtConfig, ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$findJobs$lambda(this$ContainerImportJobDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda(this$ContainerImportJobDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerImportJobDao_JdbcKt.prototype.findJobs = function () { var _result = new DoorLiveDataImpl(this._db, listOf(['ContainerImportJob', 'ConnectivityStatus']), ContainerImportJobDao_JdbcKt$findJobs$lambda(this)); return _result; }; function Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(closure$uploadJobId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uploadJobId = closure$uploadJobId_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda; Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uploadJobId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(closure$uploadJobId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(closure$uploadJobId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$setStatusToQueueAsync_s8cxhz$($this, uploadJobId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uploadJobId = uploadJobId_0; } Coroutine$setStatusToQueueAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$setStatusToQueueAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$setStatusToQueueAsync_s8cxhz$.prototype.constructor = Coroutine$setStatusToQueueAsync_s8cxhz$; Coroutine$setStatusToQueueAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig('UPDATE ContainerImportJob SET cijJobStatus = 4 WHERE cijUid = ? AND cijJobStatus = 0', void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerImportJob SET cijJobStatus = 4 WHERE cijUid = ? AND cijJobStatus = 0\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(this.local$uploadJobId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.setStatusToQueueAsync_s8cxhz$ = function (uploadJobId_0, continuation_0, suspended) { var instance = new Coroutine$setStatusToQueueAsync_s8cxhz$(this, uploadJobId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerImportJobDao_JdbcKt$updateProgress$lambda(closure$progress, closure$contentLength, closure$uploadJobId) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$progress); _stmt.setLong_6svq3l$(2, closure$contentLength); _stmt.setLong_6svq3l$(3, closure$uploadJobId); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.updateProgress_b9bd0d$ = function (progress, contentLength, uploadJobId) { var _stmtConfig = new PreparedStatementConfig('UPDATE ContainerImportJob SET cijBytesSoFar = ?, cijContentLength = ? WHERE cijUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerImportJob SET cijBytesSoFar = ?, cijContentLength = ? WHERE cijUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$updateProgress$lambda(progress, contentLength, uploadJobId)); }; function ContainerImportJobDao_JdbcKt$updateStatus$lambda(closure$status, closure$uploadJobId) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$status); _stmt.setLong_6svq3l$(2, closure$uploadJobId); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.updateStatus_6svq3l$ = function (status, uploadJobId) { var _stmtConfig = new PreparedStatementConfig('UPDATE ContainerImportJob SET cijJobStatus = ? WHERE cijUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerImportJob SET cijJobStatus = ? WHERE cijUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$updateStatus$lambda(status, uploadJobId)); }; function ContainerImportJobDao_JdbcKt$updateImportComplete$lambda(closure$importCompleted, closure$containerUid, closure$importJobUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$importCompleted); _stmt.setLong_6svq3l$(2, closure$containerUid); _stmt.setLong_6svq3l$(3, closure$importJobUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.updateImportComplete_vhff2t$ = function (importCompleted, containerUid, importJobUid) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |UPDATE ContainerImportJob \n | SET cijImportCompleted = ?,\n | cijContainerUid = ?\n | WHERE cijUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerImportJob \n | SET cijImportCompleted = ?,\n | cijContainerUid = ?\n | WHERE cijUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$updateImportComplete$lambda(importCompleted, containerUid, importJobUid)); }; function ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(closure$importJobUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$importJobUid = closure$importJobUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda; Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$importJobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(closure$importJobUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(closure$importJobUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getTitleOfEntry_s8cxhz$($this, importJobUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$importJobUid = importJobUid_0; } Coroutine$getTitleOfEntry_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTitleOfEntry_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTitleOfEntry_s8cxhz$.prototype.constructor = Coroutine$getTitleOfEntry_s8cxhz$; Coroutine$getTitleOfEntry_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.title FROM ContainerImportJob LEFT JOIN ContentEntry ON ContainerImportJob.cijContentEntryUid = ContentEntry.contentEntryUid WHERE ContainerImportJob.cijUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.title FROM ContainerImportJob LEFT JOIN ContentEntry ON ContainerImportJob.cijContentEntryUid = ContentEntry.contentEntryUid WHERE ContainerImportJob.cijUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(this.local$importJobUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.getTitleOfEntry_s8cxhz$ = function (importJobUid_0, continuation_0, suspended) { var instance = new Coroutine$getTitleOfEntry_s8cxhz$(this, importJobUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cijUid = _resultSet.getLong_61zpoe$('cijUid'); var tmp_cijContainerUid = _resultSet.getLong_61zpoe$('cijContainerUid'); var tmp_cijUri = _resultSet.getString_61zpoe$('cijUri'); var tmp_cijImportMode = _resultSet.getInt_61zpoe$('cijImportMode'); var tmp_cijContainerBaseDir = _resultSet.getString_61zpoe$('cijContainerBaseDir'); var tmp_cijContentEntryUid = _resultSet.getLong_61zpoe$('cijContentEntryUid'); var tmp_cijMimeType = _resultSet.getString_61zpoe$('cijMimeType'); var tmp_cijSessionId = _resultSet.getString_61zpoe$('cijSessionId'); var tmp_cijJobStatus = _resultSet.getInt_61zpoe$('cijJobStatus'); var tmp_cijBytesSoFar = _resultSet.getLong_61zpoe$('cijBytesSoFar'); var tmp_cijImportCompleted = _resultSet.getBoolean_61zpoe$('cijImportCompleted'); var tmp_cijContentLength = _resultSet.getLong_61zpoe$('cijContentLength'); var tmp_cijContainerEntryFileUids = _resultSet.getString_61zpoe$('cijContainerEntryFileUids'); var tmp_cijConversionParams = _resultSet.getString_61zpoe$('cijConversionParams'); var _entity = new ContainerImportJob(); _entity.cijUid = tmp_cijUid; _entity.cijContainerUid = tmp_cijContainerUid; _entity.cijUri = tmp_cijUri; _entity.cijImportMode = tmp_cijImportMode; _entity.cijContainerBaseDir = tmp_cijContainerBaseDir; _entity.cijContentEntryUid = tmp_cijContentEntryUid; _entity.cijMimeType = tmp_cijMimeType; _entity.cijSessionId = tmp_cijSessionId; _entity.cijJobStatus = tmp_cijJobStatus; _entity.cijBytesSoFar = tmp_cijBytesSoFar; _entity.cijImportCompleted = tmp_cijImportCompleted; _entity.cijContentLength = tmp_cijContentLength; _entity.cijContainerEntryFileUids = tmp_cijContainerEntryFileUids; _entity.cijConversionParams = tmp_cijConversionParams; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(closure$importJobUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$importJobUid = closure$importJobUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$importJobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(closure$importJobUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(closure$importJobUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this$ContainerImportJobDao_JdbcKt_0, closure$importJobUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerImportJobDao_JdbcKt = this$ContainerImportJobDao_JdbcKt_0; this.local$closure$importJobUid = closure$importJobUid_0; this.local$_liveResult = void 0; } Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContainerImportJob) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From ContainerImportJob WHERE ContainerImportJob.cijUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * From ContainerImportJob WHERE ContainerImportJob.cijUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContainerImportJobDao_JdbcKt._db, _stmtConfig, ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(this.local$closure$importJobUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this$ContainerImportJobDao_JdbcKt_0, closure$importJobUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this$ContainerImportJobDao_JdbcKt_0, closure$importJobUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerImportJobDao_JdbcKt.prototype.getImportJobLiveData_s8cxhz$ = function (importJobUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContainerImportJob'), ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this, importJobUid)); return _result; }; function Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda(closure$sessionId_0, closure$importJobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sessionId = closure$sessionId_0; this.local$closure$importJobUid = closure$importJobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda; Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$sessionId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$importJobUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$updateSessionId$lambda(closure$sessionId_0, closure$importJobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda(closure$sessionId_0, closure$importJobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateSessionId_a4hdmt$($this, importJobUid_0, sessionId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$importJobUid = importJobUid_0; this.local$sessionId = sessionId_0; } Coroutine$updateSessionId_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateSessionId_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateSessionId_a4hdmt$.prototype.constructor = Coroutine$updateSessionId_a4hdmt$; Coroutine$updateSessionId_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig('UPDATE ContainerImportJob SET cijSessionId = ? WHERE cijUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ContainerImportJob SET cijSessionId = ? WHERE cijUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContainerImportJobDao_JdbcKt$updateSessionId$lambda(this.local$sessionId, this.local$importJobUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.updateSessionId_a4hdmt$ = function (importJobUid_0, sessionId_0, continuation_0, suspended) { var instance = new Coroutine$updateSessionId_a4hdmt$(this, importJobUid_0, sessionId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerImportJobDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerImportJob_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_40($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_40.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_40.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_40.prototype.constructor = Coroutine$insertAsync_40; Coroutine$insertAsync_40.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerImportJob_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_40(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerImportJobDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerImportJob_.insertList_4ezy5m$(entityList); }; function ContainerImportJobDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cijContainerUid); _stmt.setString_vqvrqt$(2, _entity.cijUri); _stmt.setInt_vux9f0$(3, _entity.cijImportMode); _stmt.setString_vqvrqt$(4, _entity.cijContainerBaseDir); _stmt.setLong_6svq3l$(5, _entity.cijContentEntryUid); _stmt.setString_vqvrqt$(6, _entity.cijMimeType); _stmt.setString_vqvrqt$(7, _entity.cijSessionId); _stmt.setInt_vux9f0$(8, _entity.cijJobStatus); _stmt.setLong_6svq3l$(9, _entity.cijBytesSoFar); _stmt.setBoolean_fzusl$(10, _entity.cijImportCompleted); _stmt.setLong_6svq3l$(11, _entity.cijContentLength); _stmt.setString_vqvrqt$(12, _entity.cijContainerEntryFileUids); _stmt.setString_vqvrqt$(13, _entity.cijConversionParams); _stmt.setLong_6svq3l$(14, _entity.cijUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerImportJob SET cijContainerUid = ?, cijUri = ?, cijImportMode = ?, cijContainerBaseDir = ?, cijContentEntryUid = ?, cijMimeType = ?, cijSessionId = ?, cijJobStatus = ?, cijBytesSoFar = ?, cijImportCompleted = ?, cijContentLength = ?, cijContainerEntryFileUids = ?, cijConversionParams = ? WHERE cijUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerImportJobDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerImportJobDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cijContainerUid); _stmt.setString_vqvrqt$(2, closure$entity.cijUri); _stmt.setInt_vux9f0$(3, closure$entity.cijImportMode); _stmt.setString_vqvrqt$(4, closure$entity.cijContainerBaseDir); _stmt.setLong_6svq3l$(5, closure$entity.cijContentEntryUid); _stmt.setString_vqvrqt$(6, closure$entity.cijMimeType); _stmt.setString_vqvrqt$(7, closure$entity.cijSessionId); _stmt.setInt_vux9f0$(8, closure$entity.cijJobStatus); _stmt.setLong_6svq3l$(9, closure$entity.cijBytesSoFar); _stmt.setBoolean_fzusl$(10, closure$entity.cijImportCompleted); _stmt.setLong_6svq3l$(11, closure$entity.cijContentLength); _stmt.setString_vqvrqt$(12, closure$entity.cijContainerEntryFileUids); _stmt.setString_vqvrqt$(13, closure$entity.cijConversionParams); _stmt.setLong_6svq3l$(14, closure$entity.cijUid); return _stmt.executeUpdate(); }; } ContainerImportJobDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerImportJob SET cijContainerUid = ?, cijUri = ?, cijImportMode = ?, cijContainerBaseDir = ?, cijContentEntryUid = ?, cijMimeType = ?, cijSessionId = ?, cijJobStatus = ?, cijBytesSoFar = ?, cijImportCompleted = ?, cijContentLength = ?, cijContainerEntryFileUids = ?, cijConversionParams = ? WHERE cijUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContainerImportJobDao_JdbcKt$update$lambda(entity)); }; function ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContainerImportJob (cijUid, cijContainerUid, cijUri, cijImportMode, cijContainerBaseDir, cijContentEntryUid, cijMimeType, cijSessionId, cijJobStatus, cijBytesSoFar, cijImportCompleted, cijContentLength, cijContainerEntryFileUids, cijConversionParams) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cijUid'; } else tmp$ = ''; return "INSERT INTO ContainerImportJob (cijUid, cijContainerUid, cijUri, cijImportMode, cijContainerBaseDir, cijContentEntryUid, cijMimeType, cijSessionId, cijJobStatus, cijBytesSoFar, cijImportCompleted, cijContentLength, cijContainerEntryFileUids, cijConversionParams) VALUES(COALESCE(?,nextval('ContainerImportJob_cijUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cijUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cijUid); } stmt.setLong_6svq3l$(2, entity.cijContainerUid); stmt.setString_vqvrqt$(3, entity.cijUri); stmt.setInt_vux9f0$(4, entity.cijImportMode); stmt.setString_vqvrqt$(5, entity.cijContainerBaseDir); stmt.setLong_6svq3l$(6, entity.cijContentEntryUid); stmt.setString_vqvrqt$(7, entity.cijMimeType); stmt.setString_vqvrqt$(8, entity.cijSessionId); stmt.setInt_vux9f0$(9, entity.cijJobStatus); stmt.setLong_6svq3l$(10, entity.cijBytesSoFar); stmt.setBoolean_fzusl$(11, entity.cijImportCompleted); stmt.setLong_6svq3l$(12, entity.cijContentLength); stmt.setString_vqvrqt$(13, entity.cijContainerEntryFileUids); stmt.setString_vqvrqt$(14, entity.cijConversionParams); }; ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerImportJobDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerImportJobDao_JdbcKt', interfaces: [ContainerImportJobDao]}; function ContentCategoryDao_JdbcKt(_db) { ContentCategoryDao.call(this); this._db = _db; this._insertAdapterContentCategory_ = new ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral(this._db); } function Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_38($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_38.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_38.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_38.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_38; Coroutine$replicateOnNewNode_s8cxhz$_38.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccPk,\n | ? AS ccDestination\n | FROM ContentCategory\n | WHERE ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = ?), 0) \n | /*psql ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccPk,\n | ? AS ccDestination\n | FROM ContentCategory\n | WHERE ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = ?), 0) \n | ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_38(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategoryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_35($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_35.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_35.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_35.prototype.constructor = Coroutine$replicateOnChange_35; Coroutine$replicateOnChange_35.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccUid,\n | UserSession.usClientNodeId AS ccDestination\n | FROM ChangeLog\n | JOIN ContentCategory\n | ON ChangeLog.chTableId = 1\n | AND ChangeLog.chEntityPk = ContentCategory.contentCategoryUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccUid,\n | UserSession.usClientNodeId AS ccDestination\n | FROM ChangeLog\n | JOIN ContentCategory\n | ON ChangeLog.chTableId = 1\n | AND ChangeLog.chEntityPk = ContentCategory.contentCategoryUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentCategoryDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_35(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentCategoryDao_JdbcKt$publicContentCategories$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentCategoryUid = _resultSet.getLong_61zpoe$('contentCategoryUid'); var tmp_ctnCatContentCategorySchemaUid = _resultSet.getLong_61zpoe$('ctnCatContentCategorySchemaUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_contentCategoryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategoryLocalChangeSeqNum'); var tmp_contentCategoryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategoryMasterChangeSeqNum'); var tmp_contentCategoryLastChangedBy = _resultSet.getInt_61zpoe$('contentCategoryLastChangedBy'); var tmp_contentCategoryLct = _resultSet.getLong_61zpoe$('contentCategoryLct'); var _entity = new ContentCategory(); _entity.contentCategoryUid = tmp_contentCategoryUid; _entity.ctnCatContentCategorySchemaUid = tmp_ctnCatContentCategorySchemaUid; _entity.name = tmp_name; _entity.contentCategoryLocalChangeSeqNum = tmp_contentCategoryLocalChangeSeqNum; _entity.contentCategoryMasterChangeSeqNum = tmp_contentCategoryMasterChangeSeqNum; _entity.contentCategoryLastChangedBy = tmp_contentCategoryLastChangedBy; _entity.contentCategoryLct = tmp_contentCategoryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentCategoryDao_JdbcKt$publicContentCategories$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContentCategoryDao_JdbcKt$publicContentCategories$lambda$lambda(closure$_result)); return Unit; }; } ContentCategoryDao_JdbcKt.prototype.publicContentCategories = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentCategory.* FROM ContentCategory', void 0, void 0, void 0, trimMargin('\n |SELECT ContentCategory.* FROM ContentCategory\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentCategoryDao_JdbcKt$publicContentCategories$lambda(_result)); return _result.v; }; function ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentCategoryUid = _resultSet.getLong_61zpoe$('contentCategoryUid'); var tmp_ctnCatContentCategorySchemaUid = _resultSet.getLong_61zpoe$('ctnCatContentCategorySchemaUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_contentCategoryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategoryLocalChangeSeqNum'); var tmp_contentCategoryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategoryMasterChangeSeqNum'); var tmp_contentCategoryLastChangedBy = _resultSet.getInt_61zpoe$('contentCategoryLastChangedBy'); var tmp_contentCategoryLct = _resultSet.getLong_61zpoe$('contentCategoryLct'); var _entity = new ContentCategory(); _entity.contentCategoryUid = tmp_contentCategoryUid; _entity.ctnCatContentCategorySchemaUid = tmp_ctnCatContentCategorySchemaUid; _entity.name = tmp_name; _entity.contentCategoryLocalChangeSeqNum = tmp_contentCategoryLocalChangeSeqNum; _entity.contentCategoryMasterChangeSeqNum = tmp_contentCategoryMasterChangeSeqNum; _entity.contentCategoryLastChangedBy = tmp_contentCategoryLastChangedBy; _entity.contentCategoryLct = tmp_contentCategoryLct; closure$_result.v = _entity; }return Unit; }; } function ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda(closure$schemaId, closure$name, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$schemaId); _stmt.setString_vqvrqt$(2, closure$name); useResults(_stmt.executeQuery(), ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda$lambda(closure$_result)); return Unit; }; } ContentCategoryDao_JdbcKt.prototype.findCategoryBySchemaIdAndName_a4hdmt$ = function (schemaId, name) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentCategory) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentCategory WHERE ctnCatContentCategorySchemaUid = ? AND name = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentCategory WHERE ctnCatContentCategorySchemaUid = ? AND name = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda(schemaId, name, _result)); return _result.v; }; ContentCategoryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentCategory_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_41($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_41.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_41.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_41.prototype.constructor = Coroutine$insertAsync_41; Coroutine$insertAsync_41.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentCategory_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_41(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentCategory_.insertList_4ezy5m$(entityList); }; function ContentCategoryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ctnCatContentCategorySchemaUid); _stmt.setString_vqvrqt$(2, _entity.name); _stmt.setLong_6svq3l$(3, _entity.contentCategoryLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.contentCategoryMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.contentCategoryLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.contentCategoryLct); _stmt.setLong_6svq3l$(7, _entity.contentCategoryUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentCategoryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentCategory SET ctnCatContentCategorySchemaUid = ?, name = ?, contentCategoryLocalChangeSeqNum = ?, contentCategoryMasterChangeSeqNum = ?, contentCategoryLastChangedBy = ?, contentCategoryLct = ? WHERE contentCategoryUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentCategoryDao_JdbcKt$updateList$lambda(entityList)); }; function ContentCategoryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ctnCatContentCategorySchemaUid); _stmt.setString_vqvrqt$(2, closure$entity.name); _stmt.setLong_6svq3l$(3, closure$entity.contentCategoryLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.contentCategoryMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.contentCategoryLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.contentCategoryLct); _stmt.setLong_6svq3l$(7, closure$entity.contentCategoryUid); return _stmt.executeUpdate(); }; } ContentCategoryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentCategory SET ctnCatContentCategorySchemaUid = ?, name = ?, contentCategoryLocalChangeSeqNum = ?, contentCategoryMasterChangeSeqNum = ?, contentCategoryLastChangedBy = ?, contentCategoryLct = ? WHERE contentCategoryUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentCategoryDao_JdbcKt$update$lambda(entity)); }; function ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentCategory (contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING contentCategoryUid'; } else tmp$ = ''; return "INSERT INTO ContentCategory (contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES(COALESCE(?,nextval('ContentCategory_contentCategoryUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentCategoryUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentCategoryUid); } stmt.setLong_6svq3l$(2, entity.ctnCatContentCategorySchemaUid); stmt.setString_vqvrqt$(3, entity.name); stmt.setLong_6svq3l$(4, entity.contentCategoryLocalChangeSeqNum); stmt.setLong_6svq3l$(5, entity.contentCategoryMasterChangeSeqNum); stmt.setInt_vux9f0$(6, entity.contentCategoryLastChangedBy); stmt.setLong_6svq3l$(7, entity.contentCategoryLct); }; ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentCategoryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao_JdbcKt', interfaces: [ContentCategoryDao]}; function ContentCategoryDao_ReplicateWrapper(_db, _dao) { ContentCategoryDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_39($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_39.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_39.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_39.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_39; Coroutine$replicateOnNewNode_s8cxhz$_39.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_39(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_36($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_36.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_36.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_36.prototype.constructor = Coroutine$replicateOnChange_36; Coroutine$replicateOnChange_36.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_36(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_ReplicateWrapper.prototype.publicContentCategories = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.findCategoryBySchemaIdAndName_a4hdmt$ = function (schemaId, name) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_42($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_42.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_42.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_42.prototype.constructor = Coroutine$insertAsync_42; Coroutine$insertAsync_42.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contentCategoryUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contentCategoryUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contentCategoryLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contentCategoryUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_42(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao_ReplicateWrapper', interfaces: [ContentCategoryDao]}; function ContentCategoryDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentCategoryDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_40($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_40.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_40.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_40.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_40; Coroutine$replicateOnNewNode_s8cxhz$_40.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_40(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_37($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_37.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_37.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_37.prototype.constructor = Coroutine$replicateOnChange_37; Coroutine$replicateOnChange_37.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_37(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_Repo.prototype.publicContentCategories = function () { var _result = this._dao.publicContentCategories(); return _result; }; ContentCategoryDao_Repo.prototype.findCategoryBySchemaIdAndName_a4hdmt$ = function (schemaId, name) { var _result = this._dao.findCategoryBySchemaIdAndName_a4hdmt$(schemaId, name); return _result; }; ContentCategoryDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_43($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_43.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_43.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_43.prototype.constructor = Coroutine$insertAsync_43; Coroutine$insertAsync_43.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_43(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentCategoryDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentCategoryDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentCategoryDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao_Repo', interfaces: [ContentCategoryDao]}; function ContentCategorySchemaDao_JdbcKt(_db) { ContentCategorySchemaDao.call(this); this._db = _db; this._insertAdapterContentCategorySchema_ = new ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral(this._db); } function Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_41($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_41.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_41.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_41.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_41; Coroutine$replicateOnNewNode_s8cxhz$_41.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsPk,\n | ? AS ccsDestination\n | FROM ContentCategorySchema\n | WHERE ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = ?), 0) \n | /*psql ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsPk,\n | ? AS ccsDestination\n | FROM ContentCategorySchema\n | WHERE ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = ?), 0) \n | ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_41(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_38($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_38.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_38.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_38.prototype.constructor = Coroutine$replicateOnChange_38; Coroutine$replicateOnChange_38.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsUid,\n | UserSession.usClientNodeId AS ccsDestination\n | FROM ChangeLog\n | JOIN ContentCategorySchema\n | ON ChangeLog.chTableId = 2\n | AND ChangeLog.chEntityPk = ContentCategorySchema.contentCategorySchemaUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsUid,\n | UserSession.usClientNodeId AS ccsDestination\n | FROM ChangeLog\n | JOIN ContentCategorySchema\n | ON ChangeLog.chTableId = 2\n | AND ChangeLog.chEntityPk = ContentCategorySchema.contentCategorySchemaUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_38(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentCategorySchemaUid = _resultSet.getLong_61zpoe$('contentCategorySchemaUid'); var tmp_schemaName = _resultSet.getString_61zpoe$('schemaName'); var tmp_schemaUrl = _resultSet.getString_61zpoe$('schemaUrl'); var tmp_contentCategorySchemaLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategorySchemaLocalChangeSeqNum'); var tmp_contentCategorySchemaMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategorySchemaMasterChangeSeqNum'); var tmp_contentCategorySchemaLastChangedBy = _resultSet.getInt_61zpoe$('contentCategorySchemaLastChangedBy'); var tmp_contentCategorySchemaLct = _resultSet.getLong_61zpoe$('contentCategorySchemaLct'); var _entity = new ContentCategorySchema(); _entity.contentCategorySchemaUid = tmp_contentCategorySchemaUid; _entity.schemaName = tmp_schemaName; _entity.schemaUrl = tmp_schemaUrl; _entity.contentCategorySchemaLocalChangeSeqNum = tmp_contentCategorySchemaLocalChangeSeqNum; _entity.contentCategorySchemaMasterChangeSeqNum = tmp_contentCategorySchemaMasterChangeSeqNum; _entity.contentCategorySchemaLastChangedBy = tmp_contentCategorySchemaLastChangedBy; _entity.contentCategorySchemaLct = tmp_contentCategorySchemaLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda$lambda(closure$_result)); return Unit; }; } ContentCategorySchemaDao_JdbcKt.prototype.publicContentCategorySchemas = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentCategorySchema.* FROM ContentCategorySchema', void 0, void 0, void 0, trimMargin('\n |SELECT ContentCategorySchema.* FROM ContentCategorySchema\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda(_result)); return _result.v; }; function ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentCategorySchemaUid = _resultSet.getLong_61zpoe$('contentCategorySchemaUid'); var tmp_schemaName = _resultSet.getString_61zpoe$('schemaName'); var tmp_schemaUrl = _resultSet.getString_61zpoe$('schemaUrl'); var tmp_contentCategorySchemaLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategorySchemaLocalChangeSeqNum'); var tmp_contentCategorySchemaMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentCategorySchemaMasterChangeSeqNum'); var tmp_contentCategorySchemaLastChangedBy = _resultSet.getInt_61zpoe$('contentCategorySchemaLastChangedBy'); var tmp_contentCategorySchemaLct = _resultSet.getLong_61zpoe$('contentCategorySchemaLct'); var _entity = new ContentCategorySchema(); _entity.contentCategorySchemaUid = tmp_contentCategorySchemaUid; _entity.schemaName = tmp_schemaName; _entity.schemaUrl = tmp_schemaUrl; _entity.contentCategorySchemaLocalChangeSeqNum = tmp_contentCategorySchemaLocalChangeSeqNum; _entity.contentCategorySchemaMasterChangeSeqNum = tmp_contentCategorySchemaMasterChangeSeqNum; _entity.contentCategorySchemaLastChangedBy = tmp_contentCategorySchemaLastChangedBy; _entity.contentCategorySchemaLct = tmp_contentCategorySchemaLct; closure$_result.v = _entity; }return Unit; }; } function ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda(closure$schemaUrl, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$schemaUrl); useResults(_stmt.executeQuery(), ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda$lambda(closure$_result)); return Unit; }; } ContentCategorySchemaDao_JdbcKt.prototype.findBySchemaUrl_61zpoe$ = function (schemaUrl) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentCategorySchema) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentCategorySchema WHERE schemaUrl = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentCategorySchema WHERE schemaUrl = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda(schemaUrl, _result)); return _result.v; }; ContentCategorySchemaDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentCategorySchema_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_44($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_44.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_44.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_44.prototype.constructor = Coroutine$insertAsync_44; Coroutine$insertAsync_44.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentCategorySchema_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_44(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentCategorySchema_.insertList_4ezy5m$(entityList); }; function ContentCategorySchemaDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.schemaName); _stmt.setString_vqvrqt$(2, _entity.schemaUrl); _stmt.setLong_6svq3l$(3, _entity.contentCategorySchemaLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.contentCategorySchemaMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.contentCategorySchemaLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.contentCategorySchemaLct); _stmt.setLong_6svq3l$(7, _entity.contentCategorySchemaUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentCategorySchemaDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentCategorySchema SET schemaName = ?, schemaUrl = ?, contentCategorySchemaLocalChangeSeqNum = ?, contentCategorySchemaMasterChangeSeqNum = ?, contentCategorySchemaLastChangedBy = ?, contentCategorySchemaLct = ? WHERE contentCategorySchemaUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentCategorySchemaDao_JdbcKt$updateList$lambda(entityList)); }; function ContentCategorySchemaDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.schemaName); _stmt.setString_vqvrqt$(2, closure$entity.schemaUrl); _stmt.setLong_6svq3l$(3, closure$entity.contentCategorySchemaLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.contentCategorySchemaMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.contentCategorySchemaLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.contentCategorySchemaLct); _stmt.setLong_6svq3l$(7, closure$entity.contentCategorySchemaUid); return _stmt.executeUpdate(); }; } ContentCategorySchemaDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentCategorySchema SET schemaName = ?, schemaUrl = ?, contentCategorySchemaLocalChangeSeqNum = ?, contentCategorySchemaMasterChangeSeqNum = ?, contentCategorySchemaLastChangedBy = ?, contentCategorySchemaLct = ? WHERE contentCategorySchemaUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentCategorySchemaDao_JdbcKt$update$lambda(entity)); }; function ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentCategorySchema (contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING contentCategorySchemaUid'; } else tmp$ = ''; return "INSERT INTO ContentCategorySchema (contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES(COALESCE(?,nextval('ContentCategorySchema_contentCategorySchemaUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentCategorySchemaUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentCategorySchemaUid); } stmt.setString_vqvrqt$(2, entity.schemaName); stmt.setString_vqvrqt$(3, entity.schemaUrl); stmt.setLong_6svq3l$(4, entity.contentCategorySchemaLocalChangeSeqNum); stmt.setLong_6svq3l$(5, entity.contentCategorySchemaMasterChangeSeqNum); stmt.setInt_vux9f0$(6, entity.contentCategorySchemaLastChangedBy); stmt.setLong_6svq3l$(7, entity.contentCategorySchemaLct); }; ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentCategorySchemaDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao_JdbcKt', interfaces: [ContentCategorySchemaDao]}; function ContentCategorySchemaDao_ReplicateWrapper(_db, _dao) { ContentCategorySchemaDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_42($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_42.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_42.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_42.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_42; Coroutine$replicateOnNewNode_s8cxhz$_42.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_42(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_39($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_39.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_39.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_39.prototype.constructor = Coroutine$replicateOnChange_39; Coroutine$replicateOnChange_39.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_39(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.publicContentCategorySchemas = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.findBySchemaUrl_61zpoe$ = function (schemaUrl) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_45($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_45.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_45.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_45.prototype.constructor = Coroutine$insertAsync_45; Coroutine$insertAsync_45.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contentCategorySchemaUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(2, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contentCategorySchemaUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contentCategorySchemaLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contentCategorySchemaUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_45(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao_ReplicateWrapper', interfaces: [ContentCategorySchemaDao]}; function ContentCategorySchemaDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentCategorySchemaDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_43($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_43.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_43.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_43.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_43; Coroutine$replicateOnNewNode_s8cxhz$_43.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_43(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_40($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_40.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_40.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_40.prototype.constructor = Coroutine$replicateOnChange_40; Coroutine$replicateOnChange_40.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_40(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_Repo.prototype.publicContentCategorySchemas = function () { var _result = this._dao.publicContentCategorySchemas(); return _result; }; ContentCategorySchemaDao_Repo.prototype.findBySchemaUrl_61zpoe$ = function (schemaUrl) { var _result = this._dao.findBySchemaUrl_61zpoe$(schemaUrl); return _result; }; ContentCategorySchemaDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_46($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_46.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_46.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_46.prototype.constructor = Coroutine$insertAsync_46; Coroutine$insertAsync_46.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_46(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentCategorySchemaDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentCategorySchemaDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentCategorySchemaDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao_Repo', interfaces: [ContentCategorySchemaDao]}; function ContentEntryContentCategoryJoinDao_JdbcKt(_db) { ContentEntryContentCategoryJoinDao.call(this); this._db = _db; this._insertAdapterContentEntryContentCategoryJoin_ = new ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral(this._db); } function Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_44($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_44.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_44.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_44.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_44; Coroutine$replicateOnNewNode_s8cxhz$_44.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjPk,\n | ? AS ceccjDestination\n | FROM ContentEntryContentCategoryJoin\n | WHERE ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = ?), 0) \n | /*psql ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjPk,\n | ? AS ceccjDestination\n | FROM ContentEntryContentCategoryJoin\n | WHERE ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = ?), 0) \n | ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_44(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_41($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_41.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_41.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_41.prototype.constructor = Coroutine$replicateOnChange_41; Coroutine$replicateOnChange_41.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjUid,\n | UserSession.usClientNodeId AS ceccjDestination\n | FROM ChangeLog\n | JOIN ContentEntryContentCategoryJoin\n | ON ChangeLog.chTableId = 3\n | AND ChangeLog.chEntityPk = ContentEntryContentCategoryJoin.ceccjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjUid,\n | UserSession.usClientNodeId AS ceccjDestination\n | FROM ChangeLog\n | JOIN ContentEntryContentCategoryJoin\n | ON ChangeLog.chTableId = 3\n | AND ChangeLog.chEntityPk = ContentEntryContentCategoryJoin.ceccjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_41(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_ceccjUid = _resultSet.getLong_61zpoe$('ceccjUid'); var tmp_ceccjContentEntryUid = _resultSet.getLong_61zpoe$('ceccjContentEntryUid'); var tmp_ceccjContentCategoryUid = _resultSet.getLong_61zpoe$('ceccjContentCategoryUid'); var tmp_ceccjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('ceccjLocalChangeSeqNum'); var tmp_ceccjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('ceccjMasterChangeSeqNum'); var tmp_ceccjLastChangedBy = _resultSet.getInt_61zpoe$('ceccjLastChangedBy'); var tmp_ceccjLct = _resultSet.getLong_61zpoe$('ceccjLct'); var _entity = new ContentEntryContentCategoryJoin(); _entity.ceccjUid = tmp_ceccjUid; _entity.ceccjContentEntryUid = tmp_ceccjContentEntryUid; _entity.ceccjContentCategoryUid = tmp_ceccjContentCategoryUid; _entity.ceccjLocalChangeSeqNum = tmp_ceccjLocalChangeSeqNum; _entity.ceccjMasterChangeSeqNum = tmp_ceccjMasterChangeSeqNum; _entity.ceccjLastChangedBy = tmp_ceccjLastChangedBy; _entity.ceccjLct = tmp_ceccjLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.publicContentEntryContentCategoryJoins = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntryContentCategoryJoin.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntry ON ContentEntryContentCategoryJoin.ceccjContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publik', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntryContentCategoryJoin.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntry ON ContentEntryContentCategoryJoin.ceccjContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publik\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda(_result)); return _result.v; }; function ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_ceccjUid = _resultSet.getLong_61zpoe$('ceccjUid'); var tmp_ceccjContentEntryUid = _resultSet.getLong_61zpoe$('ceccjContentEntryUid'); var tmp_ceccjContentCategoryUid = _resultSet.getLong_61zpoe$('ceccjContentCategoryUid'); var tmp_ceccjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('ceccjLocalChangeSeqNum'); var tmp_ceccjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('ceccjMasterChangeSeqNum'); var tmp_ceccjLastChangedBy = _resultSet.getInt_61zpoe$('ceccjLastChangedBy'); var tmp_ceccjLct = _resultSet.getLong_61zpoe$('ceccjLct'); var _entity = new ContentEntryContentCategoryJoin(); _entity.ceccjUid = tmp_ceccjUid; _entity.ceccjContentEntryUid = tmp_ceccjContentEntryUid; _entity.ceccjContentCategoryUid = tmp_ceccjContentCategoryUid; _entity.ceccjLocalChangeSeqNum = tmp_ceccjLocalChangeSeqNum; _entity.ceccjMasterChangeSeqNum = tmp_ceccjMasterChangeSeqNum; _entity.ceccjLastChangedBy = tmp_ceccjLastChangedBy; _entity.ceccjLct = tmp_ceccjLct; closure$_result.v = _entity; }return Unit; }; } function ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(closure$categoryUid, closure$contentEntry, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$categoryUid); _stmt.setLong_6svq3l$(2, closure$contentEntry); useResults(_stmt.executeQuery(), ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.findJoinByParentChildUuids_3pjtqy$ = function (categoryUid, contentEntry) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryContentCategoryJoin) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from ContentEntryContentCategoryJoin WHERE ceccjContentCategoryUid = ? AND ceccjContentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * from ContentEntryContentCategoryJoin WHERE ceccjContentCategoryUid = ? AND ceccjContentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(categoryUid, contentEntry, _result)); return _result.v; }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryContentCategoryJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_47($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_47.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_47.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_47.prototype.constructor = Coroutine$insertAsync_47; Coroutine$insertAsync_47.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryContentCategoryJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_47(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryContentCategoryJoin_.insertList_4ezy5m$(entityList); }; function ContentEntryContentCategoryJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ceccjContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.ceccjContentCategoryUid); _stmt.setLong_6svq3l$(3, _entity.ceccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.ceccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.ceccjLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.ceccjLct); _stmt.setLong_6svq3l$(7, _entity.ceccjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryContentCategoryJoin SET ceccjContentEntryUid = ?, ceccjContentCategoryUid = ?, ceccjLocalChangeSeqNum = ?, ceccjMasterChangeSeqNum = ?, ceccjLastChangedBy = ?, ceccjLct = ? WHERE ceccjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryContentCategoryJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryContentCategoryJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ceccjContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.ceccjContentCategoryUid); _stmt.setLong_6svq3l$(3, closure$entity.ceccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.ceccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.ceccjLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.ceccjLct); _stmt.setLong_6svq3l$(7, closure$entity.ceccjUid); return _stmt.executeUpdate(); }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryContentCategoryJoin SET ceccjContentEntryUid = ?, ceccjContentCategoryUid = ?, ceccjLocalChangeSeqNum = ?, ceccjMasterChangeSeqNum = ?, ceccjLastChangedBy = ?, ceccjLct = ? WHERE ceccjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryContentCategoryJoinDao_JdbcKt$update$lambda(entity)); }; function ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentEntryContentCategoryJoin (ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING ceccjUid'; } else tmp$ = ''; return "INSERT INTO ContentEntryContentCategoryJoin (ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES(COALESCE(?,nextval('ContentEntryContentCategoryJoin_ceccjUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ceccjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ceccjUid); } stmt.setLong_6svq3l$(2, entity.ceccjContentEntryUid); stmt.setLong_6svq3l$(3, entity.ceccjContentCategoryUid); stmt.setLong_6svq3l$(4, entity.ceccjLocalChangeSeqNum); stmt.setLong_6svq3l$(5, entity.ceccjMasterChangeSeqNum); stmt.setInt_vux9f0$(6, entity.ceccjLastChangedBy); stmt.setLong_6svq3l$(7, entity.ceccjLct); }; ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryContentCategoryJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao_JdbcKt', interfaces: [ContentEntryContentCategoryJoinDao]}; function ContentEntryContentCategoryJoinDao_ReplicateWrapper(_db, _dao) { ContentEntryContentCategoryJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_45($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_45.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_45.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_45.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_45; Coroutine$replicateOnNewNode_s8cxhz$_45.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_45(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_42($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_42.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_42.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_42.prototype.constructor = Coroutine$replicateOnChange_42; Coroutine$replicateOnChange_42.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_42(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.publicContentEntryContentCategoryJoins = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.findJoinByParentChildUuids_3pjtqy$ = function (categoryUid, contentEntry) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_48($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_48.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_48.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_48.prototype.constructor = Coroutine$insertAsync_48; Coroutine$insertAsync_48.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ceccjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(3, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ceccjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ceccjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ceccjUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_48(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao_ReplicateWrapper', interfaces: [ContentEntryContentCategoryJoinDao]}; function ContentEntryContentCategoryJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryContentCategoryJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_46($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_46.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_46.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_46.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_46; Coroutine$replicateOnNewNode_s8cxhz$_46.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_46(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_43($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_43.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_43.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_43.prototype.constructor = Coroutine$replicateOnChange_43; Coroutine$replicateOnChange_43.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_43(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_Repo.prototype.publicContentEntryContentCategoryJoins = function () { var _result = this._dao.publicContentEntryContentCategoryJoins(); return _result; }; ContentEntryContentCategoryJoinDao_Repo.prototype.findJoinByParentChildUuids_3pjtqy$ = function (categoryUid, contentEntry) { var _result = this._dao.findJoinByParentChildUuids_3pjtqy$(categoryUid, contentEntry); return _result; }; ContentEntryContentCategoryJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_49($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_49.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_49.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_49.prototype.constructor = Coroutine$insertAsync_49; Coroutine$insertAsync_49.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_49(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryContentCategoryJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryContentCategoryJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryContentCategoryJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao_Repo', interfaces: [ContentEntryContentCategoryJoinDao]}; function ContentEntryDao_JdbcKt(_db) { ContentEntryDao.call(this); this._db = _db; this._insertAdapterContentEntry_ = new ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral(this._db); this._insertAdapterContentEntry_upsert = new ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral(this._db); } function Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_47($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_47.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_47.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_47.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_47; Coroutine$replicateOnNewNode_s8cxhz$_47.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT contentEntryUid AS ceUid,\n | ? AS siteDestination\n | FROM ContentEntry\n | WHERE ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = ?), -1) \n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT contentEntryUid AS ceUid,\n | ? AS siteDestination\n | FROM ContentEntry\n | WHERE ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = ?), -1) \n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_47(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_44($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_44.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_44.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_44.prototype.constructor = Coroutine$replicateOnChange_44; Coroutine$replicateOnChange_44.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT ContentEntry.contentEntryUid AS cePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntry\n | ON ChangeLog.chTableId = 42\n | AND ChangeLog.chEntityPk = ContentEntry.contentEntryUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT ContentEntry.contentEntryUid AS cePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntry\n | ON ChangeLog.chTableId = 42\n | AND ChangeLog.chEntityPk = ContentEntry.contentEntryUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_44(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync.prototype.constructor = Coroutine$insertListAsync; Coroutine$insertListAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntry_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithLanguage(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _language_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }if (_language_nullFieldCount < 11) { if (_entity.language == null) { _entity.language = new Language(); }ensureNotNull(_entity.language).langUid = tmp_langUid; ensureNotNull(_entity.language).name = tmp_name; ensureNotNull(_entity.language).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.language).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.language).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.language).Language_Type = tmp_Language_Type; ensureNotNull(_entity.language).languageActive = tmp_languageActive; ensureNotNull(_entity.language).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.language).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.language).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.language).langLct = tmp_langLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(closure$entryUuid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(closure$entryUuid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(closure$entryUuid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findEntryWithLanguageByEntryId($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entryUuid = entryUuid_0; } Coroutine$findEntryWithLanguageByEntryId.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithLanguageByEntryId.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithLanguageByEntryId.prototype.constructor = Coroutine$findEntryWithLanguageByEntryId; Coroutine$findEntryWithLanguageByEntryId.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryWithLanguage) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.*, Language.* FROM ContentEntry LEFT JOIN Language ON Language.langUid = ContentEntry.primaryLanguageUid WHERE ContentEntry.contentEntryUid=?', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.*, Language.* FROM ContentEntry LEFT JOIN Language ON Language.langUid = ContentEntry.primaryLanguageUid WHERE ContentEntry.contentEntryUid=?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(this.local$entryUuid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findEntryWithLanguageByEntryId = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithLanguageByEntryId(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithBlockAndLanguage(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _language_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }if (_language_nullFieldCount < 11) { if (_entity.language == null) { _entity.language = new Language(); }ensureNotNull(_entity.language).langUid = tmp_langUid; ensureNotNull(_entity.language).name = tmp_name; ensureNotNull(_entity.language).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.language).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.language).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.language).Language_Type = tmp_Language_Type; ensureNotNull(_entity.language).languageActive = tmp_languageActive; ensureNotNull(_entity.language).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.language).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.language).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.language).langLct = tmp_langLct; }var _block_nullFieldCount = 0; var tmp_cbUid = _resultSet.getLong_61zpoe$('cbUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbType = _resultSet.getInt_61zpoe$('cbType'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbIndentLevel = _resultSet.getInt_61zpoe$('cbIndentLevel'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbModuleParentBlockUid = _resultSet.getLong_61zpoe$('cbModuleParentBlockUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbTitle = _resultSet.getString_61zpoe$('cbTitle'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbDescription = _resultSet.getString_61zpoe$('cbDescription'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbCompletionCriteria = _resultSet.getInt_61zpoe$('cbCompletionCriteria'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbHideUntilDate = _resultSet.getLong_61zpoe$('cbHideUntilDate'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbDeadlineDate = _resultSet.getLong_61zpoe$('cbDeadlineDate'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbLateSubmissionPenalty = _resultSet.getInt_61zpoe$('cbLateSubmissionPenalty'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbGracePeriodDate = _resultSet.getLong_61zpoe$('cbGracePeriodDate'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbMaxPoints = _resultSet.getInt_61zpoe$('cbMaxPoints'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbMinPoints = _resultSet.getInt_61zpoe$('cbMinPoints'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbIndex = _resultSet.getInt_61zpoe$('cbIndex'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbClazzUid = _resultSet.getLong_61zpoe$('cbClazzUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbActive = _resultSet.getBoolean_61zpoe$('cbActive'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbHidden = _resultSet.getBoolean_61zpoe$('cbHidden'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbEntityUid = _resultSet.getLong_61zpoe$('cbEntityUid'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }var tmp_cbLct = _resultSet.getLong_61zpoe$('cbLct'); if (_resultSet.wasNull()) { _block_nullFieldCount = _block_nullFieldCount + 1 | 0; }if (_block_nullFieldCount < 19) { if (_entity.block == null) { _entity.block = new CourseBlock(); }ensureNotNull(_entity.block).cbUid = tmp_cbUid; ensureNotNull(_entity.block).cbType = tmp_cbType; ensureNotNull(_entity.block).cbIndentLevel = tmp_cbIndentLevel; ensureNotNull(_entity.block).cbModuleParentBlockUid = tmp_cbModuleParentBlockUid; ensureNotNull(_entity.block).cbTitle = tmp_cbTitle; ensureNotNull(_entity.block).cbDescription = tmp_cbDescription; ensureNotNull(_entity.block).cbCompletionCriteria = tmp_cbCompletionCriteria; ensureNotNull(_entity.block).cbHideUntilDate = tmp_cbHideUntilDate; ensureNotNull(_entity.block).cbDeadlineDate = tmp_cbDeadlineDate; ensureNotNull(_entity.block).cbLateSubmissionPenalty = tmp_cbLateSubmissionPenalty; ensureNotNull(_entity.block).cbGracePeriodDate = tmp_cbGracePeriodDate; ensureNotNull(_entity.block).cbMaxPoints = tmp_cbMaxPoints; ensureNotNull(_entity.block).cbMinPoints = tmp_cbMinPoints; ensureNotNull(_entity.block).cbIndex = tmp_cbIndex; ensureNotNull(_entity.block).cbClazzUid = tmp_cbClazzUid; ensureNotNull(_entity.block).cbActive = tmp_cbActive; ensureNotNull(_entity.block).cbHidden = tmp_cbHidden; ensureNotNull(_entity.block).cbEntityUid = tmp_cbEntityUid; ensureNotNull(_entity.block).cbLct = tmp_cbLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(closure$entityUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findEntryWithBlockAndLanguageByUidAsync($this, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entityUid = entityUid_0; } Coroutine$findEntryWithBlockAndLanguageByUidAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithBlockAndLanguageByUidAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithBlockAndLanguageByUidAsync.prototype.constructor = Coroutine$findEntryWithBlockAndLanguageByUidAsync; Coroutine$findEntryWithBlockAndLanguageByUidAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryWithBlockAndLanguage) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, \n | Language.*,\n | CourseBlock.*\n | FROM ContentEntry\n | LEFT JOIN Language \n | ON Language.langUid = ContentEntry.primaryLanguageUid \n | \n | LEFT JOIN CourseBlock\n | ON CourseBlock.cbType = 104\n | AND CourseBlock.cbEntityUid = ?\n | \n | WHERE ContentEntry.contentEntryUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentEntry.*, \n | Language.*,\n | CourseBlock.*\n | FROM ContentEntry\n | LEFT JOIN Language \n | ON Language.langUid = ContentEntry.primaryLanguageUid \n | \n | LEFT JOIN CourseBlock\n | ON CourseBlock.cbType = 104\n | AND CourseBlock.cbEntityUid = ?\n | \n | WHERE ContentEntry.contentEntryUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(this.local$entityUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findEntryWithBlockAndLanguageByUidAsync = function (entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithBlockAndLanguageByUidAsync(this, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithMostRecentContainer(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _container_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }if (_container_nullFieldCount < 12) { if (_entity.container == null) { _entity.container = new Container(); }ensureNotNull(_entity.container).containerUid = tmp_containerUid; ensureNotNull(_entity.container).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.container).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.container).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.container).cntLct = tmp_cntLct; ensureNotNull(_entity.container).fileSize = tmp_fileSize; ensureNotNull(_entity.container).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.container).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.container).mimeType = tmp_mimeType; ensureNotNull(_entity.container).remarks = tmp_remarks; ensureNotNull(_entity.container).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.container).cntNumEntries = tmp_cntNumEntries; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(closure$entryUuid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(closure$entryUuid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(closure$entryUuid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findEntryWithContainerByEntryId_s8cxhz$($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entryUuid = entryUuid_0; } Coroutine$findEntryWithContainerByEntryId_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithContainerByEntryId_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithContainerByEntryId_s8cxhz$.prototype.constructor = Coroutine$findEntryWithContainerByEntryId_s8cxhz$; Coroutine$findEntryWithContainerByEntryId_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryWithMostRecentContainer) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, Container.* FROM ContentEntry LEFT \n | JOIN Container ON Container.containerUid = (\n | SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentEntryUid=?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentEntry.*, Container.* FROM ContentEntry LEFT \n | JOIN Container ON Container.containerUid = (\n | SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentEntryUid=?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(this.local$entryUuid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findEntryWithContainerByEntryId_s8cxhz$ = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithContainerByEntryId_s8cxhz$(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithMostRecentContainer(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _container_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _container_nullFieldCount = _container_nullFieldCount + 1 | 0; }if (_container_nullFieldCount < 12) { if (_entity.container == null) { _entity.container = new Container(); }ensureNotNull(_entity.container).containerUid = tmp_containerUid; ensureNotNull(_entity.container).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.container).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.container).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.container).cntLct = tmp_cntLct; ensureNotNull(_entity.container).fileSize = tmp_fileSize; ensureNotNull(_entity.container).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.container).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.container).mimeType = tmp_mimeType; ensureNotNull(_entity.container).remarks = tmp_remarks; ensureNotNull(_entity.container).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.container).cntNumEntries = tmp_cntNumEntries; }closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(closure$entryUuid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(closure$entryUuid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(closure$entryUuid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this$ContentEntryDao_JdbcKt_0, closure$entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$entryUuid = closure$entryUuid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryWithMostRecentContainer) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, Container.* FROM ContentEntry LEFT \n | JOIN Container ON Container.containerUid = (\n | SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentEntryUid=?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentEntry.*, Container.* FROM ContentEntry LEFT \n | JOIN Container ON Container.containerUid = (\n | SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentEntryUid=?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(this.local$closure$entryUuid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this$ContentEntryDao_JdbcKt_0, closure$entryUuid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this$ContentEntryDao_JdbcKt_0, closure$entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findEntryWithContainerByEntryIdLive_s8cxhz$ = function (entryUuid) { var _result = new DoorLiveDataImpl(this._db, listOf(['ContentEntry', 'Container']), ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this, entryUuid)); return _result; }; function ContentEntryDao_JdbcKt$findBySourceUrl$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v = _entity; }return Unit; }; } function ContentEntryDao_JdbcKt$findBySourceUrl$lambda(closure$sourceUrl, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$sourceUrl); useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$findBySourceUrl$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryDao_JdbcKt.prototype.findBySourceUrl = function (sourceUrl) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE sourceUrl = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry WHERE sourceUrl = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$findBySourceUrl$lambda(sourceUrl, _result)); return _result.v; }; function ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findTitleByUidAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findTitleByUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findTitleByUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findTitleByUidAsync_s8cxhz$.prototype.constructor = Coroutine$findTitleByUidAsync_s8cxhz$; Coroutine$findTitleByUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT title FROM ContentEntry WHERE contentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT title FROM ContentEntry WHERE contentEntryUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findTitleByUidAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findTitleByUidAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$parentUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$parentUid = closure$parentUid; DoorDataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(closure$parentUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(closure$parentUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(closure$parentUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM (SELECT ContentEntry.* FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?) LIMIT ? OFFSET ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT ContentEntry.* FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$parentUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$parentUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(closure$parentUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(closure$parentUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(closure$parentUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$parentUid = closure$parentUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT ContentEntry.* FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?) ', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT ContentEntry.* FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$parentUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$parentUid)); }; ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getChildrenByParentUid = function (parentUid) { var _result = new ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral(this, parentUid); return _result; }; function ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(closure$parentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getChildrenByParentAsync_s8cxhz$($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; } Coroutine$getChildrenByParentAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getChildrenByParentAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getChildrenByParentAsync_s8cxhz$.prototype.constructor = Coroutine$getChildrenByParentAsync_s8cxhz$; Coroutine$getChildrenByParentAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*\n | FROM ContentEntryParentChildJoin\n | JOIN ContentEntry \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentEntry.*\n | FROM ContentEntryParentChildJoin\n | JOIN ContentEntry \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(this.local$parentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.getChildrenByParentAsync_s8cxhz$ = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getChildrenByParentAsync_s8cxhz$(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_mostRecentContainerUid = _resultSet.getLong_61zpoe$('mostRecentContainerUid'); var tmp_mostRecentContainerSize = _resultSet.getLong_61zpoe$('mostRecentContainerSize'); var _entity = new ContentEntryContentJobItemParams(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.leaf = tmp_leaf; _entity.mostRecentContainerUid = tmp_mostRecentContainerUid; _entity.mostRecentContainerSize = tmp_mostRecentContainerSize; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(closure$parentUid_0, closure$limit_0, closure$offset_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$limit = closure$limit_0; this.local$closure$offset = closure$offset_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(closure$parentUid_0, closure$limit_0, closure$offset_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(closure$parentUid_0, closure$limit_0, closure$offset_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getContentJobItemParamsByParentUid_liip7b$($this, parentUid_0, limit_0, offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; this.local$limit = limit_0; this.local$offset = offset_0; } Coroutine$getContentJobItemParamsByParentUid_liip7b$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentJobItemParamsByParentUid_liip7b$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentJobItemParamsByParentUid_liip7b$.prototype.constructor = Coroutine$getContentJobItemParamsByParentUid_liip7b$; Coroutine$getContentJobItemParamsByParentUid_liip7b$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.contentEntryUid AS contentEntryUid, ContentEntry.leaf AS leaf, \n | COALESCE(Container.containerUid, 0) AS mostRecentContainerUid,\n | COALESCE(Container.fileSize, 0) AS mostRecentContainerSize\n | FROM ContentEntryParentChildJoin\n | JOIN ContentEntry \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | LEFT JOIN Container\n | ON containerUid = \n | (SELECT COALESCE((\n | SELECT Container.containerUid \n | FROM Container\n | WHERE Container.containerContentEntryUid = ContentEntry.contentEntryUid\n | ORDER BY Container.cntLastModified DESC\n | LIMIT 1),0))\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n | LIMIT ?\n | OFFSET ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentEntry.contentEntryUid AS contentEntryUid, ContentEntry.leaf AS leaf, \n | COALESCE(Container.containerUid, 0) AS mostRecentContainerUid,\n | COALESCE(Container.fileSize, 0) AS mostRecentContainerSize\n | FROM ContentEntryParentChildJoin\n | JOIN ContentEntry \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | LEFT JOIN Container\n | ON containerUid = \n | (SELECT COALESCE((\n | SELECT Container.containerUid \n | FROM Container\n | WHERE Container.containerContentEntryUid = ContentEntry.contentEntryUid\n | ORDER BY Container.cntLastModified DESC\n | LIMIT 1),0))\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n | LIMIT ?\n | OFFSET ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(this.local$parentUid, this.local$limit, this.local$offset, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.getContentJobItemParamsByParentUid_liip7b$ = function (parentUid_0, limit_0, offset_0, continuation_0, suspended) { var instance = new Coroutine$getContentJobItemParamsByParentUid_liip7b$(this, parentUid_0, limit_0, offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(closure$parentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getCountNumberOfChildrenByParentUUidAsync($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; } Coroutine$getCountNumberOfChildrenByParentUUidAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getCountNumberOfChildrenByParentUUidAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getCountNumberOfChildrenByParentUUidAsync.prototype.constructor = Coroutine$getCountNumberOfChildrenByParentUUidAsync; Coroutine$getCountNumberOfChildrenByParentUUidAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(this.local$parentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.getCountNumberOfChildrenByParentUUidAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getCountNumberOfChildrenByParentUUidAsync(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(closure$parentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getContentByUuidAsync($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; } Coroutine$getContentByUuidAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentByUuidAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentByUuidAsync.prototype.constructor = Coroutine$getContentByUuidAsync; Coroutine$getContentByUuidAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry where contentEntryUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry where contentEntryUid = ? LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(this.local$parentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.getContentByUuidAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getContentByUuidAsync(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(closure$entryUuid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(closure$entryUuid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(closure$entryUuid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllLanguageRelatedEntriesAsync($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entryUuid = entryUuid_0; } Coroutine$findAllLanguageRelatedEntriesAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllLanguageRelatedEntriesAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllLanguageRelatedEntriesAsync.prototype.constructor = Coroutine$findAllLanguageRelatedEntriesAsync; Coroutine$findAllLanguageRelatedEntriesAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry LEFT JOIN ContentEntryRelatedEntryJoin ON ContentEntryRelatedEntryJoin.cerejRelatedEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryRelatedEntryJoin.relType = 1 AND ContentEntryRelatedEntryJoin.cerejRelatedEntryUid != ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.* FROM ContentEntry LEFT JOIN ContentEntryRelatedEntryJoin ON ContentEntryRelatedEntryJoin.cerejRelatedEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryRelatedEntryJoin.relType = 1 AND ContentEntryRelatedEntryJoin.cerejRelatedEntryUid != ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(this.local$entryUuid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findAllLanguageRelatedEntriesAsync = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findAllLanguageRelatedEntriesAsync(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentCategoryUid = _resultSet.getLong_61zpoe$('contentCategoryUid'); var tmp_categoryName = _resultSet.getString_61zpoe$('categoryName'); var tmp_contentCategorySchemaUid = _resultSet.getLong_61zpoe$('contentCategorySchemaUid'); var tmp_schemaName = _resultSet.getString_61zpoe$('schemaName'); var _entity = new DistinctCategorySchema(); _entity.contentCategoryUid = tmp_contentCategoryUid; _entity.categoryName = tmp_categoryName; _entity.contentCategorySchemaUid = tmp_contentCategorySchemaUid; _entity.schemaName = tmp_schemaName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(closure$parentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findListOfCategoriesAsync($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; } Coroutine$findListOfCategoriesAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findListOfCategoriesAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findListOfCategoriesAsync.prototype.constructor = Coroutine$findListOfCategoriesAsync; Coroutine$findListOfCategoriesAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT DISTINCT ContentCategory.contentCategoryUid, ContentCategory.name AS categoryName, ContentCategorySchema.contentCategorySchemaUid, ContentCategorySchema.schemaName FROM ContentEntry LEFT JOIN ContentEntryContentCategoryJoin ON ContentEntryContentCategoryJoin.ceccjContentEntryUid = ContentEntry.contentEntryUid LEFT JOIN ContentCategory ON ContentCategory.contentCategoryUid = ContentEntryContentCategoryJoin.ceccjContentCategoryUid LEFT JOIN ContentCategorySchema ON ContentCategorySchema.contentCategorySchemaUid = ContentCategory.ctnCatContentCategorySchemaUid LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? AND ContentCategory.contentCategoryUid != 0 ORDER BY ContentCategory.name', void 0, void 0, void 0, trimMargin('\n |SELECT DISTINCT ContentCategory.contentCategoryUid, ContentCategory.name AS categoryName, ContentCategorySchema.contentCategorySchemaUid, ContentCategorySchema.schemaName FROM ContentEntry LEFT JOIN ContentEntryContentCategoryJoin ON ContentEntryContentCategoryJoin.ceccjContentEntryUid = ContentEntry.contentEntryUid LEFT JOIN ContentCategory ON ContentCategory.contentCategoryUid = ContentEntryContentCategoryJoin.ceccjContentCategoryUid LEFT JOIN ContentCategorySchema ON ContentCategorySchema.contentCategorySchemaUid = ContentCategory.ctnCatContentCategorySchemaUid LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? AND ContentCategory.contentCategoryUid != 0 ORDER BY ContentCategory.name\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(this.local$parentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findListOfCategoriesAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findListOfCategoriesAsync(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(closure$parentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findUniqueLanguagesInListAsync($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; } Coroutine$findUniqueLanguagesInListAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUniqueLanguagesInListAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUniqueLanguagesInListAsync.prototype.constructor = Coroutine$findUniqueLanguagesInListAsync; Coroutine$findUniqueLanguagesInListAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT DISTINCT Language.* from Language LEFT JOIN ContentEntry ON ContentEntry.primaryLanguageUid = Language.langUid LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? ORDER BY Language.name', void 0, void 0, void 0, trimMargin('\n |SELECT DISTINCT Language.* from Language LEFT JOIN ContentEntry ON ContentEntry.primaryLanguageUid = Language.langUid LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? ORDER BY Language.name\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(this.local$parentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findUniqueLanguagesInListAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findUniqueLanguagesInListAsync(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_langName = _resultSet.getString_61zpoe$('langName'); var _entity = new LangUidAndName(); _entity.langUid = tmp_langUid; _entity.langName = tmp_langName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(closure$parentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(closure$parentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findUniqueLanguageWithParentUid($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$parentUid = parentUid_0; } Coroutine$findUniqueLanguageWithParentUid.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUniqueLanguageWithParentUid.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUniqueLanguageWithParentUid.prototype.constructor = Coroutine$findUniqueLanguageWithParentUid; Coroutine$findUniqueLanguageWithParentUid.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT DISTINCT Language.langUid, Language.name AS langName from Language\n | LEFT JOIN ContentEntry ON ContentEntry.primaryLanguageUid = Language.langUid\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? ORDER BY Language.name\n '), void 0, void 0, void 0, trimMargin('\n |SELECT DISTINCT Language.langUid, Language.name AS langName from Language\n | LEFT JOIN ContentEntry ON ContentEntry.primaryLanguageUid = Language.langUid\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? ORDER BY Language.name\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(this.local$parentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findUniqueLanguageWithParentUid = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findUniqueLanguageWithParentUid(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.title); _stmt.setString_vqvrqt$(2, closure$entity.description); _stmt.setString_vqvrqt$(3, closure$entity.entryId); _stmt.setString_vqvrqt$(4, closure$entity.author); _stmt.setString_vqvrqt$(5, closure$entity.publisher); _stmt.setInt_vux9f0$(6, closure$entity.licenseType); _stmt.setString_vqvrqt$(7, closure$entity.licenseName); _stmt.setString_vqvrqt$(8, closure$entity.licenseUrl); _stmt.setString_vqvrqt$(9, closure$entity.sourceUrl); _stmt.setString_vqvrqt$(10, closure$entity.thumbnailUrl); _stmt.setLong_6svq3l$(11, closure$entity.lastModified); _stmt.setLong_6svq3l$(12, closure$entity.primaryLanguageUid); _stmt.setLong_6svq3l$(13, closure$entity.languageVariantUid); _stmt.setInt_vux9f0$(14, closure$entity.contentFlags); _stmt.setBoolean_fzusl$(15, closure$entity.leaf); _stmt.setBoolean_fzusl$(16, closure$entity.publik); _stmt.setBoolean_fzusl$(17, closure$entity.ceInactive); _stmt.setInt_vux9f0$(18, closure$entity.completionCriteria); _stmt.setInt_vux9f0$(19, closure$entity.minScore); _stmt.setInt_vux9f0$(20, closure$entity.contentTypeFlag); _stmt.setLong_6svq3l$(21, closure$entity.contentOwner); _stmt.setLong_6svq3l$(22, closure$entity.contentEntryLocalChangeSeqNum); _stmt.setLong_6svq3l$(23, closure$entity.contentEntryMasterChangeSeqNum); _stmt.setInt_vux9f0$(24, closure$entity.contentEntryLastChangedBy); _stmt.setLong_6svq3l$(25, closure$entity.contentEntryLct); _stmt.setLong_6svq3l$(26, closure$entity.contentEntryUid); return _stmt.executeUpdate(); }; } ContentEntryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntry SET title = ?, description = ?, entryId = ?, author = ?, publisher = ?, licenseType = ?, licenseName = ?, licenseUrl = ?, sourceUrl = ?, thumbnailUrl = ?, lastModified = ?, primaryLanguageUid = ?, languageVariantUid = ?, contentFlags = ?, leaf = ?, publik = ?, ceInactive = ?, completionCriteria = ?, minScore = ?, contentTypeFlag = ?, contentOwner = ?, contentEntryLocalChangeSeqNum = ?, contentEntryMasterChangeSeqNum = ?, contentEntryLastChangedBy = ?, contentEntryLct = ? WHERE contentEntryUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryDao_JdbcKt$update$lambda(entity)); }; function ContentEntryDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda(closure$entryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUid = closure$entryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByUidAsync$lambda(closure$entryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda(closure$entryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_9($this, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entryUid = entryUid_0; } Coroutine$findByUidAsync_s8cxhz$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_9.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_9; Coroutine$findByUidAsync_s8cxhz$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE contentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry WHERE contentEntryUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findByUidAsync$lambda(this.local$entryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_9(this, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithLanguage(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _language_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }if (_language_nullFieldCount < 11) { if (_entity.language == null) { _entity.language = new Language(); }ensureNotNull(_entity.language).langUid = tmp_langUid; ensureNotNull(_entity.language).name = tmp_name; ensureNotNull(_entity.language).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.language).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.language).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.language).Language_Type = tmp_Language_Type; ensureNotNull(_entity.language).languageActive = tmp_languageActive; ensureNotNull(_entity.language).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.language).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.language).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.language).langLct = tmp_langLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidWithLanguageAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithLanguageAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithLanguageAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithLanguageAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithLanguageAsync_s8cxhz$; Coroutine$findByUidWithLanguageAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryWithLanguage) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, Language.*\n | FROM ContentEntry\n | LEFT JOIN Language \n | ON Language.langUid = ContentEntry.primaryLanguageUid \n | WHERE ContentEntry.contentEntryUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentEntry.*, Language.*\n | FROM ContentEntry\n | LEFT JOIN Language \n | ON Language.langUid = ContentEntry.primaryLanguageUid \n | WHERE ContentEntry.contentEntryUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findByUidWithLanguageAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithLanguageAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v = _entity; }return Unit; }; } function ContentEntryDao_JdbcKt$findByUid$lambda(closure$entryUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entryUid); useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryDao_JdbcKt.prototype.findByUid = function (entryUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE contentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry WHERE contentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$findByUid$lambda(entryUid, _result)); return _result.v; }; function ContentEntryDao_JdbcKt$findByTitle$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(closure$title_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$title = closure$title_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$title); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findByTitle$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(closure$title_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(closure$title_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda(this$ContentEntryDao_JdbcKt_0, closure$title_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$title = closure$title_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE title = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry WHERE title = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(this.local$closure$title, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByTitle$lambda(this$ContentEntryDao_JdbcKt_0, closure$title_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda(this$ContentEntryDao_JdbcKt_0, closure$title_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findByTitle = function (title) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContentEntry'), ContentEntryDao_JdbcKt$findByTitle$lambda(this, title)); return _result; }; function ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$isMeteredAllowedForEntry_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$isMeteredAllowedForEntry_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isMeteredAllowedForEntry_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isMeteredAllowedForEntry_s8cxhz$.prototype.constructor = Coroutine$isMeteredAllowedForEntry_s8cxhz$; Coroutine$isMeteredAllowedForEntry_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((SELECT CAST(cjIsMeteredAllowed AS INTEGER) \n | FROM ContentJobItem \n | JOIN ContentJob\n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE cjiContentEntryUid = ?\n | AND cjiRecursiveStatus >= 4\n | AND cjiRecursiveStatus <= 20 LIMIT 1),\n | CAST(((SELECT connectivityState\n | FROM ConnectivityStatus\n | LIMIT 1) = 3) AS INTEGER),\n | 0) AS Status\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((SELECT CAST(cjIsMeteredAllowed AS INTEGER) \n | FROM ContentJobItem \n | JOIN ContentJob\n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE cjiContentEntryUid = ?\n | AND cjiRecursiveStatus >= 4\n | AND cjiRecursiveStatus <= 20 LIMIT 1),\n | CAST(((SELECT connectivityState\n | FROM ConnectivityStatus\n | LIMIT 1) = 3) AS INTEGER),\n | 0) AS Status\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.isMeteredAllowedForEntry_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$isMeteredAllowedForEntry_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(closure$sourceUrl_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sourceUrl = closure$sourceUrl_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$sourceUrl); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(closure$sourceUrl_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(closure$sourceUrl_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findBySourceUrlWithContentEntryStatusAsync($this, sourceUrl_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$sourceUrl = sourceUrl_0; } Coroutine$findBySourceUrlWithContentEntryStatusAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySourceUrlWithContentEntryStatusAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySourceUrlWithContentEntryStatusAsync.prototype.constructor = Coroutine$findBySourceUrlWithContentEntryStatusAsync; Coroutine$findBySourceUrlWithContentEntryStatusAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry WHERE ContentEntry.sourceUrl = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.* FROM ContentEntry WHERE ContentEntry.sourceUrl = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(this.local$sourceUrl, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findBySourceUrlWithContentEntryStatusAsync = function (sourceUrl_0, continuation_0, suspended) { var instance = new Coroutine$findBySourceUrlWithContentEntryStatusAsync(this, sourceUrl_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$personUid, closure$parentUid, closure$langParam, closure$showHidden, closure$onlyFolder, closure$categoryParam0, closure$sortOrder) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$parentUid = closure$parentUid; this.closure$langParam = closure$langParam; this.closure$showHidden = closure$showHidden; this.closure$onlyFolder = closure$onlyFolder; this.closure$categoryParam0 = closure$categoryParam0; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_assignmentContentWeight = _resultSet.getInt_61zpoe$('assignmentContentWeight'); var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); _entity.assignmentContentWeight = tmp_assignmentContentWeight; _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.scoreProgress == null) { _entity.scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(_entity.scoreProgress).resultScore = tmp_resultScore; ensureNotNull(_entity.scoreProgress).resultMax = tmp_resultMax; ensureNotNull(_entity.scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(_entity.scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(_entity.scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(_entity.scoreProgress).progress = tmp_progress; ensureNotNull(_entity.scoreProgress).success = tmp_success; ensureNotNull(_entity.scoreProgress).penalty = tmp_penalty; ensureNotNull(_entity.scoreProgress).totalContent = tmp_totalContent; ensureNotNull(_entity.scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$parentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$langParam); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$langParam); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$showHidden); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$onlyFolder); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$categoryParam0); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$categoryParam0); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? \n | AND (? = 0 OR ContentEntry.primaryLanguageUid = ?) \n | AND (NOT ContentEntry.ceInactive OR ContentEntry.ceInactive = ?) \n | AND (NOT ContentEntry.leaf OR NOT ContentEntry.leaf = ?) \n | AND (ContentEntry.publik \n | OR (SELECT username\n | FROM Person\n | WHERE personUid = ?) IS NOT NULL) \n | AND \n | (? = 0 OR ? \n | IN (SELECT ceccjContentCategoryUid \n | FROM ContentEntryContentCategoryJoin \n | WHERE ceccjContentEntryUid = ContentEntry.contentEntryUid)) \n | ORDER BY ContentEntryParentChildJoin.childIndex,\n | CASE(?)\n | WHEN 1 THEN ContentEntry.title\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ContentEntry.title\n | ELSE ''\n | END DESC, \n | ContentEntry.contentEntryUid) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? \n | AND (? = 0 OR ContentEntry.primaryLanguageUid = ?) \n | AND (NOT ContentEntry.ceInactive OR ContentEntry.ceInactive = ?) \n | AND (NOT ContentEntry.leaf OR NOT ContentEntry.leaf = ?) \n | AND (ContentEntry.publik \n | OR (SELECT username\n | FROM Person\n | WHERE personUid = ?) IS NOT NULL) \n | AND \n | (? = 0 OR ? \n | IN (SELECT ceccjContentCategoryUid \n | FROM ContentEntryContentCategoryJoin \n | WHERE ceccjContentEntryUid = ContentEntry.contentEntryUid)) \n | ORDER BY ContentEntryParentChildJoin.childIndex,\n | CASE(?)\n | WHEN 1 THEN ContentEntry.title\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ContentEntry.title\n | ELSE ''\n | END DESC, \n | ContentEntry.contentEntryUid) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$parentUid, this.local$closure$langParam, this.local$closure$showHidden, this.local$closure$onlyFolder, this.local$closure$categoryParam0, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ContentEntryContentCategoryJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, this.closure$parentUid, this.closure$langParam, this.closure$showHidden, this.closure$onlyFolder, this.closure$categoryParam0, this.closure$sortOrder, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$parentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$langParam); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$langParam); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$showHidden); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$onlyFolder); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$categoryParam0); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$categoryParam0); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? \n | AND (? = 0 OR ContentEntry.primaryLanguageUid = ?) \n | AND (NOT ContentEntry.ceInactive OR ContentEntry.ceInactive = ?) \n | AND (NOT ContentEntry.leaf OR NOT ContentEntry.leaf = ?) \n | AND (ContentEntry.publik \n | OR (SELECT username\n | FROM Person\n | WHERE personUid = ?) IS NOT NULL) \n | AND \n | (? = 0 OR ? \n | IN (SELECT ceccjContentCategoryUid \n | FROM ContentEntryContentCategoryJoin \n | WHERE ceccjContentEntryUid = ContentEntry.contentEntryUid)) \n | ORDER BY ContentEntryParentChildJoin.childIndex,\n | CASE(?)\n | WHEN 1 THEN ContentEntry.title\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ContentEntry.title\n | ELSE ''\n | END DESC, \n | ContentEntry.contentEntryUid) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? \n | AND (? = 0 OR ContentEntry.primaryLanguageUid = ?) \n | AND (NOT ContentEntry.ceInactive OR ContentEntry.ceInactive = ?) \n | AND (NOT ContentEntry.leaf OR NOT ContentEntry.leaf = ?) \n | AND (ContentEntry.publik \n | OR (SELECT username\n | FROM Person\n | WHERE personUid = ?) IS NOT NULL) \n | AND \n | (? = 0 OR ? \n | IN (SELECT ceccjContentCategoryUid \n | FROM ContentEntryContentCategoryJoin \n | WHERE ceccjContentEntryUid = ContentEntry.contentEntryUid)) \n | ORDER BY ContentEntryParentChildJoin.childIndex,\n | CASE(?)\n | WHEN 1 THEN ContentEntry.title\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ContentEntry.title\n | ELSE ''\n | END DESC, \n | ContentEntry.contentEntryUid) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$parentUid, this.local$closure$langParam, this.local$closure$showHidden, this.local$closure$onlyFolder, this.local$closure$categoryParam0, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ContentEntryContentCategoryJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, this.closure$parentUid, this.closure$langParam, this.closure$showHidden, this.closure$onlyFolder, this.closure$categoryParam0, this.closure$sortOrder)); }; ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getChildrenByParentUidWithCategoryFilterOrderByNameAsc = function (parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder) { var _result = new ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral(this, personUid, parentUid, langParam, showHidden, onlyFolder, categoryParam0, sortOrder); return _result; }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$personUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$personUid = closure$personUid; DoorDataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_assignmentContentWeight = _resultSet.getInt_61zpoe$('assignmentContentWeight'); var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); _entity.assignmentContentWeight = tmp_assignmentContentWeight; _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.scoreProgress == null) { _entity.scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(_entity.scoreProgress).resultScore = tmp_resultScore; ensureNotNull(_entity.scoreProgress).resultMax = tmp_resultMax; ensureNotNull(_entity.scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(_entity.scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(_entity.scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(_entity.scoreProgress).progress = tmp_progress; ensureNotNull(_entity.scoreProgress).success = tmp_success; ensureNotNull(_entity.scoreProgress).penalty = tmp_penalty; ensureNotNull(_entity.scoreProgress).totalContent = tmp_totalContent; ensureNotNull(_entity.scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM CourseBlock\n | JOIN ContentEntry \n | ON CourseBlock.cbType = 104\n | AND ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CAST(CourseBlock.cbActive AS INTEGER) = 1\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | \n | WHERE CourseBlock.cbClazzUid IN\n | (SELECT ClazzEnrolment.clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM CourseBlock\n | JOIN ContentEntry \n | ON CourseBlock.cbType = 104\n | AND ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CAST(CourseBlock.cbActive AS INTEGER) = 1\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | \n | WHERE CourseBlock.cbClazzUid IN\n | (SELECT ClazzEnrolment.clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['CourseBlock', 'ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ClazzEnrolment']), ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM CourseBlock\n | JOIN ContentEntry \n | ON CourseBlock.cbType = 104\n | AND ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CAST(CourseBlock.cbActive AS INTEGER) = 1\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | \n | WHERE CourseBlock.cbClazzUid IN\n | (SELECT ClazzEnrolment.clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM CourseBlock\n | JOIN ContentEntry \n | ON CourseBlock.cbType = 104\n | AND ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CAST(CourseBlock.cbActive AS INTEGER) = 1\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | \n | WHERE CourseBlock.cbClazzUid IN\n | (SELECT ClazzEnrolment.clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['CourseBlock', 'ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ClazzEnrolment']), ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid)); }; ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getContentFromMyCourses_s8cxhz$ = function (personUid) { var _result = new ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral(this, personUid); return _result; }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$personUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$personUid = closure$personUid; DoorDataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_assignmentContentWeight = _resultSet.getInt_61zpoe$('assignmentContentWeight'); var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); _entity.assignmentContentWeight = tmp_assignmentContentWeight; _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.scoreProgress == null) { _entity.scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(_entity.scoreProgress).resultScore = tmp_resultScore; ensureNotNull(_entity.scoreProgress).resultMax = tmp_resultMax; ensureNotNull(_entity.scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(_entity.scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(_entity.scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(_entity.scoreProgress).progress = tmp_progress; ensureNotNull(_entity.scoreProgress).success = tmp_success; ensureNotNull(_entity.scoreProgress).penalty = tmp_penalty; ensureNotNull(_entity.scoreProgress).totalContent = tmp_totalContent; ensureNotNull(_entity.scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentOwner = ?\n | AND NOT EXISTS(\n | SELECT ContentEntryParentChildJoin.cepcjUid \n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid)\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentOwner = ?\n | AND NOT EXISTS(\n | SELECT ContentEntryParentChildJoin.cepcjUid \n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid)\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container']), ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentOwner = ?\n | AND NOT EXISTS(\n | SELECT ContentEntryParentChildJoin.cepcjUid \n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid)\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentOwner = ?\n | AND NOT EXISTS(\n | SELECT ContentEntryParentChildJoin.cepcjUid \n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid)\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container']), ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid)); }; ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getContentByOwner_s8cxhz$ = function (personUid) { var _result = new ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral(this, personUid); return _result; }; function Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.title); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.description); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.entryId); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.author); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.publisher); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.licenseType); this.local$_stmt.setString_vqvrqt$(7, this.local$closure$entity.licenseName); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$entity.licenseUrl); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$entity.sourceUrl); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$entity.thumbnailUrl); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.lastModified); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$entity.primaryLanguageUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.languageVariantUid); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$entity.contentFlags); this.local$_stmt.setBoolean_fzusl$(15, this.local$closure$entity.leaf); this.local$_stmt.setBoolean_fzusl$(16, this.local$closure$entity.publik); this.local$_stmt.setBoolean_fzusl$(17, this.local$closure$entity.ceInactive); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$entity.completionCriteria); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$entity.minScore); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$entity.contentTypeFlag); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.contentOwner); this.local$_stmt.setLong_6svq3l$(22, this.local$closure$entity.contentEntryLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(23, this.local$closure$entity.contentEntryMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(24, this.local$closure$entity.contentEntryLastChangedBy); this.local$_stmt.setLong_6svq3l$(25, this.local$closure$entity.contentEntryLct); this.local$_stmt.setLong_6svq3l$(26, this.local$closure$entity.contentEntryUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_4pedz3$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_4pedz3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_4pedz3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_4pedz3$.prototype.constructor = Coroutine$updateAsync_4pedz3$; Coroutine$updateAsync_4pedz3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE ContentEntry SET title = ?, description = ?, entryId = ?, author = ?, publisher = ?, licenseType = ?, licenseName = ?, licenseUrl = ?, sourceUrl = ?, thumbnailUrl = ?, lastModified = ?, primaryLanguageUid = ?, languageVariantUid = ?, contentFlags = ?, leaf = ?, publik = ?, ceInactive = ?, completionCriteria = ?, minScore = ?, contentTypeFlag = ?, contentOwner = ?, contentEntryLocalChangeSeqNum = ?, contentEntryMasterChangeSeqNum = ?, contentEntryLastChangedBy = ?, contentEntryLct = ? WHERE contentEntryUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ContentEntryDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.updateAsync_4pedz3$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_4pedz3$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getChildrenByAll$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryDao_JdbcKt$getChildrenByAll$lambda(closure$parentUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$parentUid); useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$getChildrenByAll$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryDao_JdbcKt.prototype.getChildrenByAll = function (parentUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.* FROM ContentEntry LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$getChildrenByAll$lambda(parentUid, _result)); return _result.v; }; function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(closure$parentUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(closure$parentUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(closure$parentUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$parentUid = closure$parentUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry where contentEntryUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry where contentEntryUid = ? LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(this.local$closure$parentUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findLiveContentEntry = function (parentUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContentEntry'), ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this, parentUid)); return _result; }; function ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda(closure$objectId, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$objectId); useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryDao_JdbcKt.prototype.getContentEntryUidFromXapiObjectId = function (objectId) { var _result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COALESCE((SELECT contentEntryUid \n | FROM ContentEntry \n | WHERE entryId = ? \n | LIMIT 1),0) AS ID\n '), void 0, void 0, void 0, trimMargin('\n |SELECT COALESCE((SELECT contentEntryUid \n | FROM ContentEntry \n | WHERE entryId = ? \n | LIMIT 1),0) AS ID\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda(objectId, _result)); return _result.v; }; function ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda(closure$sourceUrl, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$sourceUrl); useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryDao_JdbcKt.prototype.findSimilarIdEntryForKhan = function (sourceUrl) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE sourceUrl LIKE ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntry WHERE sourceUrl LIKE ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda(sourceUrl, _result)); return _result.v; }; function ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_numEntries = _resultSet.getInt_61zpoe$('numEntries'); var tmp_totalSize = _resultSet.getLong_61zpoe$('totalSize'); var _entity = new DownloadJobSizeInfo(); _entity.numEntries = tmp_numEntries; _entity.totalSize = tmp_totalSize; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda; Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getRecursiveDownloadTotals_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getRecursiveDownloadTotals_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getRecursiveDownloadTotals_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getRecursiveDownloadTotals_s8cxhz$.prototype.constructor = Coroutine$getRecursiveDownloadTotals_s8cxhz$; Coroutine$getRecursiveDownloadTotals_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, DownloadJobSizeInfo) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | WITH RECURSIVE \n | ContentEntry_recursive(contentEntryUid, containerSize) AS (\n | SELECT contentEntryUid, \n | (SELECT COALESCE((SELECT fileSize \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1), 0)) AS containerSize \n | FROM ContentEntry \n | WHERE contentEntryUid = ?\n | AND NOT ceInactive\n | UNION \n | SELECT ContentEntry.contentEntryUid, \n | (SELECT COALESCE((SELECT fileSize \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1), 0)) AS containerSize \n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid,\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid\n | AND NOT ceInactive)\n | SELECT COUNT(*) AS numEntries, \n | SUM(containerSize) AS totalSize \n | FROM ContentEntry_recursive\n '), void 0, void 0, void 0, trimMargin('\n |\n | WITH RECURSIVE \n | ContentEntry_recursive(contentEntryUid, containerSize) AS (\n | SELECT contentEntryUid, \n | (SELECT COALESCE((SELECT fileSize \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1), 0)) AS containerSize \n | FROM ContentEntry \n | WHERE contentEntryUid = ?\n | AND NOT ceInactive\n | UNION \n | SELECT ContentEntry.contentEntryUid, \n | (SELECT COALESCE((SELECT fileSize \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1), 0)) AS containerSize \n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid,\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid\n | AND NOT ceInactive)\n | SELECT COUNT(*) AS numEntries, \n | SUM(containerSize) AS totalSize \n | FROM ContentEntry_recursive\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.getRecursiveDownloadTotals_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getRecursiveDownloadTotals_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$contentEntryUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$contentEntryUid = closure$contentEntryUid; DoorDataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndMostRecentContainer(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'Container']), ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$contentEntryUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(this.local$closure$contentEntryUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'Container']), ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$contentEntryUid)); }; ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getAllEntriesRecursively_s8cxhz$ = function (contentEntryUid) { var _result = new ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral(this, contentEntryUid); return _result; }; function ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithParentChildJoinAndMostRecentContainer(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.mostRecentContainer == null) { _entity.mostRecentContainer = new Container(); }ensureNotNull(_entity.mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(_entity.mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(_entity.mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(_entity.mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(_entity.mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(_entity.mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(_entity.mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(_entity.mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(_entity.mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(_entity.mostRecentContainer).remarks = tmp_remarks; ensureNotNull(_entity.mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(_entity.mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.contentEntryParentChildJoin == null) { _entity.contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(_entity.contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(_entity.contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(_entity.contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda(closure$contentEntryUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryDao_JdbcKt.prototype.getAllEntriesRecursivelyAsList_s8cxhz$ = function (contentEntryUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive\n '), void 0, void 0, void 0, trimMargin('\n |WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda(contentEntryUid, _result)); return _result.v; }; function ContentEntryDao_JdbcKt$updateContentEntryInActive$lambda(closure$ceInactive, closure$changedTime, closure$contentEntryUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$ceInactive); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$contentEntryUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContentEntryDao_JdbcKt.prototype.updateContentEntryInActive = function (contentEntryUid, ceInactive, changedTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry \n | SET ceInactive = ?,\n | contentEntryLct = ? \n | WHERE ContentEntry.contentEntryUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentEntry \n | SET ceInactive = ?,\n | contentEntryLct = ? \n | WHERE ContentEntry.contentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$updateContentEntryInActive$lambda(ceInactive, changedTime, contentEntryUid)); }; function ContentEntryDao_JdbcKt$updateContentEntryContentFlag$lambda(closure$contentFlag, closure$changedTime, closure$contentEntryUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$contentFlag); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$contentEntryUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContentEntryDao_JdbcKt.prototype.updateContentEntryContentFlag = function (contentFlag, contentEntryUid, changedTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry \n | SET contentTypeFlag = ?,\n | contentEntryLct = ? \n | WHERE ContentEntry.contentEntryUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentEntry \n | SET contentTypeFlag = ?,\n | contentEntryLct = ? \n | WHERE ContentEntry.contentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$updateContentEntryContentFlag$lambda(contentFlag, changedTime, contentEntryUid)); }; ContentEntryDao_JdbcKt.prototype.replaceList_o4zuk4$ = function (entries) { this._insertAdapterContentEntry_upsert.insertList_4ezy5m$(entries); }; function ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_uid = _resultSet.getLong_61zpoe$('uid'); var tmp_labelName = _resultSet.getString_61zpoe$('labelName'); var _entity = new UidAndLabel(); _entity.uid = tmp_uid; _entity.labelName = tmp_labelName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$contentEntryUids = closure$contentEntryUids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$ContentEntryDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$contentEntryUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getContentEntryFromUids_gox9k8$($this, contentEntryUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUids = contentEntryUids_0; } Coroutine$getContentEntryFromUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentEntryFromUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentEntryFromUids_gox9k8$.prototype.constructor = Coroutine$getContentEntryFromUids_gox9k8$; Coroutine$getContentEntryFromUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |Select ContentEntry.contentEntryUid AS uid, ContentEntry.title As labelName \n | from ContentEntry WHERE contentEntryUid IN (?)\n '), true, void 0, void 0, trimMargin('\n |Select ContentEntry.contentEntryUid AS uid, ContentEntry.title As labelName \n | from ContentEntry WHERE contentEntryUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(this.$this, this.local$contentEntryUids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.getContentEntryFromUids_gox9k8$ = function (contentEntryUids_0, continuation_0, suspended) { var instance = new Coroutine$getContentEntryFromUids_gox9k8$(this, contentEntryUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_JdbcKt.prototype.insertWithReplace_4pedz3$ = function (entry) { this._insertAdapterContentEntry_upsert.insert_11rb$(entry); }; function ContentEntryDao_JdbcKt$findAllLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntryWithLanguage(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; var _language_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }if (_language_nullFieldCount < 11) { if (_entity.language == null) { _entity.language = new Language(); }ensureNotNull(_entity.language).langUid = tmp_langUid; ensureNotNull(_entity.language).name = tmp_name; ensureNotNull(_entity.language).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.language).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.language).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.language).Language_Type = tmp_Language_Type; ensureNotNull(_entity.language).languageActive = tmp_languageActive; ensureNotNull(_entity.language).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.language).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.language).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.language).langLct = tmp_langLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findAllLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda(this$ContentEntryDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.*, Language.* FROM ContentEntry LEFT JOIN Language ON Language.langUid = ContentEntry.primaryLanguageUid', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.*, Language.* FROM ContentEntry LEFT JOIN Language ON Language.langUid = ContentEntry.primaryLanguageUid\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, _stmtConfig, ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findAllLive$lambda(this$ContentEntryDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda(this$ContentEntryDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findAllLive = function () { var _result = new DoorLiveDataImpl(this._db, listOf(['ContentEntry', 'Language']), ContentEntryDao_JdbcKt$findAllLive$lambda(this)); return _result; }; function ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(closure$contentEntryUid_0, closure$accountPersonUid_0, closure$permission_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$permission = closure$permission_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(closure$contentEntryUid_0, closure$accountPersonUid_0, closure$permission_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(closure$contentEntryUid_0, closure$accountPersonUid_0, closure$permission_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$personHasPermissionWithContentEntry_b9bd0d$($this, accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$contentEntryUid = contentEntryUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithContentEntry_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithContentEntry_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithContentEntry_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionWithContentEntry_b9bd0d$; Coroutine$personHasPermissionWithContentEntry_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT EXISTS(SELECT 1 FROM ContentEntry WHERE ContentEntry.contentEntryUid = ? AND ? IN (\n | SELECT DISTINCT Person.PersonUid FROM Person\n | LEFT JOIN PersonGroupMember ON Person.personUid = PersonGroupMember.groupMemberPersonUid\n | LEFT JOIN EntityRole ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid\n | WHERE \n | CAST(Person.admin AS INTEGER) = 1\n | OR \n | (EntityRole.ertableId = 42 AND \n | EntityRole.erEntityUid = ContentEntry.contentEntryUid AND\n | (Role.rolePermissions & \n | ? ) > 0)))\n '), void 0, void 0, void 0, trimMargin('\n |SELECT EXISTS(SELECT 1 FROM ContentEntry WHERE ContentEntry.contentEntryUid = ? AND ? IN (\n | SELECT DISTINCT Person.PersonUid FROM Person\n | LEFT JOIN PersonGroupMember ON Person.personUid = PersonGroupMember.groupMemberPersonUid\n | LEFT JOIN EntityRole ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid\n | WHERE \n | CAST(Person.admin AS INTEGER) = 1\n | OR \n | (EntityRole.ertableId = 42 AND \n | EntityRole.erEntityUid = ContentEntry.contentEntryUid AND\n | (Role.rolePermissions & \n | ? ) > 0)))\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(this.local$contentEntryUid, this.local$accountPersonUid, this.local$permission, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.personHasPermissionWithContentEntry_b9bd0d$ = function (accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithContentEntry_b9bd0d$(this, accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda(closure$inactive, closure$changedTime, closure$jobId) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$inactive); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$jobId); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ContentEntryDao_JdbcKt.prototype.updateContentEntryActiveByContentJobUid_zaz62j$ = function (jobId, inactive, changedTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry\n | SET ceInactive = ?,\n | contentEntryLct = ?\n | WHERE contentEntryUid IN \n | (SELECT cjiContentEntryUid \n | FROM ContentJobItem\n | WHERE cjiJobUid = ?\n | AND CAST(ContentJobItem.cjiContentDeletedOnCancellation AS INTEGER) = 1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentEntry\n | SET ceInactive = ?,\n | contentEntryLct = ?\n | WHERE contentEntryUid IN \n | (SELECT cjiContentEntryUid \n | FROM ContentJobItem\n | WHERE cjiJobUid = ?\n | AND CAST(ContentJobItem.cjiContentDeletedOnCancellation AS INTEGER) = 1)\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda(inactive, changedTime, jobId)); }; function Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(closure$toggleVisibility_0, closure$changedTime_0, this$ContentEntryDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$changedTime = closure$changedTime_0; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda; Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changedTime); this.local$_stmt.setArray_wqp8hw$(3, this.local$this$ContentEntryDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(closure$toggleVisibility_0, closure$changedTime_0, this$ContentEntryDao_JdbcKt_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(closure$toggleVisibility_0, closure$changedTime_0, this$ContentEntryDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityContentEntryItems_cbj1f0$($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityContentEntryItems_cbj1f0$; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry \n | SET ceInactive = ?, \n | contentEntryLct = ? \n | WHERE contentEntryUid IN (?)\n '), true, void 0, void 0, trimMargin('\n |\n | UPDATE ContentEntry \n | SET ceInactive = ?, \n | contentEntryLct = ? \n | WHERE contentEntryUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(this.local$toggleVisibility, this.local$changedTime, this.$this, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.toggleVisibilityContentEntryItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityContentEntryItems_cbj1f0$(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda; Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.prototype.constructor = Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize; Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n |SELECT ContentEntry.*\n | FROM ContentEntry\n | JOIN Container ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container\n | WHERE Container.containercontententryUid = ContentEntry.contentEntryUid\n | AND Container.cntLastModified = \n | (SELECT MAX(ContainerInternal.cntLastModified)\n | FROM Container ContainerInternal\n | WHERE ContainerInternal.containercontententryUid = ContentEntry.contentEntryUid))\n | WHERE ContentEntry.leaf \n | AND NOT ContentEntry.ceInactive\n | AND (NOT EXISTS \n | (SELECT ContainerEntry.ceUid\n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid)\n | OR Container.fileSize = 0) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n |SELECT ContentEntry.*\n | FROM ContentEntry\n | JOIN Container ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container\n | WHERE Container.containercontententryUid = ContentEntry.contentEntryUid\n | AND Container.cntLastModified = \n | (SELECT MAX(ContainerInternal.cntLastModified)\n | FROM Container ContainerInternal\n | WHERE ContainerInternal.containercontententryUid = ContentEntry.contentEntryUid))\n | WHERE ContentEntry.leaf \n | AND NOT ContentEntry.ceInactive\n | AND (NOT EXISTS \n | (SELECT ContainerEntry.ceUid\n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid)\n | OR Container.fileSize = 0) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize = function (continuation_0, suspended) { var instance = new Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_showDownloadButton = _resultSet.getBoolean_61zpoe$('showDownloadButton'); var tmp_showOpenButton = _resultSet.getBoolean_61zpoe$('showOpenButton'); var tmp_showUpdateButton = _resultSet.getBoolean_61zpoe$('showUpdateButton'); var tmp_showDeleteButton = _resultSet.getBoolean_61zpoe$('showDeleteButton'); var tmp_showManageDownloadButton = _resultSet.getBoolean_61zpoe$('showManageDownloadButton'); var _entity = new ContentEntryButtonModel(); _entity.showDownloadButton = tmp_showDownloadButton; _entity.showOpenButton = tmp_showOpenButton; _entity.showUpdateButton = tmp_showUpdateButton; _entity.showDeleteButton = tmp_showDeleteButton; _entity.showManageDownloadButton = tmp_showManageDownloadButton; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(closure$contentEntryUid_0, closure$platformDownloadEnabled_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$platformDownloadEnabled = closure$platformDownloadEnabled_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$contentEntryUid); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$platformDownloadEnabled); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$platformDownloadEnabled); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$contentEntryUid); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$platformDownloadEnabled); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(closure$contentEntryUid_0, closure$platformDownloadEnabled_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(closure$contentEntryUid_0, closure$platformDownloadEnabled_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$buttonsToShowForContentEntry_2gd3um$($this, contentEntryUid_0, platformDownloadEnabled_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; this.local$platformDownloadEnabled = platformDownloadEnabled_0; } Coroutine$buttonsToShowForContentEntry_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$buttonsToShowForContentEntry_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$buttonsToShowForContentEntry_2gd3um$.prototype.constructor = Coroutine$buttonsToShowForContentEntry_2gd3um$; Coroutine$buttonsToShowForContentEntry_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryButtonModel) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | WITH ContentEntryContainerUids AS \n | (SELECT Container.containerUid\n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND Container.fileSize > 0),\n | \n | \n | LatestDownloadedContainer(containerUid) AS\n | (SELECT COALESCE(\n | (SELECT containerUid\n | FROM Container\n | WHERE Container.containerContentEntryUid = ? \n | AND EXISTS(\n | SELECT 1\n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid)\n | ORDER BY cntLastModified DESC\n | LIMIT 1), 0))\n | ,\n | \n | \n | ActiveContentJobItems(cjiRecursiveStatus, cjiPluginId) AS\n | (SELECT cjiRecursiveStatus, cjiPluginId\n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | AND cjiStatus BETWEEN 4 AND 20)\n | ,\n | \n | ShowDownload(showDownload) AS \n | (SELECT CAST(? AS INTEGER) = 1\n | AND (SELECT containerUid FROM LatestDownloadedContainer) = 0\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0\n | AND (SELECT COUNT(*) FROM ContentEntryContainerUids) > 0)\n | \n | SELECT (SELECT showDownload FROM ShowDownload)\n | AS showDownloadButton,\n | \n | CAST(? AS INTEGER) = 0\n | OR (SELECT containerUid FROM LatestDownloadedContainer) != 0 \n | AS showOpenButton,\n | \n | (SELECT NOT showDownload FROM ShowDownload)\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0 \n | AND (SELECT COALESCE(\n | (SELECT cntLastModified\n | FROM Container\n | WHERE containerContentEntryUid = ?\n | AND fileSize > 0\n | ORDER BY cntLastModified DESC), 0)) \n | > (SELECT COALESCE(\n | (SELECT cntLastModified\n | FROM Container\n | WHERE Container.containerUid = \n | (SELECT LatestDownloadedContainer.containerUid\n | FROM LatestDownloadedContainer)), 0)) \n | AS showUpdateButton,\n | \n | CAST(? AS INTEGER) = 1\n | AND (SELECT containerUid FROM LatestDownloadedContainer) != 0\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0 \n | AS showDeleteButton,\n | \n | (SELECT COUNT(*) \n | FROM ActiveContentJobItems \n | WHERE cjiPluginId = 10) > 0\n | AS showManageDownloadButton\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | WITH ContentEntryContainerUids AS \n | (SELECT Container.containerUid\n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND Container.fileSize > 0),\n | \n | \n | LatestDownloadedContainer(containerUid) AS\n | (SELECT COALESCE(\n | (SELECT containerUid\n | FROM Container\n | WHERE Container.containerContentEntryUid = ? \n | AND EXISTS(\n | SELECT 1\n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid)\n | ORDER BY cntLastModified DESC\n | LIMIT 1), 0))\n | ,\n | \n | \n | ActiveContentJobItems(cjiRecursiveStatus, cjiPluginId) AS\n | (SELECT cjiRecursiveStatus, cjiPluginId\n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | AND cjiStatus BETWEEN 4 AND 20)\n | ,\n | \n | ShowDownload(showDownload) AS \n | (SELECT CAST(? AS INTEGER) = 1\n | AND (SELECT containerUid FROM LatestDownloadedContainer) = 0\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0\n | AND (SELECT COUNT(*) FROM ContentEntryContainerUids) > 0)\n | \n | SELECT (SELECT showDownload FROM ShowDownload)\n | AS showDownloadButton,\n | \n | CAST(? AS INTEGER) = 0\n | OR (SELECT containerUid FROM LatestDownloadedContainer) != 0 \n | AS showOpenButton,\n | \n | (SELECT NOT showDownload FROM ShowDownload)\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0 \n | AND (SELECT COALESCE(\n | (SELECT cntLastModified\n | FROM Container\n | WHERE containerContentEntryUid = ?\n | AND fileSize > 0\n | ORDER BY cntLastModified DESC), 0)) \n | > (SELECT COALESCE(\n | (SELECT cntLastModified\n | FROM Container\n | WHERE Container.containerUid = \n | (SELECT LatestDownloadedContainer.containerUid\n | FROM LatestDownloadedContainer)), 0)) \n | AS showUpdateButton,\n | \n | CAST(? AS INTEGER) = 1\n | AND (SELECT containerUid FROM LatestDownloadedContainer) != 0\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0 \n | AS showDeleteButton,\n | \n | (SELECT COUNT(*) \n | FROM ActiveContentJobItems \n | WHERE cjiPluginId = 10) > 0\n | AS showManageDownloadButton\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(this.local$contentEntryUid, this.local$platformDownloadEnabled, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.buttonsToShowForContentEntry_2gd3um$ = function (contentEntryUid_0, platformDownloadEnabled_0, continuation_0, suspended) { var instance = new Coroutine$buttonsToShowForContentEntry_2gd3um$(this, contentEntryUid_0, platformDownloadEnabled_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda; Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$statusForDownloadDialog_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$statusForDownloadDialog_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$statusForDownloadDialog_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$statusForDownloadDialog_s8cxhz$.prototype.constructor = Coroutine$statusForDownloadDialog_s8cxhz$; Coroutine$statusForDownloadDialog_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.cjiRecursiveStatus AS status\n | FROM ContentJobItem\n | WHERE ContentJobItem.cjiContentEntryUid = ?\n | AND ContentJobItem.cjiPluginId != 14\n | AND ContentJobItem.cjiStatus BETWEEN 4 AND 25\n | AND NOT EXISTS(\n | SELECT 1\n | FROM ContentJobItem ContentJobItemInternal\n | WHERE ContentJobItemInternal.cjiContentEntryUid = ?\n | AND ContentJobItemInternal.cjiPluginId = 14\n | AND ContentJobItemInternal.cjiFinishTime > ContentJobItem.cjiStartTime)\n | ORDER BY ContentJobItem.cjiFinishTime DESC\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJobItem.cjiRecursiveStatus AS status\n | FROM ContentJobItem\n | WHERE ContentJobItem.cjiContentEntryUid = ?\n | AND ContentJobItem.cjiPluginId != 14\n | AND ContentJobItem.cjiStatus BETWEEN 4 AND 25\n | AND NOT EXISTS(\n | SELECT 1\n | FROM ContentJobItem ContentJobItemInternal\n | WHERE ContentJobItemInternal.cjiContentEntryUid = ?\n | AND ContentJobItemInternal.cjiPluginId = 14\n | AND ContentJobItemInternal.cjiFinishTime > ContentJobItem.cjiStartTime)\n | ORDER BY ContentJobItem.cjiFinishTime DESC\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.statusForDownloadDialog_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$statusForDownloadDialog_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$statusForContentEntryList$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_status = _resultSet.getInt_61zpoe$('status'); var tmp_progress = _resultSet.getLong_61zpoe$('progress'); var tmp_total = _resultSet.getLong_61zpoe$('total'); var _entity = new ContentJobItemProgressAndStatus(); _entity.status = tmp_status; _entity.progress = tmp_progress; _entity.total = tmp_total; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda; Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$statusForContentEntryList$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$statusForContentEntryList_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$statusForContentEntryList_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$statusForContentEntryList_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$statusForContentEntryList_s8cxhz$.prototype.constructor = Coroutine$statusForContentEntryList_s8cxhz$; Coroutine$statusForContentEntryList_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJobItemProgressAndStatus) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.cjiRecursiveStatus AS status, \n | ContentJobItem.cjiRecursiveProgress AS progress,\n | ContentJobItem.cjiRecursiveTotal AS total\n | FROM ContentJobItem\n | WHERE ContentJobItem.cjiContentEntryUid = ?\n | AND ContentJobItem.cjiPluginId != 14\n | AND ContentJobItem.cjiStatus BETWEEN 4 AND 25\n | AND NOT EXISTS(\n | SELECT 1\n | FROM ContentJobItem ContentJobItemInternal\n | WHERE ContentJobItemInternal.cjiContentEntryUid = ?\n | AND ContentJobItemInternal.cjiPluginId = 14\n | AND ContentJobItemInternal.cjiFinishTime > ContentJobItem.cjiStartTime)\n | ORDER BY ContentJobItem.cjiFinishTime DESC\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJobItem.cjiRecursiveStatus AS status, \n | ContentJobItem.cjiRecursiveProgress AS progress,\n | ContentJobItem.cjiRecursiveTotal AS total\n | FROM ContentJobItem\n | WHERE ContentJobItem.cjiContentEntryUid = ?\n | AND ContentJobItem.cjiPluginId != 14\n | AND ContentJobItem.cjiStatus BETWEEN 4 AND 25\n | AND NOT EXISTS(\n | SELECT 1\n | FROM ContentJobItem ContentJobItemInternal\n | WHERE ContentJobItemInternal.cjiContentEntryUid = ?\n | AND ContentJobItemInternal.cjiPluginId = 14\n | AND ContentJobItemInternal.cjiFinishTime > ContentJobItem.cjiStartTime)\n | ORDER BY ContentJobItem.cjiFinishTime DESC\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.statusForContentEntryList_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$statusForContentEntryList_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntry_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_50($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_50.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_50.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_50.prototype.constructor = Coroutine$insertAsync_50; Coroutine$insertAsync_50.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntry_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_50(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntry_.insertList_4ezy5m$(entityList); }; function ContentEntryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.title); _stmt.setString_vqvrqt$(2, _entity.description); _stmt.setString_vqvrqt$(3, _entity.entryId); _stmt.setString_vqvrqt$(4, _entity.author); _stmt.setString_vqvrqt$(5, _entity.publisher); _stmt.setInt_vux9f0$(6, _entity.licenseType); _stmt.setString_vqvrqt$(7, _entity.licenseName); _stmt.setString_vqvrqt$(8, _entity.licenseUrl); _stmt.setString_vqvrqt$(9, _entity.sourceUrl); _stmt.setString_vqvrqt$(10, _entity.thumbnailUrl); _stmt.setLong_6svq3l$(11, _entity.lastModified); _stmt.setLong_6svq3l$(12, _entity.primaryLanguageUid); _stmt.setLong_6svq3l$(13, _entity.languageVariantUid); _stmt.setInt_vux9f0$(14, _entity.contentFlags); _stmt.setBoolean_fzusl$(15, _entity.leaf); _stmt.setBoolean_fzusl$(16, _entity.publik); _stmt.setBoolean_fzusl$(17, _entity.ceInactive); _stmt.setInt_vux9f0$(18, _entity.completionCriteria); _stmt.setInt_vux9f0$(19, _entity.minScore); _stmt.setInt_vux9f0$(20, _entity.contentTypeFlag); _stmt.setLong_6svq3l$(21, _entity.contentOwner); _stmt.setLong_6svq3l$(22, _entity.contentEntryLocalChangeSeqNum); _stmt.setLong_6svq3l$(23, _entity.contentEntryMasterChangeSeqNum); _stmt.setInt_vux9f0$(24, _entity.contentEntryLastChangedBy); _stmt.setLong_6svq3l$(25, _entity.contentEntryLct); _stmt.setLong_6svq3l$(26, _entity.contentEntryUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntry SET title = ?, description = ?, entryId = ?, author = ?, publisher = ?, licenseType = ?, licenseName = ?, licenseUrl = ?, sourceUrl = ?, thumbnailUrl = ?, lastModified = ?, primaryLanguageUid = ?, languageVariantUid = ?, contentFlags = ?, leaf = ?, publik = ?, ceInactive = ?, completionCriteria = ?, minScore = ?, contentTypeFlag = ?, contentOwner = ?, contentEntryLocalChangeSeqNum = ?, contentEntryMasterChangeSeqNum = ?, contentEntryLastChangedBy = ?, contentEntryLct = ? WHERE contentEntryUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentEntry (contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING contentEntryUid'; } else tmp$ = ''; return "INSERT INTO ContentEntry (contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES(COALESCE(?,nextval('ContentEntry_contentEntryUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentEntryUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentEntryUid); } stmt.setString_vqvrqt$(2, entity.title); stmt.setString_vqvrqt$(3, entity.description); stmt.setString_vqvrqt$(4, entity.entryId); stmt.setString_vqvrqt$(5, entity.author); stmt.setString_vqvrqt$(6, entity.publisher); stmt.setInt_vux9f0$(7, entity.licenseType); stmt.setString_vqvrqt$(8, entity.licenseName); stmt.setString_vqvrqt$(9, entity.licenseUrl); stmt.setString_vqvrqt$(10, entity.sourceUrl); stmt.setString_vqvrqt$(11, entity.thumbnailUrl); stmt.setLong_6svq3l$(12, entity.lastModified); stmt.setLong_6svq3l$(13, entity.primaryLanguageUid); stmt.setLong_6svq3l$(14, entity.languageVariantUid); stmt.setInt_vux9f0$(15, entity.contentFlags); stmt.setBoolean_fzusl$(16, entity.leaf); stmt.setBoolean_fzusl$(17, entity.publik); stmt.setBoolean_fzusl$(18, entity.ceInactive); stmt.setInt_vux9f0$(19, entity.completionCriteria); stmt.setInt_vux9f0$(20, entity.minScore); stmt.setInt_vux9f0$(21, entity.contentTypeFlag); stmt.setLong_6svq3l$(22, entity.contentOwner); stmt.setLong_6svq3l$(23, entity.contentEntryLocalChangeSeqNum); stmt.setLong_6svq3l$(24, entity.contentEntryMasterChangeSeqNum); stmt.setInt_vux9f0$(25, entity.contentEntryLastChangedBy); stmt.setLong_6svq3l$(26, entity.contentEntryLct); }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO ContentEntry (contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING contentEntryUid'; } else tmp$ = ''; return "INSERT INTO ContentEntry (contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES(COALESCE(?,nextval('ContentEntry_contentEntryUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (contentEntryUid) DO UPDATE SET title = excluded.title,description = excluded.description,entryId = excluded.entryId,author = excluded.author,publisher = excluded.publisher,licenseType = excluded.licenseType,licenseName = excluded.licenseName,licenseUrl = excluded.licenseUrl,sourceUrl = excluded.sourceUrl,thumbnailUrl = excluded.thumbnailUrl,lastModified = excluded.lastModified,primaryLanguageUid = excluded.primaryLanguageUid,languageVariantUid = excluded.languageVariantUid,contentFlags = excluded.contentFlags,leaf = excluded.leaf,publik = excluded.publik,ceInactive = excluded.ceInactive,completionCriteria = excluded.completionCriteria,minScore = excluded.minScore,contentTypeFlag = excluded.contentTypeFlag,contentOwner = excluded.contentOwner,contentEntryLocalChangeSeqNum = excluded.contentEntryLocalChangeSeqNum,contentEntryMasterChangeSeqNum = excluded.contentEntryMasterChangeSeqNum,contentEntryLastChangedBy = excluded.contentEntryLastChangedBy,contentEntryLct = excluded.contentEntryLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentEntryUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentEntryUid); } stmt.setString_vqvrqt$(2, entity.title); stmt.setString_vqvrqt$(3, entity.description); stmt.setString_vqvrqt$(4, entity.entryId); stmt.setString_vqvrqt$(5, entity.author); stmt.setString_vqvrqt$(6, entity.publisher); stmt.setInt_vux9f0$(7, entity.licenseType); stmt.setString_vqvrqt$(8, entity.licenseName); stmt.setString_vqvrqt$(9, entity.licenseUrl); stmt.setString_vqvrqt$(10, entity.sourceUrl); stmt.setString_vqvrqt$(11, entity.thumbnailUrl); stmt.setLong_6svq3l$(12, entity.lastModified); stmt.setLong_6svq3l$(13, entity.primaryLanguageUid); stmt.setLong_6svq3l$(14, entity.languageVariantUid); stmt.setInt_vux9f0$(15, entity.contentFlags); stmt.setBoolean_fzusl$(16, entity.leaf); stmt.setBoolean_fzusl$(17, entity.publik); stmt.setBoolean_fzusl$(18, entity.ceInactive); stmt.setInt_vux9f0$(19, entity.completionCriteria); stmt.setInt_vux9f0$(20, entity.minScore); stmt.setInt_vux9f0$(21, entity.contentTypeFlag); stmt.setLong_6svq3l$(22, entity.contentOwner); stmt.setLong_6svq3l$(23, entity.contentEntryLocalChangeSeqNum); stmt.setLong_6svq3l$(24, entity.contentEntryMasterChangeSeqNum); stmt.setInt_vux9f0$(25, entity.contentEntryLastChangedBy); stmt.setLong_6svq3l$(26, entity.contentEntryLct); }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao_JdbcKt', interfaces: [ContentEntryDao]}; function ContentEntryDao_ReplicateWrapper(_db, _dao) { ContentEntryDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_48($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_48.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_48.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_48.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_48; Coroutine$replicateOnNewNode_s8cxhz$_48.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_48(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_45($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_45.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_45.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_45.prototype.constructor = Coroutine$replicateOnChange_45; Coroutine$replicateOnChange_45.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_45(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_0.prototype.constructor = Coroutine$insertListAsync_0; Coroutine$insertListAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.contentEntryUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(42, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.contentEntryUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.contentEntryLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithLanguageByEntryId = function (entryUuid, continuation) { return this._dao_0.findEntryWithLanguageByEntryId(entryUuid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithBlockAndLanguageByUidAsync = function (entityUid, continuation) { return this._dao_0.findEntryWithBlockAndLanguageByUidAsync(entityUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithContainerByEntryId_s8cxhz$ = function (entryUuid, continuation) { return this._dao_0.findEntryWithContainerByEntryId_s8cxhz$(entryUuid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithContainerByEntryIdLive_s8cxhz$ = function (entryUuid) { return this._dao_0.findEntryWithContainerByEntryIdLive_s8cxhz$(entryUuid); }; ContentEntryDao_ReplicateWrapper.prototype.findBySourceUrl = function (sourceUrl) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findTitleByUidAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findTitleByUidAsync_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByParentUid = function (parentUid) { return this._dao_0.getChildrenByParentUid(parentUid); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByParentAsync_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.getChildrenByParentAsync_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getContentJobItemParamsByParentUid_liip7b$ = function (parentUid, limit, offset, continuation) { return this._dao_0.getContentJobItemParamsByParentUid_liip7b$(parentUid, limit, offset, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getCountNumberOfChildrenByParentUUidAsync = function (parentUid, continuation) { return this._dao_0.getCountNumberOfChildrenByParentUUidAsync(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getContentByUuidAsync = function (parentUid, continuation) { return this._dao_0.getContentByUuidAsync(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findAllLanguageRelatedEntriesAsync = function (entryUuid, continuation) { return this._dao_0.findAllLanguageRelatedEntriesAsync(entryUuid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findListOfCategoriesAsync = function (parentUid, continuation) { return this._dao_0.findListOfCategoriesAsync(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findUniqueLanguagesInListAsync = function (parentUid, continuation) { return this._dao_0.findUniqueLanguagesInListAsync(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findUniqueLanguageWithParentUid = function (parentUid, continuation) { return this._dao_0.findUniqueLanguageWithParentUid(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (entryUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(entryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findByUidWithLanguageAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithLanguageAsync_s8cxhz$(uid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findByUid = function (entryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findByTitle = function (title) { return this._dao_0.findByTitle(title); }; ContentEntryDao_ReplicateWrapper.prototype.isMeteredAllowedForEntry_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.isMeteredAllowedForEntry_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findBySourceUrlWithContentEntryStatusAsync = function (sourceUrl, continuation) { return this._dao_0.findBySourceUrlWithContentEntryStatusAsync(sourceUrl, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByParentUidWithCategoryFilterOrderByNameAsc = function (parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder) { return this._dao_0.getChildrenByParentUidWithCategoryFilterOrderByNameAsc(parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder); }; ContentEntryDao_ReplicateWrapper.prototype.getContentFromMyCourses_s8cxhz$ = function (personUid) { return this._dao_0.getContentFromMyCourses_s8cxhz$(personUid); }; ContentEntryDao_ReplicateWrapper.prototype.getContentByOwner_s8cxhz$ = function (personUid) { return this._dao_0.getContentByOwner_s8cxhz$(personUid); }; ContentEntryDao_ReplicateWrapper.prototype.updateAsync_4pedz3$ = function (entity, continuation) { entity.contentEntryLct = systemTimeInMillis(); return this._dao_0.updateAsync_4pedz3$(entity, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByAll = function (parentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findLiveContentEntry = function (parentUid) { return this._dao_0.findLiveContentEntry(parentUid); }; ContentEntryDao_ReplicateWrapper.prototype.getContentEntryUidFromXapiObjectId = function (objectId) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findSimilarIdEntryForKhan = function (sourceUrl) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.getRecursiveDownloadTotals_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.getRecursiveDownloadTotals_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getAllEntriesRecursively_s8cxhz$ = function (contentEntryUid) { return this._dao_0.getAllEntriesRecursively_s8cxhz$(contentEntryUid); }; ContentEntryDao_ReplicateWrapper.prototype.getAllEntriesRecursivelyAsList_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.updateContentEntryInActive = function (contentEntryUid, ceInactive, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.updateContentEntryContentFlag = function (contentFlag, contentEntryUid, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.replaceList_o4zuk4$ = function (entries) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.getContentEntryFromUids_gox9k8$ = function (contentEntryUids, continuation) { return this._dao_0.getContentEntryFromUids_gox9k8$(contentEntryUids, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.insertWithReplace_4pedz3$ = function (entry) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findAllLive = function () { return this._dao_0.findAllLive(); }; ContentEntryDao_ReplicateWrapper.prototype.personHasPermissionWithContentEntry_b9bd0d$ = function (accountPersonUid, contentEntryUid, permission, continuation) { return this._dao_0.personHasPermissionWithContentEntry_b9bd0d$(accountPersonUid, contentEntryUid, permission, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.updateContentEntryActiveByContentJobUid_zaz62j$ = function (jobId, inactive, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityContentEntryItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.toggleVisibilityContentEntryItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_ReplicateWrapper.prototype.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize = function (continuation) { return this._dao_0.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize(continuation); }; ContentEntryDao_ReplicateWrapper.prototype.buttonsToShowForContentEntry_2gd3um$ = function (contentEntryUid, platformDownloadEnabled, continuation) { return this._dao_0.buttonsToShowForContentEntry_2gd3um$(contentEntryUid, platformDownloadEnabled, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.statusForDownloadDialog_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.statusForDownloadDialog_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.statusForContentEntryList_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.statusForContentEntryList_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_51($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_51.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_51.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_51.prototype.constructor = Coroutine$insertAsync_51; Coroutine$insertAsync_51.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contentEntryUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(42, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contentEntryUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contentEntryLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contentEntryUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_51(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao_ReplicateWrapper', interfaces: [ContentEntryDao]}; var receiveOrNull$lambda_0 = wrapFunction(function () { var throwCCE = Kotlin.throwCCE; var reflect = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect; var getKClass = Kotlin.getKClass; var typeInfoImpl = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect.typeInfoImpl_1lvkm8$; function Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$typeClosure$T = typeClosure$T_0; this.local$isT = isT_0; this.local$isT_0 = void 0; this.local$it = it_0; } Coroutine$receiveOrNull$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$receiveOrNull$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$receiveOrNull$lambda.prototype.constructor = Coroutine$receiveOrNull$lambda; Coroutine$receiveOrNull$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; if ((tmp$ = this.local$it.status) != null ? tmp$.equals(HttpStatusCode.Companion.NoContent) : null) { return null; } else { var T_0 = this.local$typeClosure$T; this.local$isT_0 = this.local$isT; var tmp$_1; var tmp$_2 = this.local$it.call; var typeInfo$result_0; typeInfo$break: do { try { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), getReifiedTypeParameterKType(this.local$typeClosure$T)); } catch (_) { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_2.receive_qi9ur9$(typeInfo$result_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } case 1: throw this.exception_0; case 2: this.result_0 = this.local$isT_0(tmp$_1 = this.result_0) ? tmp$_1 : throwCCE(); return this.result_0; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; return function (typeClosure$T_0, isT_0) { return function (it_0, continuation_0, suspended) { var instance = new Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; }; }); function getOrNull$lambda_0_0(closure$block) { return function ($receiver) { closure$block($receiver); return Unit; }; } function ContentEntryDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_49($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_49.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_49.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_49.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_49; Coroutine$replicateOnNewNode_s8cxhz$_49.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_49(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_46($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_46.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_46.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_46.prototype.constructor = Coroutine$replicateOnChange_46; Coroutine$replicateOnChange_46.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_46(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_1.prototype.constructor = Coroutine$insertListAsync_1; Coroutine$insertListAsync_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findEntryWithLanguageByEntryId_0($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUuid = entryUuid_0; } Coroutine$findEntryWithLanguageByEntryId_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithLanguageByEntryId_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithLanguageByEntryId_0.prototype.constructor = Coroutine$findEntryWithLanguageByEntryId_0; Coroutine$findEntryWithLanguageByEntryId_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEntryWithLanguageByEntryId(this.local$entryUuid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findEntryWithLanguageByEntryId = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithLanguageByEntryId_0(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findEntryWithBlockAndLanguageByUidAsync_0($this, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityUid = entityUid_0; } Coroutine$findEntryWithBlockAndLanguageByUidAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithBlockAndLanguageByUidAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithBlockAndLanguageByUidAsync_0.prototype.constructor = Coroutine$findEntryWithBlockAndLanguageByUidAsync_0; Coroutine$findEntryWithBlockAndLanguageByUidAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEntryWithBlockAndLanguageByUidAsync(this.local$entityUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findEntryWithBlockAndLanguageByUidAsync = function (entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithBlockAndLanguageByUidAsync_0(this, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUuid = entryUuid_0; } Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0.prototype.constructor = Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0; Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEntryWithContainerByEntryId_s8cxhz$(this.local$entryUuid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findEntryWithContainerByEntryId_s8cxhz$ = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithContainerByEntryId_s8cxhz$_0(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.findEntryWithContainerByEntryIdLive_s8cxhz$ = function (entryUuid) { var _result = this._dao.findEntryWithContainerByEntryIdLive_s8cxhz$(entryUuid); return _result; }; ContentEntryDao_Repo.prototype.findBySourceUrl = function (sourceUrl) { var _result = this._dao.findBySourceUrl(sourceUrl); return _result; }; function Coroutine$findTitleByUidAsync_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findTitleByUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findTitleByUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findTitleByUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findTitleByUidAsync_s8cxhz$_0; Coroutine$findTitleByUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findTitleByUidAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findTitleByUidAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findTitleByUidAsync_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getChildrenByParentUid = function (parentUid) { var _result = this._dao.getChildrenByParentUid(parentUid); return _result; }; function Coroutine$getChildrenByParentAsync_s8cxhz$_0($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$getChildrenByParentAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getChildrenByParentAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getChildrenByParentAsync_s8cxhz$_0.prototype.constructor = Coroutine$getChildrenByParentAsync_s8cxhz$_0; Coroutine$getChildrenByParentAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getChildrenByParentAsync_s8cxhz$(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getChildrenByParentAsync_s8cxhz$ = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getChildrenByParentAsync_s8cxhz$_0(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getContentJobItemParamsByParentUid_liip7b$_0($this, parentUid_0, limit_0, offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; this.local$limit = limit_0; this.local$offset = offset_0; } Coroutine$getContentJobItemParamsByParentUid_liip7b$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentJobItemParamsByParentUid_liip7b$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentJobItemParamsByParentUid_liip7b$_0.prototype.constructor = Coroutine$getContentJobItemParamsByParentUid_liip7b$_0; Coroutine$getContentJobItemParamsByParentUid_liip7b$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContentJobItemParamsByParentUid_liip7b$(this.local$parentUid, this.local$limit, this.local$offset, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getContentJobItemParamsByParentUid_liip7b$ = function (parentUid_0, limit_0, offset_0, continuation_0, suspended) { var instance = new Coroutine$getContentJobItemParamsByParentUid_liip7b$_0(this, parentUid_0, limit_0, offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getCountNumberOfChildrenByParentUUidAsync_0($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$getCountNumberOfChildrenByParentUUidAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getCountNumberOfChildrenByParentUUidAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getCountNumberOfChildrenByParentUUidAsync_0.prototype.constructor = Coroutine$getCountNumberOfChildrenByParentUUidAsync_0; Coroutine$getCountNumberOfChildrenByParentUUidAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getCountNumberOfChildrenByParentUUidAsync(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getCountNumberOfChildrenByParentUUidAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getCountNumberOfChildrenByParentUUidAsync_0(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getContentByUuidAsync_0($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$getContentByUuidAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentByUuidAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentByUuidAsync_0.prototype.constructor = Coroutine$getContentByUuidAsync_0; Coroutine$getContentByUuidAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContentByUuidAsync(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getContentByUuidAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getContentByUuidAsync_0(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllLanguageRelatedEntriesAsync_0($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUuid = entryUuid_0; } Coroutine$findAllLanguageRelatedEntriesAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllLanguageRelatedEntriesAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllLanguageRelatedEntriesAsync_0.prototype.constructor = Coroutine$findAllLanguageRelatedEntriesAsync_0; Coroutine$findAllLanguageRelatedEntriesAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllLanguageRelatedEntriesAsync(this.local$entryUuid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findAllLanguageRelatedEntriesAsync = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findAllLanguageRelatedEntriesAsync_0(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_Repo$findListOfCategoriesAsync$lambda$lambda(this$ContentEntryDao_Repo) { return function ($receiver, it) { takeFrom($receiver, this$ContentEntryDao_Repo._endpoint); $receiver.encodedPath = $receiver.encodedPath + 'ContentEntryDao/findListOfCategoriesAsync'; return Unit; }; } function ContentEntryDao_Repo$findListOfCategoriesAsync$lambda(this$ContentEntryDao_Repo, closure$parentUid) { return function ($receiver) { $receiver.url_6yzzjr$(ContentEntryDao_Repo$findListOfCategoriesAsync$lambda$lambda(this$ContentEntryDao_Repo)); doorNodeAndVersionHeaders($receiver, this$ContentEntryDao_Repo._repo); header($receiver, 'x-nid', this$ContentEntryDao_Repo._clientId); parameter($receiver, 'parentUid', closure$parentUid); return Unit; }; } function Coroutine$findListOfCategoriesAsync_0($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.$this = $this; this.local$response = void 0; this.local$parentUid = parentUid_0; } Coroutine$findListOfCategoriesAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findListOfCategoriesAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findListOfCategoriesAsync_0.prototype.constructor = Coroutine$findListOfCategoriesAsync_0; Coroutine$findListOfCategoriesAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var $receiver_0 = this.$this._httpClient; var host; var body; host = 'localhost'; body = utils_0.EmptyContent; var $receiver_1 = new HttpRequestBuilder_init_0(); url_0($receiver_1, 'http', host, 0, '/'); $receiver_1.method = HttpMethod_0.Companion.Get; $receiver_1.body = body; ContentEntryDao_Repo$findListOfCategoriesAsync$lambda(this.$this, this.local$parentUid)($receiver_1); var $this_0 = new HttpStatement_init($receiver_1, $receiver_0); var tmp$_4, tmp$_5, tmp$_6; tmp$_4 = getKClass(List); if (equals(tmp$_4, getKClass(HttpStatement_init))) { this.result_0 = Kotlin.isType(tmp$_5 = $this_0, List) ? tmp$_5 : throwCCE(); this.state_0 = 9; continue; } else { if (equals(tmp$_4, getKClass(HttpResponse_0))) { this.state_0 = 7; this.result_0 = $this_0.execute(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 1; this.result_0 = $this_0.executeUnsafe(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } } case 1: this.local$response = this.result_0; this.exceptionState_0 = 4; var tmp$_7; var tmp$_8 = this.local$response.call; var typeInfo$result_0; typeInfo$break: do { try { typeInfo$result_0 = typeInfoImpl_0(reflect_0.JsType, getKClass(List), createKType(getKClass(List), [createInvariantKTypeProjection(createKType(getKClass(DistinctCategorySchema), [], false))], false)); } catch (_) { typeInfo$result_0 = typeInfoImpl_0(reflect_0.JsType, getKClass(List), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_8.receive_qi9ur9$(typeInfo$result_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 2: this.result_0 = Kotlin.isType(tmp$_7 = this.result_0, List) ? tmp$_7 : throwCCE(); this.exceptionState_0 = 6; this.finallyPath_0 = [3]; this.state_0 = 5; continue; case 3: this.state_0 = 8; continue; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; complete_0(this.local$response); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; case 7: this.result_0 = Kotlin.isType(tmp$_6 = this.result_0, List) ? tmp$_6 : throwCCE(); this.state_0 = 8; continue; case 8: this.state_0 = 9; continue; case 9: this.result_0; return this.result_0; default:this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findListOfCategoriesAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findListOfCategoriesAsync_0(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findUniqueLanguagesInListAsync_0($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$findUniqueLanguagesInListAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUniqueLanguagesInListAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUniqueLanguagesInListAsync_0.prototype.constructor = Coroutine$findUniqueLanguagesInListAsync_0; Coroutine$findUniqueLanguagesInListAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findUniqueLanguagesInListAsync(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findUniqueLanguagesInListAsync = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findUniqueLanguagesInListAsync_0(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_Repo$findUniqueLanguageWithParentUid$lambda$lambda(this$ContentEntryDao_Repo) { return function ($receiver, it) { takeFrom($receiver, this$ContentEntryDao_Repo._endpoint); $receiver.encodedPath = $receiver.encodedPath + 'ContentEntryDao/findUniqueLanguageWithParentUid'; return Unit; }; } function ContentEntryDao_Repo$findUniqueLanguageWithParentUid$lambda(this$ContentEntryDao_Repo, closure$parentUid) { return function ($receiver) { $receiver.url_6yzzjr$(ContentEntryDao_Repo$findUniqueLanguageWithParentUid$lambda$lambda(this$ContentEntryDao_Repo)); doorNodeAndVersionHeaders($receiver, this$ContentEntryDao_Repo._repo); header($receiver, 'x-nid', this$ContentEntryDao_Repo._clientId); parameter($receiver, 'parentUid', closure$parentUid); return Unit; }; } function Coroutine$findUniqueLanguageWithParentUid_0($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.$this = $this; this.local$response = void 0; this.local$parentUid = parentUid_0; } Coroutine$findUniqueLanguageWithParentUid_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUniqueLanguageWithParentUid_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUniqueLanguageWithParentUid_0.prototype.constructor = Coroutine$findUniqueLanguageWithParentUid_0; Coroutine$findUniqueLanguageWithParentUid_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var $receiver_0 = this.$this._httpClient; var host; var body; host = 'localhost'; body = utils_0.EmptyContent; var $receiver_1 = new HttpRequestBuilder_init_0(); url_0($receiver_1, 'http', host, 0, '/'); $receiver_1.method = HttpMethod_0.Companion.Get; $receiver_1.body = body; ContentEntryDao_Repo$findUniqueLanguageWithParentUid$lambda(this.$this, this.local$parentUid)($receiver_1); var $this_0 = new HttpStatement_init($receiver_1, $receiver_0); var tmp$_4, tmp$_5, tmp$_6; tmp$_4 = getKClass(List); if (equals(tmp$_4, getKClass(HttpStatement_init))) { this.result_0 = Kotlin.isType(tmp$_5 = $this_0, List) ? tmp$_5 : throwCCE(); this.state_0 = 9; continue; } else { if (equals(tmp$_4, getKClass(HttpResponse_0))) { this.state_0 = 7; this.result_0 = $this_0.execute(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 1; this.result_0 = $this_0.executeUnsafe(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } } case 1: this.local$response = this.result_0; this.exceptionState_0 = 4; var tmp$_7; var tmp$_8 = this.local$response.call; var typeInfo$result_0; typeInfo$break: do { try { typeInfo$result_0 = typeInfoImpl_0(reflect_0.JsType, getKClass(List), createKType(getKClass(List), [createInvariantKTypeProjection(createKType(getKClass(LangUidAndName), [], false))], false)); } catch (_) { typeInfo$result_0 = typeInfoImpl_0(reflect_0.JsType, getKClass(List), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_8.receive_qi9ur9$(typeInfo$result_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 2: this.result_0 = Kotlin.isType(tmp$_7 = this.result_0, List) ? tmp$_7 : throwCCE(); this.exceptionState_0 = 6; this.finallyPath_0 = [3]; this.state_0 = 5; continue; case 3: this.state_0 = 8; continue; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; complete_0(this.local$response); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; case 7: this.result_0 = Kotlin.isType(tmp$_6 = this.result_0, List) ? tmp$_6 : throwCCE(); this.state_0 = 8; continue; case 8: this.state_0 = 9; continue; case 9: this.result_0; return this.result_0; default:this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findUniqueLanguageWithParentUid = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findUniqueLanguageWithParentUid_0(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$findByUidAsync_s8cxhz$_10($this, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUid = entryUid_0; } Coroutine$findByUidAsync_s8cxhz$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_10.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_10; Coroutine$findByUidAsync_s8cxhz$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$entryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_10(this, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithLanguageAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithLanguageAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithLanguageAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithLanguageAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidWithLanguageAsync_s8cxhz$_0; Coroutine$findByUidWithLanguageAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithLanguageAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findByUidWithLanguageAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithLanguageAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.findByUid = function (entryUid) { var _result = this._dao.findByUid(entryUid); return _result; }; ContentEntryDao_Repo.prototype.findByTitle = function (title) { var _result = this._dao.findByTitle(title); return _result; }; function Coroutine$isMeteredAllowedForEntry_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$isMeteredAllowedForEntry_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isMeteredAllowedForEntry_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isMeteredAllowedForEntry_s8cxhz$_0.prototype.constructor = Coroutine$isMeteredAllowedForEntry_s8cxhz$_0; Coroutine$isMeteredAllowedForEntry_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.isMeteredAllowedForEntry_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.isMeteredAllowedForEntry_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$isMeteredAllowedForEntry_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findBySourceUrlWithContentEntryStatusAsync_0($this, sourceUrl_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sourceUrl = sourceUrl_0; } Coroutine$findBySourceUrlWithContentEntryStatusAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySourceUrlWithContentEntryStatusAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySourceUrlWithContentEntryStatusAsync_0.prototype.constructor = Coroutine$findBySourceUrlWithContentEntryStatusAsync_0; Coroutine$findBySourceUrlWithContentEntryStatusAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findBySourceUrlWithContentEntryStatusAsync(this.local$sourceUrl, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findBySourceUrlWithContentEntryStatusAsync = function (sourceUrl_0, continuation_0, suspended) { var instance = new Coroutine$findBySourceUrlWithContentEntryStatusAsync_0(this, sourceUrl_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getChildrenByParentUidWithCategoryFilterOrderByNameAsc = function (parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder) { var _result = this._dao.getChildrenByParentUidWithCategoryFilterOrderByNameAsc(parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder); return _result; }; ContentEntryDao_Repo.prototype.getContentFromMyCourses_s8cxhz$ = function (personUid) { var _result = this._dao.getContentFromMyCourses_s8cxhz$(personUid); return _result; }; ContentEntryDao_Repo.prototype.getContentByOwner_s8cxhz$ = function (personUid) { var _result = this._dao.getContentByOwner_s8cxhz$(personUid); return _result; }; function Coroutine$updateAsync_4pedz3$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_4pedz3$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_4pedz3$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_4pedz3$_0.prototype.constructor = Coroutine$updateAsync_4pedz3$_0; Coroutine$updateAsync_4pedz3$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_4pedz3$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.updateAsync_4pedz3$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_4pedz3$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getChildrenByAll = function (parentUid) { var _result = this._dao.getChildrenByAll(parentUid); return _result; }; ContentEntryDao_Repo.prototype.findLiveContentEntry = function (parentUid) { var _result = this._dao.findLiveContentEntry(parentUid); return _result; }; ContentEntryDao_Repo.prototype.getContentEntryUidFromXapiObjectId = function (objectId) { var _result = this._dao.getContentEntryUidFromXapiObjectId(objectId); return _result; }; ContentEntryDao_Repo.prototype.findSimilarIdEntryForKhan = function (sourceUrl) { var _result = this._dao.findSimilarIdEntryForKhan(sourceUrl); return _result; }; function ContentEntryDao_Repo$getRecursiveDownloadTotals$lambda$lambda(this$ContentEntryDao_Repo) { return function ($receiver, it) { takeFrom($receiver, this$ContentEntryDao_Repo._endpoint); $receiver.encodedPath = $receiver.encodedPath + 'ContentEntryDao/getRecursiveDownloadTotals'; return Unit; }; } function ContentEntryDao_Repo$getRecursiveDownloadTotals$lambda(this$ContentEntryDao_Repo, closure$contentEntryUid) { return function ($receiver) { $receiver.url_6yzzjr$(ContentEntryDao_Repo$getRecursiveDownloadTotals$lambda$lambda(this$ContentEntryDao_Repo)); doorNodeAndVersionHeaders($receiver, this$ContentEntryDao_Repo._repo); header($receiver, 'x-nid', this$ContentEntryDao_Repo._clientId); parameter($receiver, 'contentEntryUid', closure$contentEntryUid); return Unit; }; } function Coroutine$getRecursiveDownloadTotals_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.$this = $this; this.local$response = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getRecursiveDownloadTotals_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getRecursiveDownloadTotals_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getRecursiveDownloadTotals_s8cxhz$_0.prototype.constructor = Coroutine$getRecursiveDownloadTotals_s8cxhz$_0; Coroutine$getRecursiveDownloadTotals_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var $receiver = this.$this._httpClient; var host_0; var body_0; host_0 = 'localhost'; body_0 = utils.EmptyContent; var $receiver_1_0 = new HttpRequestBuilder_init(); url($receiver_1_0, 'http', host_0, 0, '/'); $receiver_1_0.method = HttpMethod.Companion.Get; $receiver_1_0.body = body_0; getOrNull$lambda_0_0(ContentEntryDao_Repo$getRecursiveDownloadTotals$lambda(this.$this, this.local$contentEntryUid))($receiver_1_0); var $this_0_0 = new HttpStatement($receiver_1_0, $receiver); var tmp$_4_0, tmp$_5_0, tmp$_6_0; tmp$_4_0 = getKClass(HttpStatement); if (equals(tmp$_4_0, getKClass(HttpStatement))) { this.result_0 = Kotlin.isType(tmp$_5_0 = $this_0_0, HttpStatement) ? tmp$_5_0 : throwCCE(); this.state_0 = 9; continue; } else { if (equals(tmp$_4_0, getKClass(HttpResponse))) { this.state_0 = 7; this.result_0 = $this_0_0.execute(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 1; this.result_0 = $this_0_0.executeUnsafe(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } } case 1: this.local$response = this.result_0; this.exceptionState_0 = 4; var tmp$_7_0; var tmp$_8_0 = this.local$response.call; var typeInfo$result_0_0; typeInfo$break: do { try { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), createKType(getKClass(HttpStatement), [], false)); } catch (_) { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_8_0.receive_qi9ur9$(typeInfo$result_0_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 2: this.result_0 = Kotlin.isType(tmp$_7_0 = this.result_0, HttpStatement) ? tmp$_7_0 : throwCCE(); this.exceptionState_0 = 6; this.finallyPath_0 = [3]; this.state_0 = 5; continue; case 3: this.state_0 = 8; continue; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; complete(this.local$response); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; case 7: this.result_0 = Kotlin.isType(tmp$_6_0 = this.result_0, HttpStatement) ? tmp$_6_0 : throwCCE(); this.state_0 = 8; continue; case 8: this.state_0 = 9; continue; case 9: this.result_0; var httpStatement_0 = this.result_0; this.state_0 = 10; this.result_0 = httpStatement_0.execute_2rh6on$(receiveOrNull$lambda_0(DownloadJobSizeInfo, Kotlin.orNull(Kotlin.isInstanceOf(DownloadJobSizeInfo))), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 10: this.result_0; return this.result_0; default:this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getRecursiveDownloadTotals_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getRecursiveDownloadTotals_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getAllEntriesRecursively_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.getAllEntriesRecursively_s8cxhz$(contentEntryUid); return _result; }; ContentEntryDao_Repo.prototype.getAllEntriesRecursivelyAsList_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.getAllEntriesRecursivelyAsList_s8cxhz$(contentEntryUid); return _result; }; ContentEntryDao_Repo.prototype.updateContentEntryInActive = function (contentEntryUid, ceInactive, changedTime) { this._dao.updateContentEntryInActive(contentEntryUid, ceInactive, changedTime); }; ContentEntryDao_Repo.prototype.updateContentEntryContentFlag = function (contentFlag, contentEntryUid, changedTime) { this._dao.updateContentEntryContentFlag(contentFlag, contentEntryUid, changedTime); }; ContentEntryDao_Repo.prototype.replaceList_o4zuk4$ = function (entries) { this._dao.replaceList_o4zuk4$(entries); }; function Coroutine$getContentEntryFromUids_gox9k8$_0($this, contentEntryUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUids = contentEntryUids_0; } Coroutine$getContentEntryFromUids_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentEntryFromUids_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentEntryFromUids_gox9k8$_0.prototype.constructor = Coroutine$getContentEntryFromUids_gox9k8$_0; Coroutine$getContentEntryFromUids_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContentEntryFromUids_gox9k8$(this.local$contentEntryUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getContentEntryFromUids_gox9k8$ = function (contentEntryUids_0, continuation_0, suspended) { var instance = new Coroutine$getContentEntryFromUids_gox9k8$_0(this, contentEntryUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.insertWithReplace_4pedz3$ = function (entry) { this._dao.insertWithReplace_4pedz3$(entry); }; ContentEntryDao_Repo.prototype.findAllLive = function () { var _result = this._dao.findAllLive(); return _result; }; function Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0($this, accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$contentEntryUid = contentEntryUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0.prototype.constructor = Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0; Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionWithContentEntry_b9bd0d$(this.local$accountPersonUid, this.local$contentEntryUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.personHasPermissionWithContentEntry_b9bd0d$ = function (accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithContentEntry_b9bd0d$_0(this, accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.updateContentEntryActiveByContentJobUid_zaz62j$ = function (jobId, inactive, changedTime) { this._dao.updateContentEntryActiveByContentJobUid_zaz62j$(jobId, inactive, changedTime); }; function Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityContentEntryItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.toggleVisibilityContentEntryItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0.prototype.constructor = Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0; Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize = function (continuation_0, suspended) { var instance = new Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$buttonsToShowForContentEntry_2gd3um$_0($this, contentEntryUid_0, platformDownloadEnabled_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$platformDownloadEnabled = platformDownloadEnabled_0; } Coroutine$buttonsToShowForContentEntry_2gd3um$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$buttonsToShowForContentEntry_2gd3um$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$buttonsToShowForContentEntry_2gd3um$_0.prototype.constructor = Coroutine$buttonsToShowForContentEntry_2gd3um$_0; Coroutine$buttonsToShowForContentEntry_2gd3um$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.buttonsToShowForContentEntry_2gd3um$(this.local$contentEntryUid, this.local$platformDownloadEnabled, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.buttonsToShowForContentEntry_2gd3um$ = function (contentEntryUid_0, platformDownloadEnabled_0, continuation_0, suspended) { var instance = new Coroutine$buttonsToShowForContentEntry_2gd3um$_0(this, contentEntryUid_0, platformDownloadEnabled_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$statusForDownloadDialog_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$statusForDownloadDialog_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$statusForDownloadDialog_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$statusForDownloadDialog_s8cxhz$_0.prototype.constructor = Coroutine$statusForDownloadDialog_s8cxhz$_0; Coroutine$statusForDownloadDialog_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.statusForDownloadDialog_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.statusForDownloadDialog_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$statusForDownloadDialog_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$statusForContentEntryList_s8cxhz$_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$statusForContentEntryList_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$statusForContentEntryList_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$statusForContentEntryList_s8cxhz$_0.prototype.constructor = Coroutine$statusForContentEntryList_s8cxhz$_0; Coroutine$statusForContentEntryList_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.statusForContentEntryList_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.statusForContentEntryList_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$statusForContentEntryList_s8cxhz$_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_52($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_52.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_52.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_52.prototype.constructor = Coroutine$insertAsync_52; Coroutine$insertAsync_52.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_52(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao_Repo', interfaces: [ContentEntryDao]}; function ContentEntryParentChildJoinDao_JdbcKt(_db) { ContentEntryParentChildJoinDao.call(this); this._db = _db; this._insertAdapterContentEntryParentChildJoin_ = new ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral(this._db); this._insertAdapterContentEntryParentChildJoin_upsert = new ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral(this._db); } function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_50($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_50.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_50.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_50.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_50; Coroutine$replicateOnNewNode_s8cxhz$_50.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | ? AS cepcjDestination\n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = ?), -1) \n | /*psql ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | ? AS cepcjDestination\n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = ?), -1) \n | ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_50(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_47($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_47.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_47.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_47.prototype.constructor = Coroutine$replicateOnChange_47; Coroutine$replicateOnChange_47.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | UserSession.usClientNodeId AS cepcjDestination\n | FROM ChangeLog\n | JOIN ContentEntryParentChildJoin\n | ON ChangeLog.chTableId = 7\n | AND ChangeLog.chEntityPk = ContentEntryParentChildJoin.cepcjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | UserSession.usClientNodeId AS cepcjDestination\n | FROM ChangeLog\n | JOIN ContentEntryParentChildJoin\n | ON ChangeLog.chTableId = 7\n | AND ChangeLog.chEntityPk = ContentEntryParentChildJoin.cepcjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_47(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_2($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_2.prototype.constructor = Coroutine$insertListAsync_2; Coroutine$insertListAsync_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryParentChildJoin_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_2(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); var _entity = new ContentEntryParentChildJoin(); _entity.cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; _entity.cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; _entity.childIndex = tmp_childIndex; _entity.cepcjUid = tmp_cepcjUid; _entity.cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; _entity.cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; _entity.cepcjLastChangedBy = tmp_cepcjLastChangedBy; _entity.cepcjLct = tmp_cepcjLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.publicContentEntryParentChildJoins = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntryParentChildJoin.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntry parentEntry ON ContentEntryParentChildJoin.cepcjParentContentEntryUid = parentEntry.contentEntryUid LEFT JOIN ContentEntry childEntry ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = childEntry.contentEntryUid WHERE parentEntry.publik AND childEntry.publik', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntryParentChildJoin.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntry parentEntry ON ContentEntryParentChildJoin.cepcjParentContentEntryUid = parentEntry.contentEntryUid LEFT JOIN ContentEntry childEntry ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = childEntry.contentEntryUid WHERE parentEntry.publik AND childEntry.publik\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda(_result)); return _result.v; }; function ContentEntryParentChildJoinDao_JdbcKt$all$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); var _entity = new ContentEntryParentChildJoin(); _entity.cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; _entity.cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; _entity.childIndex = tmp_childIndex; _entity.cepcjUid = tmp_cepcjUid; _entity.cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; _entity.cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; _entity.cepcjLastChangedBy = tmp_cepcjLastChangedBy; _entity.cepcjLct = tmp_cepcjLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryParentChildJoinDao_JdbcKt$all$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$all$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.all = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntryParentChildJoin\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$all$lambda(_result)); return _result.v; }; function ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); var _entity = new ContentEntryParentChildJoin(); _entity.cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; _entity.cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; _entity.childIndex = tmp_childIndex; _entity.cepcjUid = tmp_cepcjUid; _entity.cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; _entity.cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; _entity.cepcjLastChangedBy = tmp_cepcjLastChangedBy; _entity.cepcjLct = tmp_cepcjLct; closure$_result.v = _entity; }return Unit; }; } function ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda(closure$childEntryContentUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$childEntryContentUid); useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findParentByChildUuids_s8cxhz$ = function (childEntryContentUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryParentChildJoin) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda(childEntryContentUid, _result)); return _result.v; }; function ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); var _entity = new ContentEntryParentChildJoin(); _entity.cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; _entity.cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; _entity.childIndex = tmp_childIndex; _entity.cepcjUid = tmp_cepcjUid; _entity.cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; _entity.cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; _entity.cepcjLastChangedBy = tmp_cepcjLastChangedBy; _entity.cepcjLct = tmp_cepcjLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda(closure$childEntryContentUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$childEntryContentUid); useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findListOfParentsByChildUuid_s8cxhz$ = function (childEntryContentUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda(childEntryContentUid, _result)); return _result.v; }; function ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); var _entity = new ContentEntryParentChildJoin(); _entity.cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; _entity.cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; _entity.childIndex = tmp_childIndex; _entity.cepcjUid = tmp_cepcjUid; _entity.cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; _entity.cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; _entity.cepcjLastChangedBy = tmp_cepcjLastChangedBy; _entity.cepcjLct = tmp_cepcjLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda(closure$parentUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$parentUid); useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findListOfChildsByParentUuid_s8cxhz$ = function (parentUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda(parentUid, _result)); return _result.v; }; function ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); var _entity = new ContentEntryParentChildJoin(); _entity.cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; _entity.cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; _entity.childIndex = tmp_childIndex; _entity.cepcjUid = tmp_cepcjUid; _entity.cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; _entity.cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; _entity.cepcjLastChangedBy = tmp_cepcjLastChangedBy; _entity.cepcjLct = tmp_cepcjLct; closure$_result.v = _entity; }return Unit; }; } function ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(closure$parentUid, closure$childUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$parentUid); _stmt.setLong_6svq3l$(2, closure$childUid); useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findJoinByParentChildUuids_3pjtqy$ = function (parentUid, childUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryParentChildJoin) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ? AND cepcjChildContentEntryUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ? AND cepcjChildContentEntryUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(parentUid, childUid, _result)); return _result.v; }; function ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); var tmp_title = _resultSet.getString_61zpoe$('title'); var tmp_description = _resultSet.getString_61zpoe$('description'); var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); var tmp_author = _resultSet.getString_61zpoe$('author'); var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); var _entity = new ContentEntry(); _entity.contentEntryUid = tmp_contentEntryUid; _entity.title = tmp_title; _entity.description = tmp_description; _entity.entryId = tmp_entryId; _entity.author = tmp_author; _entity.publisher = tmp_publisher; _entity.licenseType = tmp_licenseType; _entity.licenseName = tmp_licenseName; _entity.licenseUrl = tmp_licenseUrl; _entity.sourceUrl = tmp_sourceUrl; _entity.thumbnailUrl = tmp_thumbnailUrl; _entity.lastModified = tmp_lastModified; _entity.primaryLanguageUid = tmp_primaryLanguageUid; _entity.languageVariantUid = tmp_languageVariantUid; _entity.contentFlags = tmp_contentFlags; _entity.leaf = tmp_leaf; _entity.publik = tmp_publik; _entity.ceInactive = tmp_ceInactive; _entity.completionCriteria = tmp_completionCriteria; _entity.minScore = tmp_minScore; _entity.contentTypeFlag = tmp_contentTypeFlag; _entity.contentOwner = tmp_contentOwner; _entity.contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; _entity.contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; _entity.contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; _entity.contentEntryLct = tmp_contentEntryLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$selectTopEntries($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$selectTopEntries.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$selectTopEntries.prototype = Object.create(CoroutineImpl.prototype); Coroutine$selectTopEntries.prototype.constructor = Coroutine$selectTopEntries; Coroutine$selectTopEntries.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry WHERE NOT EXISTS(SELECT cepcjUid FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ContentEntry.contentEntryUid) AND EXISTS(SELECT cepcjUid FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ContentEntry.contentEntryUid)', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntry.* FROM ContentEntry WHERE NOT EXISTS(SELECT cepcjUid FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ContentEntry.contentEntryUid) AND EXISTS(SELECT cepcjUid FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ContentEntry.contentEntryUid)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.selectTopEntries = function (continuation_0, suspended) { var instance = new Coroutine$selectTopEntries(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.replaceList_crmpdg$ = function (entries) { this._insertAdapterContentEntryParentChildJoin_upsert.insertList_4ezy5m$(entries); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertWithReplace_iynbz7$ = function (parentChildJoinDao) { this._insertAdapterContentEntryParentChildJoin_upsert.insert_11rb$(parentChildJoinDao); }; function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(closure$contentEntryUid_0, closure$updateTime_0, this$ContentEntryParentChildJoinDao_JdbcKt_0, closure$selectedItems_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$updateTime = closure$updateTime_0; this.local$this$ContentEntryParentChildJoinDao_JdbcKt = this$ContentEntryParentChildJoinDao_JdbcKt_0; this.local$closure$selectedItems = closure$selectedItems_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setArray_wqp8hw$(3, this.local$this$ContentEntryParentChildJoinDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItems))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(closure$contentEntryUid_0, closure$updateTime_0, this$ContentEntryParentChildJoinDao_JdbcKt_0, closure$selectedItems_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(closure$contentEntryUid_0, closure$updateTime_0, this$ContentEntryParentChildJoinDao_JdbcKt_0, closure$selectedItems_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$moveListOfEntriesToNewParent_8jtwwy$($this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$selectedItems = selectedItems_0; this.local$updateTime = updateTime_0; } Coroutine$moveListOfEntriesToNewParent_8jtwwy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveListOfEntriesToNewParent_8jtwwy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveListOfEntriesToNewParent_8jtwwy$.prototype.constructor = Coroutine$moveListOfEntriesToNewParent_8jtwwy$; Coroutine$moveListOfEntriesToNewParent_8jtwwy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntryParentChildJoin \n | SET cepcjParentContentEntryUid = ?, \n | cepcjLct = ? \n | WHERE cepcjUid IN (?)\n | \n '), true, void 0, void 0, trimMargin('\n |\n | UPDATE ContentEntryParentChildJoin \n | SET cepcjParentContentEntryUid = ?, \n | cepcjLct = ? \n | WHERE cepcjUid IN (?)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(this.local$contentEntryUid, this.local$updateTime, this.$this, this.local$selectedItems), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.moveListOfEntriesToNewParent_8jtwwy$ = function (contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$moveListOfEntriesToNewParent_8jtwwy$(this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryParentChildJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_53($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_53.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_53.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_53.prototype.constructor = Coroutine$insertAsync_53; Coroutine$insertAsync_53.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryParentChildJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_53(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryParentChildJoin_.insertList_4ezy5m$(entityList); }; function ContentEntryParentChildJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cepcjParentContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.cepcjChildContentEntryUid); _stmt.setInt_vux9f0$(3, _entity.childIndex); _stmt.setLong_6svq3l$(4, _entity.cepcjLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.cepcjMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.cepcjLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.cepcjLct); _stmt.setLong_6svq3l$(8, _entity.cepcjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryParentChildJoin SET cepcjParentContentEntryUid = ?, cepcjChildContentEntryUid = ?, childIndex = ?, cepcjLocalChangeSeqNum = ?, cepcjMasterChangeSeqNum = ?, cepcjLastChangedBy = ?, cepcjLct = ? WHERE cepcjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryParentChildJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryParentChildJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cepcjParentContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.cepcjChildContentEntryUid); _stmt.setInt_vux9f0$(3, closure$entity.childIndex); _stmt.setLong_6svq3l$(4, closure$entity.cepcjLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.cepcjMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.cepcjLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.cepcjLct); _stmt.setLong_6svq3l$(8, closure$entity.cepcjUid); return _stmt.executeUpdate(); }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryParentChildJoin SET cepcjParentContentEntryUid = ?, cepcjChildContentEntryUid = ?, childIndex = ?, cepcjLocalChangeSeqNum = ?, cepcjMasterChangeSeqNum = ?, cepcjLastChangedBy = ?, cepcjLct = ? WHERE cepcjUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryParentChildJoinDao_JdbcKt$update$lambda(entity)); }; function ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentEntryParentChildJoin (cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cepcjUid'; } else tmp$ = ''; return "INSERT INTO ContentEntryParentChildJoin (cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES(?, ?, ?, COALESCE(?,nextval('ContentEntryParentChildJoin_cepcjUid_seq')), ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.cepcjParentContentEntryUid); stmt.setLong_6svq3l$(2, entity.cepcjChildContentEntryUid); stmt.setInt_vux9f0$(3, entity.childIndex); if (equals(entity.cepcjUid, L0)) { stmt.setObject_6t2rgq$(4, null); } else { stmt.setLong_6svq3l$(4, entity.cepcjUid); } stmt.setLong_6svq3l$(5, entity.cepcjLocalChangeSeqNum); stmt.setLong_6svq3l$(6, entity.cepcjMasterChangeSeqNum); stmt.setInt_vux9f0$(7, entity.cepcjLastChangedBy); stmt.setLong_6svq3l$(8, entity.cepcjLct); }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO ContentEntryParentChildJoin (cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cepcjUid'; } else tmp$ = ''; return "INSERT INTO ContentEntryParentChildJoin (cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES(?, ?, ?, COALESCE(?,nextval('ContentEntryParentChildJoin_cepcjUid_seq')), ?, ?, ?, ?) ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = excluded.cepcjParentContentEntryUid,cepcjChildContentEntryUid = excluded.cepcjChildContentEntryUid,childIndex = excluded.childIndex,cepcjLocalChangeSeqNum = excluded.cepcjLocalChangeSeqNum,cepcjMasterChangeSeqNum = excluded.cepcjMasterChangeSeqNum,cepcjLastChangedBy = excluded.cepcjLastChangedBy,cepcjLct = excluded.cepcjLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.cepcjParentContentEntryUid); stmt.setLong_6svq3l$(2, entity.cepcjChildContentEntryUid); stmt.setInt_vux9f0$(3, entity.childIndex); if (equals(entity.cepcjUid, L0)) { stmt.setObject_6t2rgq$(4, null); } else { stmt.setLong_6svq3l$(4, entity.cepcjUid); } stmt.setLong_6svq3l$(5, entity.cepcjLocalChangeSeqNum); stmt.setLong_6svq3l$(6, entity.cepcjMasterChangeSeqNum); stmt.setInt_vux9f0$(7, entity.cepcjLastChangedBy); stmt.setLong_6svq3l$(8, entity.cepcjLct); }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryParentChildJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao_JdbcKt', interfaces: [ContentEntryParentChildJoinDao]}; function ContentEntryParentChildJoinDao_ReplicateWrapper(_db, _dao) { ContentEntryParentChildJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_51($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_51.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_51.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_51.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_51; Coroutine$replicateOnNewNode_s8cxhz$_51.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_51(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_48($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_48.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_48.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_48.prototype.constructor = Coroutine$replicateOnChange_48; Coroutine$replicateOnChange_48.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_48(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_3($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3.prototype.constructor = Coroutine$insertListAsync_3; Coroutine$insertListAsync_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cepcjUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(7, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cepcjUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cepcjLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.publicContentEntryParentChildJoins = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.all = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findParentByChildUuids_s8cxhz$ = function (childEntryContentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findListOfParentsByChildUuid_s8cxhz$ = function (childEntryContentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findListOfChildsByParentUuid_s8cxhz$ = function (parentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findJoinByParentChildUuids_3pjtqy$ = function (parentUid, childUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.selectTopEntries = function (continuation) { return this._dao_0.selectTopEntries(continuation); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.replaceList_crmpdg$ = function (entries) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertWithReplace_iynbz7$ = function (parentChildJoinDao) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0($this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$selectedItems = selectedItems_0; this.local$updateTime = updateTime_0; } Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.prototype.constructor = Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.moveListOfEntriesToNewParent_8jtwwy$(this.local$contentEntryUid, this.local$selectedItems, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.moveListOfEntriesToNewParent_8jtwwy$ = function (contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0(this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_54($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_54.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_54.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_54.prototype.constructor = Coroutine$insertAsync_54; Coroutine$insertAsync_54.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cepcjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(7, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cepcjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cepcjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cepcjUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_54(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao_ReplicateWrapper', interfaces: [ContentEntryParentChildJoinDao]}; function ContentEntryParentChildJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryParentChildJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_52($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_52.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_52.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_52.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_52; Coroutine$replicateOnNewNode_s8cxhz$_52.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_52(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_49($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_49.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_49.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_49.prototype.constructor = Coroutine$replicateOnChange_49; Coroutine$replicateOnChange_49.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_49(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4.prototype.constructor = Coroutine$insertListAsync_4; Coroutine$insertListAsync_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.publicContentEntryParentChildJoins = function () { var _result = this._dao.publicContentEntryParentChildJoins(); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.all = function () { var _result = this._dao.all(); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findParentByChildUuids_s8cxhz$ = function (childEntryContentUid) { var _result = this._dao.findParentByChildUuids_s8cxhz$(childEntryContentUid); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findListOfParentsByChildUuid_s8cxhz$ = function (childEntryContentUid) { var _result = this._dao.findListOfParentsByChildUuid_s8cxhz$(childEntryContentUid); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findListOfChildsByParentUuid_s8cxhz$ = function (parentUid) { var _result = this._dao.findListOfChildsByParentUuid_s8cxhz$(parentUid); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findJoinByParentChildUuids_3pjtqy$ = function (parentUid, childUid) { var _result = this._dao.findJoinByParentChildUuids_3pjtqy$(parentUid, childUid); return _result; }; function Coroutine$selectTopEntries_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$selectTopEntries_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$selectTopEntries_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$selectTopEntries_0.prototype.constructor = Coroutine$selectTopEntries_0; Coroutine$selectTopEntries_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.selectTopEntries(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.selectTopEntries = function (continuation_0, suspended) { var instance = new Coroutine$selectTopEntries_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.replaceList_crmpdg$ = function (entries) { this._dao.replaceList_crmpdg$(entries); }; ContentEntryParentChildJoinDao_Repo.prototype.insertWithReplace_iynbz7$ = function (parentChildJoinDao) { this._dao.insertWithReplace_iynbz7$(parentChildJoinDao); }; function Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1($this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$selectedItems = selectedItems_0; this.local$updateTime = updateTime_0; } Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.prototype.constructor = Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.moveListOfEntriesToNewParent_8jtwwy$(this.local$contentEntryUid, this.local$selectedItems, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.moveListOfEntriesToNewParent_8jtwwy$ = function (contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1(this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_55($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_55.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_55.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_55.prototype.constructor = Coroutine$insertAsync_55; Coroutine$insertAsync_55.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_55(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryParentChildJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryParentChildJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryParentChildJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao_Repo', interfaces: [ContentEntryParentChildJoinDao]}; function ContentEntryPictureDao_JdbcKt(_db) { ContentEntryPictureDao.call(this); this._db = _db; this._insertAdapterContentEntryPicture_ = new ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral(this._db); } function Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_53($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_53.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_53.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_53.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_53; Coroutine$replicateOnNewNode_s8cxhz$_53.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT cepUid AS cepPK,\n | ? AS siteDestination\n | FROM ContentEntryPicture\n | WHERE ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = ?), -1) \n | /*psql ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT cepUid AS cepPK,\n | ? AS siteDestination\n | FROM ContentEntryPicture\n | WHERE ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = ?), -1) \n | ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_53(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_50($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_50.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_50.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_50.prototype.constructor = Coroutine$replicateOnChange_50; Coroutine$replicateOnChange_50.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT ContentEntryPicture.cepUid AS cepPk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntryPicture\n | ON ChangeLog.chTableId = 138\n | AND ChangeLog.chEntityPk = ContentEntryPicture.cepUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT ContentEntryPicture.cepUid AS cepPk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntryPicture\n | ON ChangeLog.chTableId = 138\n | AND ChangeLog.chEntityPk = ContentEntryPicture.cepUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_50(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cepUid = _resultSet.getLong_61zpoe$('cepUid'); var tmp_cepContentEntryUid = _resultSet.getLong_61zpoe$('cepContentEntryUid'); var tmp_cepUri = _resultSet.getString_61zpoe$('cepUri'); var tmp_cepMd5 = _resultSet.getString_61zpoe$('cepMd5'); var tmp_cepFileSize = _resultSet.getInt_61zpoe$('cepFileSize'); var tmp_cepTimestamp = _resultSet.getLong_61zpoe$('cepTimestamp'); var tmp_cepMimeType = _resultSet.getString_61zpoe$('cepMimeType'); var tmp_cepActive = _resultSet.getBoolean_61zpoe$('cepActive'); var _entity = new ContentEntryPicture(); _entity.cepUid = tmp_cepUid; _entity.cepContentEntryUid = tmp_cepContentEntryUid; _entity.cepUri = tmp_cepUri; _entity.cepMd5 = tmp_cepMd5; _entity.cepFileSize = tmp_cepFileSize; _entity.cepTimestamp = tmp_cepTimestamp; _entity.cepMimeType = tmp_cepMimeType; _entity.cepActive = tmp_cepActive; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(closure$entryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUid = closure$entryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(closure$entryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(closure$entryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByContentEntryUidAsync_s8cxhz$($this, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entryUid = entryUid_0; } Coroutine$findByContentEntryUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByContentEntryUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByContentEntryUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByContentEntryUidAsync_s8cxhz$; Coroutine$findByContentEntryUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryPicture) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentEntryPicture \n | WHERE cepContentEntryUid = ?\n | AND cepActive\n | ORDER BY cepTimestamp DESC \n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ContentEntryPicture \n | WHERE cepContentEntryUid = ?\n | AND cepActive\n | ORDER BY cepTimestamp DESC \n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(this.local$entryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.findByContentEntryUidAsync_s8cxhz$ = function (entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findByContentEntryUidAsync_s8cxhz$(this, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cepUid = _resultSet.getLong_61zpoe$('cepUid'); var tmp_cepContentEntryUid = _resultSet.getLong_61zpoe$('cepContentEntryUid'); var tmp_cepUri = _resultSet.getString_61zpoe$('cepUri'); var tmp_cepMd5 = _resultSet.getString_61zpoe$('cepMd5'); var tmp_cepFileSize = _resultSet.getInt_61zpoe$('cepFileSize'); var tmp_cepTimestamp = _resultSet.getLong_61zpoe$('cepTimestamp'); var tmp_cepMimeType = _resultSet.getString_61zpoe$('cepMimeType'); var tmp_cepActive = _resultSet.getBoolean_61zpoe$('cepActive'); var _entity = new ContentEntryPicture(); _entity.cepUid = tmp_cepUid; _entity.cepContentEntryUid = tmp_cepContentEntryUid; _entity.cepUri = tmp_cepUri; _entity.cepMd5 = tmp_cepMd5; _entity.cepFileSize = tmp_cepFileSize; _entity.cepTimestamp = tmp_cepTimestamp; _entity.cepMimeType = tmp_cepMimeType; _entity.cepActive = tmp_cepActive; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(closure$entryUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUid = closure$entryUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(closure$entryUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(closure$entryUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this$ContentEntryPictureDao_JdbcKt_0, closure$entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryPictureDao_JdbcKt = this$ContentEntryPictureDao_JdbcKt_0; this.local$closure$entryUid = closure$entryUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryPicture) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentEntryPicture \n | WHERE cepContentEntryUid = ?\n | AND cepActive\n | ORDER BY cepTimestamp DESC \n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ContentEntryPicture \n | WHERE cepContentEntryUid = ?\n | AND cepActive\n | ORDER BY cepTimestamp DESC \n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryPictureDao_JdbcKt._db, _stmtConfig, ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(this.local$closure$entryUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this$ContentEntryPictureDao_JdbcKt_0, closure$entryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this$ContentEntryPictureDao_JdbcKt_0, closure$entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryPictureDao_JdbcKt.prototype.findByContentEntryUidLive_s8cxhz$ = function (entryUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContentEntryPicture'), ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this, entryUid)); return _result; }; function Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda(closure$ContentEntryPicture_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$ContentEntryPicture = closure$ContentEntryPicture_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$ContentEntryPicture.cepContentEntryUid); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$ContentEntryPicture.cepUri); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$ContentEntryPicture.cepMd5); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$ContentEntryPicture.cepFileSize); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$ContentEntryPicture.cepTimestamp); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$ContentEntryPicture.cepMimeType); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$ContentEntryPicture.cepActive); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$ContentEntryPicture.cepUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$updateAsync$lambda(closure$ContentEntryPicture_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda(closure$ContentEntryPicture_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_vfioqn$($this, ContentEntryPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ContentEntryPicture = ContentEntryPicture_0; } Coroutine$updateAsync_vfioqn$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_vfioqn$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_vfioqn$.prototype.constructor = Coroutine$updateAsync_vfioqn$; Coroutine$updateAsync_vfioqn$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ContentEntryPicture SET cepContentEntryUid = ?, cepUri = ?, cepMd5 = ?, cepFileSize = ?, cepTimestamp = ?, cepMimeType = ?, cepActive = ? WHERE cepUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ContentEntryPictureDao_JdbcKt$updateAsync$lambda(this.local$ContentEntryPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.updateAsync_vfioqn$ = function (ContentEntryPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_vfioqn$(this, ContentEntryPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryPicture_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_56($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_56.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_56.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_56.prototype.constructor = Coroutine$insertAsync_56; Coroutine$insertAsync_56.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryPicture_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_56(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryPicture_.insertList_4ezy5m$(entityList); }; function ContentEntryPictureDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cepContentEntryUid); _stmt.setString_vqvrqt$(2, _entity.cepUri); _stmt.setString_vqvrqt$(3, _entity.cepMd5); _stmt.setInt_vux9f0$(4, _entity.cepFileSize); _stmt.setLong_6svq3l$(5, _entity.cepTimestamp); _stmt.setString_vqvrqt$(6, _entity.cepMimeType); _stmt.setBoolean_fzusl$(7, _entity.cepActive); _stmt.setLong_6svq3l$(8, _entity.cepUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryPictureDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryPicture SET cepContentEntryUid = ?, cepUri = ?, cepMd5 = ?, cepFileSize = ?, cepTimestamp = ?, cepMimeType = ?, cepActive = ? WHERE cepUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryPictureDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryPictureDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cepContentEntryUid); _stmt.setString_vqvrqt$(2, closure$entity.cepUri); _stmt.setString_vqvrqt$(3, closure$entity.cepMd5); _stmt.setInt_vux9f0$(4, closure$entity.cepFileSize); _stmt.setLong_6svq3l$(5, closure$entity.cepTimestamp); _stmt.setString_vqvrqt$(6, closure$entity.cepMimeType); _stmt.setBoolean_fzusl$(7, closure$entity.cepActive); _stmt.setLong_6svq3l$(8, closure$entity.cepUid); return _stmt.executeUpdate(); }; } ContentEntryPictureDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryPicture SET cepContentEntryUid = ?, cepUri = ?, cepMd5 = ?, cepFileSize = ?, cepTimestamp = ?, cepMimeType = ?, cepActive = ? WHERE cepUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryPictureDao_JdbcKt$update$lambda(entity)); }; function ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentEntryPicture (cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cepUid'; } else tmp$ = ''; return "INSERT INTO ContentEntryPicture (cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES(COALESCE(?,nextval('ContentEntryPicture_cepUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cepUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cepUid); } stmt.setLong_6svq3l$(2, entity.cepContentEntryUid); stmt.setString_vqvrqt$(3, entity.cepUri); stmt.setString_vqvrqt$(4, entity.cepMd5); stmt.setInt_vux9f0$(5, entity.cepFileSize); stmt.setLong_6svq3l$(6, entity.cepTimestamp); stmt.setString_vqvrqt$(7, entity.cepMimeType); stmt.setBoolean_fzusl$(8, entity.cepActive); }; ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryPictureDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao_JdbcKt', interfaces: [ContentEntryPictureDao]}; function ContentEntryPictureDao_ReplicateWrapper(_db, _dao) { ContentEntryPictureDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_54($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_54.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_54.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_54.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_54; Coroutine$replicateOnNewNode_s8cxhz$_54.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_54(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_51($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_51.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_51.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_51.prototype.constructor = Coroutine$replicateOnChange_51; Coroutine$replicateOnChange_51.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_51(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_ReplicateWrapper.prototype.findByContentEntryUidAsync_s8cxhz$ = function (entryUid, continuation) { return this._dao_0.findByContentEntryUidAsync_s8cxhz$(entryUid, continuation); }; ContentEntryPictureDao_ReplicateWrapper.prototype.findByContentEntryUidLive_s8cxhz$ = function (entryUid) { return this._dao_0.findByContentEntryUidLive_s8cxhz$(entryUid); }; function Coroutine$updateAsync_vfioqn$_0($this, ContentEntryPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ContentEntryPicture = ContentEntryPicture_0; } Coroutine$updateAsync_vfioqn$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_vfioqn$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_vfioqn$_0.prototype.constructor = Coroutine$updateAsync_vfioqn$_0; Coroutine$updateAsync_vfioqn$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new ContentEntryPicture_EwaAdapter(this.local$ContentEntryPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.local$ContentEntryPicture.cepTimestamp = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.$this._dao_0.updateAsync_vfioqn$(this.local$ContentEntryPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.updateAsync_vfioqn$ = function (ContentEntryPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_vfioqn$_0(this, ContentEntryPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_57($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_57.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_57.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_57.prototype.constructor = Coroutine$insertAsync_57; Coroutine$insertAsync_57.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new ContentEntryPicture_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cepUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(138, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.cepUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.cepTimestamp = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.cepUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_57(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryPictureDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryPictureDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryPictureDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao_ReplicateWrapper', interfaces: [ContentEntryPictureDao]}; function ContentEntryPictureDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryPictureDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_55($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_55.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_55.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_55.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_55; Coroutine$replicateOnNewNode_s8cxhz$_55.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_55(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_52($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_52.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_52.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_52.prototype.constructor = Coroutine$replicateOnChange_52; Coroutine$replicateOnChange_52.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_52(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByContentEntryUidAsync_s8cxhz$_0($this, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUid = entryUid_0; } Coroutine$findByContentEntryUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByContentEntryUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByContentEntryUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByContentEntryUidAsync_s8cxhz$_0; Coroutine$findByContentEntryUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByContentEntryUidAsync_s8cxhz$(this.local$entryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.findByContentEntryUidAsync_s8cxhz$ = function (entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findByContentEntryUidAsync_s8cxhz$_0(this, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_Repo.prototype.findByContentEntryUidLive_s8cxhz$ = function (entryUid) { var _result = this._dao.findByContentEntryUidLive_s8cxhz$(entryUid); return _result; }; function Coroutine$updateAsync_vfioqn$_1($this, ContentEntryPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ContentEntryPicture = ContentEntryPicture_0; } Coroutine$updateAsync_vfioqn$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_vfioqn$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_vfioqn$_1.prototype.constructor = Coroutine$updateAsync_vfioqn$_1; Coroutine$updateAsync_vfioqn$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_vfioqn$(this.local$ContentEntryPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.updateAsync_vfioqn$ = function (ContentEntryPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_vfioqn$_1(this, ContentEntryPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_58($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_58.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_58.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_58.prototype.constructor = Coroutine$insertAsync_58; Coroutine$insertAsync_58.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_58(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryPictureDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryPictureDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryPictureDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao_Repo', interfaces: [ContentEntryPictureDao]}; function ContentEntryRelatedEntryJoinDao_JdbcKt(_db) { ContentEntryRelatedEntryJoinDao.call(this); this._db = _db; this._insertAdapterContentEntryRelatedEntryJoin_ = new ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral(this._db); } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_56($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_56.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_56.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_56.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_56; Coroutine$replicateOnNewNode_s8cxhz$_56.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejPk,\n | ? AS cerejDestination\n | FROM ContentEntryRelatedEntryJoin\n | WHERE ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = ?), 0) \n | /*psql ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejPk,\n | ? AS cerejDestination\n | FROM ContentEntryRelatedEntryJoin\n | WHERE ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = ?), 0) \n | ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_56(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_53($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_53.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_53.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_53.prototype.constructor = Coroutine$replicateOnChange_53; Coroutine$replicateOnChange_53.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejUid,\n | UserSession.usClientNodeId AS cerejDestination\n | FROM ChangeLog\n | JOIN ContentEntryRelatedEntryJoin\n | ON ChangeLog.chTableId = 8\n | AND ChangeLog.chEntityPk = ContentEntryRelatedEntryJoin.cerejUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejUid,\n | UserSession.usClientNodeId AS cerejDestination\n | FROM ChangeLog\n | JOIN ContentEntryRelatedEntryJoin\n | ON ChangeLog.chTableId = 8\n | AND ChangeLog.chEntityPk = ContentEntryRelatedEntryJoin.cerejUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_53(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cerejUid = _resultSet.getLong_61zpoe$('cerejUid'); var tmp_cerejContentEntryUid = _resultSet.getLong_61zpoe$('cerejContentEntryUid'); var tmp_cerejRelatedEntryUid = _resultSet.getLong_61zpoe$('cerejRelatedEntryUid'); var tmp_cerejLastChangedBy = _resultSet.getInt_61zpoe$('cerejLastChangedBy'); var tmp_relType = _resultSet.getInt_61zpoe$('relType'); var tmp_comment = _resultSet.getString_61zpoe$('comment'); var tmp_cerejRelLanguageUid = _resultSet.getLong_61zpoe$('cerejRelLanguageUid'); var tmp_cerejLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cerejLocalChangeSeqNum'); var tmp_cerejMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cerejMasterChangeSeqNum'); var tmp_cerejLct = _resultSet.getLong_61zpoe$('cerejLct'); var _entity = new ContentEntryRelatedEntryJoin(); _entity.cerejUid = tmp_cerejUid; _entity.cerejContentEntryUid = tmp_cerejContentEntryUid; _entity.cerejRelatedEntryUid = tmp_cerejRelatedEntryUid; _entity.cerejLastChangedBy = tmp_cerejLastChangedBy; _entity.relType = tmp_relType; _entity.comment = tmp_comment; _entity.cerejRelLanguageUid = tmp_cerejRelLanguageUid; _entity.cerejLocalChangeSeqNum = tmp_cerejLocalChangeSeqNum; _entity.cerejMasterChangeSeqNum = tmp_cerejMasterChangeSeqNum; _entity.cerejLct = tmp_cerejLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.publicContentEntryRelatedEntryJoins = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntryRelatedEntryJoin.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntry ON ContentEntryRelatedEntryJoin.cerejRelatedEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publik', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntryRelatedEntryJoin.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntry ON ContentEntryRelatedEntryJoin.cerejRelatedEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publik\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda(_result)); return _result.v; }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cerejUid = _resultSet.getLong_61zpoe$('cerejUid'); var tmp_cerejContentEntryUid = _resultSet.getLong_61zpoe$('cerejContentEntryUid'); var tmp_cerejRelatedEntryUid = _resultSet.getLong_61zpoe$('cerejRelatedEntryUid'); var tmp_cerejLastChangedBy = _resultSet.getInt_61zpoe$('cerejLastChangedBy'); var tmp_relType = _resultSet.getInt_61zpoe$('relType'); var tmp_comment = _resultSet.getString_61zpoe$('comment'); var tmp_cerejRelLanguageUid = _resultSet.getLong_61zpoe$('cerejRelLanguageUid'); var tmp_cerejLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cerejLocalChangeSeqNum'); var tmp_cerejMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cerejMasterChangeSeqNum'); var tmp_cerejLct = _resultSet.getLong_61zpoe$('cerejLct'); var _entity = new ContentEntryRelatedEntryJoin(); _entity.cerejUid = tmp_cerejUid; _entity.cerejContentEntryUid = tmp_cerejContentEntryUid; _entity.cerejRelatedEntryUid = tmp_cerejRelatedEntryUid; _entity.cerejLastChangedBy = tmp_cerejLastChangedBy; _entity.relType = tmp_relType; _entity.comment = tmp_comment; _entity.cerejRelLanguageUid = tmp_cerejRelLanguageUid; _entity.cerejLocalChangeSeqNum = tmp_cerejLocalChangeSeqNum; _entity.cerejMasterChangeSeqNum = tmp_cerejMasterChangeSeqNum; _entity.cerejLct = tmp_cerejLct; closure$_result.v = _entity; }return Unit; }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda(closure$contentEntryUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); useResults(_stmt.executeQuery(), ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda$lambda(closure$_result)); return Unit; }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.findPrimaryByTranslation = function (contentEntryUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryRelatedEntryJoin) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda(contentEntryUid, _result)); return _result.v; }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cerejContentEntryUid = _resultSet.getLong_61zpoe$('cerejContentEntryUid'); var tmp_cerejRelatedEntryUid = _resultSet.getLong_61zpoe$('cerejRelatedEntryUid'); var tmp_languageName = _resultSet.getString_61zpoe$('languageName'); var _entity = new ContentEntryRelatedEntryJoinWithLangName(); _entity.cerejContentEntryUid = tmp_cerejContentEntryUid; _entity.cerejRelatedEntryUid = tmp_cerejRelatedEntryUid; _entity.languageName = tmp_languageName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllTranslationsForContentEntryAsync($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findAllTranslationsForContentEntryAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllTranslationsForContentEntryAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllTranslationsForContentEntryAsync.prototype.constructor = Coroutine$findAllTranslationsForContentEntryAsync; Coroutine$findAllTranslationsForContentEntryAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ContentEntryRelatedEntryJoin.cerejContentEntryUid, ContentEntryRelatedEntryJoin.cerejRelatedEntryUid, CASE ContentEntryRelatedEntryJoin.cerejRelatedEntryUid WHEN ? THEN (SELECT name FROM Language WHERE langUid = (SELECT primaryLanguageUid FROM ContentEntry WHERE contentEntryUid = ContentEntryRelatedEntryJoin.cerejContentEntryUid)) ELSE Language.name END languageName FROM ContentEntryRelatedEntryJoin LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ? OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?)) AND ContentEntryRelatedEntryJoin.relType = 1', void 0, void 0, void 0, trimMargin('\n |SELECT ContentEntryRelatedEntryJoin.cerejContentEntryUid, ContentEntryRelatedEntryJoin.cerejRelatedEntryUid, CASE ContentEntryRelatedEntryJoin.cerejRelatedEntryUid WHEN ? THEN (SELECT name FROM Language WHERE langUid = (SELECT primaryLanguageUid FROM ContentEntry WHERE contentEntryUid = ContentEntryRelatedEntryJoin.cerejContentEntryUid)) ELSE Language.name END languageName FROM ContentEntryRelatedEntryJoin LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ? OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?)) AND ContentEntryRelatedEntryJoin.relType = 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.findAllTranslationsForContentEntryAsync = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllTranslationsForContentEntryAsync(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral(this$ContentEntryRelatedEntryJoinDao_JdbcKt, closure$contentEntryUid) { this.this$ContentEntryRelatedEntryJoinDao_JdbcKt = this$ContentEntryRelatedEntryJoinDao_JdbcKt; this.closure$contentEntryUid = closure$contentEntryUid; DoorDataSourceFactory.call(this); } function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cerejUid = _resultSet.getLong_61zpoe$('cerejUid'); var tmp_cerejContentEntryUid = _resultSet.getLong_61zpoe$('cerejContentEntryUid'); var tmp_cerejRelatedEntryUid = _resultSet.getLong_61zpoe$('cerejRelatedEntryUid'); var tmp_cerejLastChangedBy = _resultSet.getInt_61zpoe$('cerejLastChangedBy'); var tmp_relType = _resultSet.getInt_61zpoe$('relType'); var tmp_comment = _resultSet.getString_61zpoe$('comment'); var tmp_cerejRelLanguageUid = _resultSet.getLong_61zpoe$('cerejRelLanguageUid'); var tmp_cerejLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cerejLocalChangeSeqNum'); var tmp_cerejMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cerejMasterChangeSeqNum'); var tmp_cerejLct = _resultSet.getLong_61zpoe$('cerejLct'); var _entity = new ContentEntryRelatedEntryJoinWithLanguage(); _entity.cerejUid = tmp_cerejUid; _entity.cerejContentEntryUid = tmp_cerejContentEntryUid; _entity.cerejRelatedEntryUid = tmp_cerejRelatedEntryUid; _entity.cerejLastChangedBy = tmp_cerejLastChangedBy; _entity.relType = tmp_relType; _entity.comment = tmp_comment; _entity.cerejRelLanguageUid = tmp_cerejRelLanguageUid; _entity.cerejLocalChangeSeqNum = tmp_cerejLocalChangeSeqNum; _entity.cerejMasterChangeSeqNum = tmp_cerejMasterChangeSeqNum; _entity.cerejLct = tmp_cerejLct; var _language_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }if (_language_nullFieldCount < 11) { if (_entity.language == null) { _entity.language = new Language(); }ensureNotNull(_entity.language).langUid = tmp_langUid; ensureNotNull(_entity.language).name = tmp_name; ensureNotNull(_entity.language).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.language).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.language).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.language).Language_Type = tmp_Language_Type; ensureNotNull(_entity.language).languageActive = tmp_languageActive; ensureNotNull(_entity.language).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.language).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.language).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.language).langLct = tmp_langLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt = this$ContentEntryRelatedEntryJoinDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT ContentEntryRelatedEntryJoin.*, Language.* FROM ContentEntryRelatedEntryJoin\n | LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid\n | WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ?\n | OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN\n | (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?))\n | AND ContentEntryRelatedEntryJoin.relType = 1\n | ORDER BY Language.name) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT ContentEntryRelatedEntryJoin.*, Language.* FROM ContentEntryRelatedEntryJoin\n | LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid\n | WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ?\n | OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN\n | (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?))\n | AND ContentEntryRelatedEntryJoin.relType = 1\n | ORDER BY Language.name) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, listOf(['ContentEntryRelatedEntryJoin', 'Language']), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt, this.closure$contentEntryUid, _limit, _offset)); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt = this$ContentEntryRelatedEntryJoinDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_liveResult = void 0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT ContentEntryRelatedEntryJoin.*, Language.* FROM ContentEntryRelatedEntryJoin\n | LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid\n | WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ?\n | OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN\n | (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?))\n | AND ContentEntryRelatedEntryJoin.relType = 1\n | ORDER BY Language.name) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT ContentEntryRelatedEntryJoin.*, Language.* FROM ContentEntryRelatedEntryJoin\n | LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid\n | WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ?\n | OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN\n | (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?))\n | AND ContentEntryRelatedEntryJoin.relType = 1\n | ORDER BY Language.name) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, _stmtConfig, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$contentEntryUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, listOf(['ContentEntryRelatedEntryJoin', 'Language']), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt, this.closure$contentEntryUid)); }; ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.findAllTranslationsWithContentEntryUid = function (contentEntryUid) { var _result = new ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral(this, contentEntryUid); return _result; }; function ContentEntryRelatedEntryJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cerejContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.cerejRelatedEntryUid); _stmt.setInt_vux9f0$(3, closure$entity.cerejLastChangedBy); _stmt.setInt_vux9f0$(4, closure$entity.relType); _stmt.setString_vqvrqt$(5, closure$entity.comment); _stmt.setLong_6svq3l$(6, closure$entity.cerejRelLanguageUid); _stmt.setLong_6svq3l$(7, closure$entity.cerejLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.cerejMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, closure$entity.cerejLct); _stmt.setLong_6svq3l$(10, closure$entity.cerejUid); return _stmt.executeUpdate(); }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryRelatedEntryJoin SET cerejContentEntryUid = ?, cerejRelatedEntryUid = ?, cerejLastChangedBy = ?, relType = ?, comment = ?, cerejRelLanguageUid = ?, cerejLocalChangeSeqNum = ?, cerejMasterChangeSeqNum = ?, cerejLct = ? WHERE cerejUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryRelatedEntryJoinDao_JdbcKt$update$lambda(entity)); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryRelatedEntryJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_59($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_59.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_59.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_59.prototype.constructor = Coroutine$insertAsync_59; Coroutine$insertAsync_59.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryRelatedEntryJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_59(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryRelatedEntryJoin_.insertList_4ezy5m$(entityList); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cerejContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.cerejRelatedEntryUid); _stmt.setInt_vux9f0$(3, _entity.cerejLastChangedBy); _stmt.setInt_vux9f0$(4, _entity.relType); _stmt.setString_vqvrqt$(5, _entity.comment); _stmt.setLong_6svq3l$(6, _entity.cerejRelLanguageUid); _stmt.setLong_6svq3l$(7, _entity.cerejLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.cerejMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, _entity.cerejLct); _stmt.setLong_6svq3l$(10, _entity.cerejUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryRelatedEntryJoin SET cerejContentEntryUid = ?, cerejRelatedEntryUid = ?, cerejLastChangedBy = ?, relType = ?, comment = ?, cerejRelLanguageUid = ?, cerejLocalChangeSeqNum = ?, cerejMasterChangeSeqNum = ?, cerejLct = ? WHERE cerejUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContentEntryRelatedEntryJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentEntryRelatedEntryJoin (cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cerejUid'; } else tmp$ = ''; return "INSERT INTO ContentEntryRelatedEntryJoin (cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES(COALESCE(?,nextval('ContentEntryRelatedEntryJoin_cerejUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cerejUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cerejUid); } stmt.setLong_6svq3l$(2, entity.cerejContentEntryUid); stmt.setLong_6svq3l$(3, entity.cerejRelatedEntryUid); stmt.setInt_vux9f0$(4, entity.cerejLastChangedBy); stmt.setInt_vux9f0$(5, entity.relType); stmt.setString_vqvrqt$(6, entity.comment); stmt.setLong_6svq3l$(7, entity.cerejRelLanguageUid); stmt.setLong_6svq3l$(8, entity.cerejLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.cerejMasterChangeSeqNum); stmt.setLong_6svq3l$(10, entity.cerejLct); }; ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryRelatedEntryJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao_JdbcKt', interfaces: [ContentEntryRelatedEntryJoinDao]}; function ContentEntryRelatedEntryJoinDao_ReplicateWrapper(_db, _dao) { ContentEntryRelatedEntryJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_57($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_57.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_57.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_57.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_57; Coroutine$replicateOnNewNode_s8cxhz$_57.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_57(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_54($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_54.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_54.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_54.prototype.constructor = Coroutine$replicateOnChange_54; Coroutine$replicateOnChange_54.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_54(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.publicContentEntryRelatedEntryJoins = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.findPrimaryByTranslation = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.findAllTranslationsForContentEntryAsync = function (contentEntryUid, continuation) { return this._dao_0.findAllTranslationsForContentEntryAsync(contentEntryUid, continuation); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.findAllTranslationsWithContentEntryUid = function (contentEntryUid) { return this._dao_0.findAllTranslationsWithContentEntryUid(contentEntryUid); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_60($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_60.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_60.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_60.prototype.constructor = Coroutine$insertAsync_60; Coroutine$insertAsync_60.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cerejUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(8, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cerejUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cerejLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cerejUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_60(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao_ReplicateWrapper', interfaces: [ContentEntryRelatedEntryJoinDao]}; function ContentEntryRelatedEntryJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryRelatedEntryJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_58($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_58.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_58.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_58.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_58; Coroutine$replicateOnNewNode_s8cxhz$_58.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_58(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_55($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_55.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_55.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_55.prototype.constructor = Coroutine$replicateOnChange_55; Coroutine$replicateOnChange_55.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_55(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.publicContentEntryRelatedEntryJoins = function () { var _result = this._dao.publicContentEntryRelatedEntryJoins(); return _result; }; ContentEntryRelatedEntryJoinDao_Repo.prototype.findPrimaryByTranslation = function (contentEntryUid) { var _result = this._dao.findPrimaryByTranslation(contentEntryUid); return _result; }; function Coroutine$findAllTranslationsForContentEntryAsync_0($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findAllTranslationsForContentEntryAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllTranslationsForContentEntryAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllTranslationsForContentEntryAsync_0.prototype.constructor = Coroutine$findAllTranslationsForContentEntryAsync_0; Coroutine$findAllTranslationsForContentEntryAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllTranslationsForContentEntryAsync(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.findAllTranslationsForContentEntryAsync = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllTranslationsForContentEntryAsync_0(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.findAllTranslationsWithContentEntryUid = function (contentEntryUid) { var _result = this._dao.findAllTranslationsWithContentEntryUid(contentEntryUid); return _result; }; ContentEntryRelatedEntryJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_61($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_61.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_61.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_61.prototype.constructor = Coroutine$insertAsync_61; Coroutine$insertAsync_61.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_61(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryRelatedEntryJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao_Repo', interfaces: [ContentEntryRelatedEntryJoinDao]}; function ContentJobDao_JdbcKt(_db) { ContentJobDao.call(this); this._db = _db; this._insertAdapterContentJob_ = new ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral(this._db); } function Coroutine$insertAsync_d5tex6$($this, contentJob_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentJob = contentJob_0; } Coroutine$insertAsync_d5tex6$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_d5tex6$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_d5tex6$.prototype.constructor = Coroutine$insertAsync_d5tex6$; Coroutine$insertAsync_d5tex6$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentJob_.insertAndReturnIdAsync_11rb$(this.local$contentJob, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.insertAsync_d5tex6$ = function (contentJob_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_d5tex6$(this, contentJob_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cjUid = _resultSet.getLong_61zpoe$('cjUid'); var tmp_toUri = _resultSet.getString_61zpoe$('toUri'); var tmp_cjProgress = _resultSet.getLong_61zpoe$('cjProgress'); var tmp_cjTotal = _resultSet.getLong_61zpoe$('cjTotal'); var tmp_cjNotificationTitle = _resultSet.getString_61zpoe$('cjNotificationTitle'); var tmp_cjIsMeteredAllowed = _resultSet.getBoolean_61zpoe$('cjIsMeteredAllowed'); var tmp_params = _resultSet.getString_61zpoe$('params'); var _entity = new ContentJob(); _entity.cjUid = tmp_cjUid; _entity.toUri = tmp_toUri; _entity.cjProgress = tmp_cjProgress; _entity.cjTotal = tmp_cjTotal; _entity.cjNotificationTitle = tmp_cjNotificationTitle; _entity.cjIsMeteredAllowed = tmp_cjIsMeteredAllowed; _entity.params = tmp_params; closure$_result.v = _entity; }return Unit; }; } function ContentJobDao_JdbcKt$findByUid$lambda(closure$cjUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$cjUid); useResults(_stmt.executeQuery(), ContentJobDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ContentJobDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (cjUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJob) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ? \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentJobDao_JdbcKt$findByUid$lambda(cjUid, _result)); return _result.v; }; function ContentJobDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cjUid = _resultSet.getLong_61zpoe$('cjUid'); var tmp_toUri = _resultSet.getString_61zpoe$('toUri'); var tmp_cjProgress = _resultSet.getLong_61zpoe$('cjProgress'); var tmp_cjTotal = _resultSet.getLong_61zpoe$('cjTotal'); var tmp_cjNotificationTitle = _resultSet.getString_61zpoe$('cjNotificationTitle'); var tmp_cjIsMeteredAllowed = _resultSet.getBoolean_61zpoe$('cjIsMeteredAllowed'); var tmp_params = _resultSet.getString_61zpoe$('params'); var _entity = new ContentJob(); _entity.cjUid = tmp_cjUid; _entity.toUri = tmp_toUri; _entity.cjProgress = tmp_cjProgress; _entity.cjTotal = tmp_cjTotal; _entity.cjNotificationTitle = tmp_cjNotificationTitle; _entity.cjIsMeteredAllowed = tmp_cjIsMeteredAllowed; _entity.params = tmp_params; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda(closure$cjUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjUid = closure$cjUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findByUidAsync$lambda(closure$cjUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda(closure$cjUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_11($this, cjUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$cjUid = cjUid_0; } Coroutine$findByUidAsync_s8cxhz$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_11.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_11; Coroutine$findByUidAsync_s8cxhz$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJob) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobDao_JdbcKt$findByUidAsync$lambda(this.local$cjUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (cjUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_11(this, cjUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cjUid = _resultSet.getLong_61zpoe$('cjUid'); var tmp_toUri = _resultSet.getString_61zpoe$('toUri'); var tmp_cjProgress = _resultSet.getLong_61zpoe$('cjProgress'); var tmp_cjTotal = _resultSet.getLong_61zpoe$('cjTotal'); var tmp_cjNotificationTitle = _resultSet.getString_61zpoe$('cjNotificationTitle'); var tmp_cjIsMeteredAllowed = _resultSet.getBoolean_61zpoe$('cjIsMeteredAllowed'); var tmp_params = _resultSet.getString_61zpoe$('params'); var _entity = new ContentJob(); _entity.cjUid = tmp_cjUid; _entity.toUri = tmp_toUri; _entity.cjProgress = tmp_cjProgress; _entity.cjTotal = tmp_cjTotal; _entity.cjNotificationTitle = tmp_cjNotificationTitle; _entity.cjIsMeteredAllowed = tmp_cjIsMeteredAllowed; _entity.params = tmp_params; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(closure$cjUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjUid = closure$cjUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(closure$cjUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(closure$cjUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this$ContentJobDao_JdbcKt_0, closure$cjUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentJobDao_JdbcKt = this$ContentJobDao_JdbcKt_0; this.local$closure$cjUid = closure$cjUid_0; this.local$_liveResult = void 0; } Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJob) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentJobDao_JdbcKt._db, _stmtConfig, ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(this.local$closure$cjUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this$ContentJobDao_JdbcKt_0, closure$cjUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this$ContentJobDao_JdbcKt_0, closure$cjUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobDao_JdbcKt.prototype.findLiveDataByUid_s8cxhz$ = function (cjUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContentJob'), ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this, cjUid)); return _result; }; function Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda(closure$toUri_0, closure$cjUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toUri = closure$toUri_0; this.local$closure$cjUid = closure$cjUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda; Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$toUri); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$updateDestinationDir$lambda(closure$toUri_0, closure$cjUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda(closure$toUri_0, closure$cjUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateDestinationDir_a4hdmt$($this, cjUid_0, toUri_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjUid = cjUid_0; this.local$toUri = toUri_0; } Coroutine$updateDestinationDir_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDestinationDir_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDestinationDir_a4hdmt$.prototype.constructor = Coroutine$updateDestinationDir_a4hdmt$; Coroutine$updateDestinationDir_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJob\n | SET toUri = ?\n | WHERE cjUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJob\n | SET toUri = ?\n | WHERE cjUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobDao_JdbcKt$updateDestinationDir$lambda(this.local$toUri, this.local$cjUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.updateDestinationDir_a4hdmt$ = function (cjUid_0, toUri_0, continuation_0, suspended) { var instance = new Coroutine$updateDestinationDir_a4hdmt$(this, cjUid_0, toUri_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(closure$contentJobId_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentJobId = closure$contentJobId_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentJobId); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(closure$contentJobId_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(closure$contentJobId_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this$ContentJobDao_JdbcKt_0, closure$contentJobId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentJobDao_JdbcKt = this$ContentJobDao_JdbcKt_0; this.local$closure$contentJobId = closure$contentJobId_0; this.local$_liveResult = void 0; } Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((SELECT ContentJob.cjIsMeteredAllowed\n | FROM ContentJob\n | WHERE cjUid = ?\n | LIMIT 1), 0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((SELECT ContentJob.cjIsMeteredAllowed\n | FROM ContentJob\n | WHERE cjUid = ?\n | LIMIT 1), FALSE)\n | \n ')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentJobDao_JdbcKt._db, _stmtConfig, ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(this.local$closure$contentJobId, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this$ContentJobDao_JdbcKt_0, closure$contentJobId_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this$ContentJobDao_JdbcKt_0, closure$contentJobId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobDao_JdbcKt.prototype.findMeteredAllowedLiveData_s8cxhz$ = function (contentJobId) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContentJob'), ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this, contentJobId)); return _result; }; function Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(closure$meteredAllowed_0, closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$meteredAllowed = closure$meteredAllowed_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda; Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$meteredAllowed); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(closure$meteredAllowed_0, closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(closure$meteredAllowed_0, closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateMeteredAllowedForEntry_2gd3um$($this, contentEntryUid_0, meteredAllowed_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$meteredAllowed = meteredAllowed_0; } Coroutine$updateMeteredAllowedForEntry_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateMeteredAllowedForEntry_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateMeteredAllowedForEntry_2gd3um$.prototype.constructor = Coroutine$updateMeteredAllowedForEntry_2gd3um$; Coroutine$updateMeteredAllowedForEntry_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJob \n | SET cjIsMeteredAllowed = ?\n | WHERE cjUid IN (SELECT cjiJobUid \n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | OR cjiParentContentEntryUid = ?)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJob \n | SET cjIsMeteredAllowed = ?\n | WHERE cjUid IN (SELECT cjiJobUid \n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | OR cjiParentContentEntryUid = ?)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(this.local$meteredAllowed, this.local$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.updateMeteredAllowedForEntry_2gd3um$ = function (contentEntryUid_0, meteredAllowed_0, continuation_0, suspended) { var instance = new Coroutine$updateMeteredAllowedForEntry_2gd3um$(this, contentEntryUid_0, meteredAllowed_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(closure$jobId_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobId = closure$jobId_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda; Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobId); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(closure$jobId_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(closure$jobId_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$isConnectivityAcceptableForJob_s8cxhz$($this, jobId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$jobId = jobId_0; } Coroutine$isConnectivityAcceptableForJob_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isConnectivityAcceptableForJob_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isConnectivityAcceptableForJob_s8cxhz$.prototype.constructor = Coroutine$isConnectivityAcceptableForJob_s8cxhz$; Coroutine$isConnectivityAcceptableForJob_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | WITH ConnectivityStateCte(state) AS \n | (SELECT COALESCE(\n | (SELECT connectivityState \n | FROM ConnectivityStatus \n | LIMIT 1), 0))\n | \n | SELECT COALESCE((\n | SELECT 1 \n | FROM ContentJob \n | WHERE cjUid = ?\n | AND ((cjIsMeteredAllowed \n | AND (SELECT state FROM ConnectivityStateCte) = 3)\n |\t\t\t OR (SELECT state FROM ConnectivityStateCte) = 4)\n | ) ,0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | WITH ConnectivityStateCte(state) AS \n | (SELECT COALESCE(\n | (SELECT connectivityState \n | FROM ConnectivityStatus \n | LIMIT 1), 0))\n | \n | SELECT COALESCE((\n | SELECT 1 \n | FROM ContentJob \n | WHERE cjUid = ?\n | AND ((cjIsMeteredAllowed \n | AND (SELECT state FROM ConnectivityStateCte) = 3)\n |\t\t\t OR (SELECT state FROM ConnectivityStateCte) = 4)\n | ) ,0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(this.local$jobId, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.isConnectivityAcceptableForJob_s8cxhz$ = function (jobId_0, continuation_0, suspended) { var instance = new Coroutine$isConnectivityAcceptableForJob_s8cxhz$(this, jobId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentJob (cjUid, toUri, cjProgress, cjTotal, cjNotificationTitle, cjIsMeteredAllowed, params) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cjUid'; } else tmp$ = ''; return "INSERT INTO ContentJob (cjUid, toUri, cjProgress, cjTotal, cjNotificationTitle, cjIsMeteredAllowed, params) VALUES(COALESCE(?,nextval('ContentJob_cjUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cjUid); } stmt.setString_vqvrqt$(2, entity.toUri); stmt.setLong_6svq3l$(3, entity.cjProgress); stmt.setLong_6svq3l$(4, entity.cjTotal); stmt.setString_vqvrqt$(5, entity.cjNotificationTitle); stmt.setBoolean_fzusl$(6, entity.cjIsMeteredAllowed); stmt.setString_vqvrqt$(7, entity.params); }; ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentJobDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobDao_JdbcKt', interfaces: [ContentJobDao]}; function ContentJobItemDao_JdbcKt(_db) { ContentJobItemDao.call(this); this._db = _db; this._insertAdapterContentJobItem_ = new ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral(this._db); } function ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = new ContentJobItemAndContentJob(); var _contentJobItem_nullFieldCount = 0; var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiJobUid = _resultSet.getLong_61zpoe$('cjiJobUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_sourceUri = _resultSet.getString_61zpoe$('sourceUri'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiIsLeaf = _resultSet.getBoolean_61zpoe$('cjiIsLeaf'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiContentEntryUid = _resultSet.getLong_61zpoe$('cjiContentEntryUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiParentContentEntryUid = _resultSet.getLong_61zpoe$('cjiParentContentEntryUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiContainerUid = _resultSet.getLong_61zpoe$('cjiContainerUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiItemProgress = _resultSet.getLong_61zpoe$('cjiItemProgress'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiItemTotal = _resultSet.getLong_61zpoe$('cjiItemTotal'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiRecursiveProgress = _resultSet.getLong_61zpoe$('cjiRecursiveProgress'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiRecursiveTotal = _resultSet.getLong_61zpoe$('cjiRecursiveTotal'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiStatus = _resultSet.getInt_61zpoe$('cjiStatus'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiRecursiveStatus = _resultSet.getInt_61zpoe$('cjiRecursiveStatus'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiConnectivityNeeded = _resultSet.getBoolean_61zpoe$('cjiConnectivityNeeded'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiPluginId = _resultSet.getInt_61zpoe$('cjiPluginId'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiAttemptCount = _resultSet.getInt_61zpoe$('cjiAttemptCount'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiParentCjiUid = _resultSet.getLong_61zpoe$('cjiParentCjiUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiServerJobId = _resultSet.getLong_61zpoe$('cjiServerJobId'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiStartTime = _resultSet.getLong_61zpoe$('cjiStartTime'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiFinishTime = _resultSet.getLong_61zpoe$('cjiFinishTime'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiUploadSessionUid = _resultSet.getString_61zpoe$('cjiUploadSessionUid'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiContentDeletedOnCancellation = _resultSet.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }var tmp_cjiContainerProcessed = _resultSet.getBoolean_61zpoe$('cjiContainerProcessed'); if (_resultSet.wasNull()) { _contentJobItem_nullFieldCount = _contentJobItem_nullFieldCount + 1 | 0; }if (_contentJobItem_nullFieldCount < 23) { if (_entity.contentJobItem == null) { _entity.contentJobItem = new ContentJobItem(); }ensureNotNull(_entity.contentJobItem).cjiUid = tmp_cjiUid; ensureNotNull(_entity.contentJobItem).cjiJobUid = tmp_cjiJobUid; ensureNotNull(_entity.contentJobItem).sourceUri = tmp_sourceUri; ensureNotNull(_entity.contentJobItem).cjiIsLeaf = tmp_cjiIsLeaf; ensureNotNull(_entity.contentJobItem).cjiContentEntryUid = tmp_cjiContentEntryUid; ensureNotNull(_entity.contentJobItem).cjiParentContentEntryUid = tmp_cjiParentContentEntryUid; ensureNotNull(_entity.contentJobItem).cjiContainerUid = tmp_cjiContainerUid; ensureNotNull(_entity.contentJobItem).cjiItemProgress = tmp_cjiItemProgress; ensureNotNull(_entity.contentJobItem).cjiItemTotal = tmp_cjiItemTotal; ensureNotNull(_entity.contentJobItem).cjiRecursiveProgress = tmp_cjiRecursiveProgress; ensureNotNull(_entity.contentJobItem).cjiRecursiveTotal = tmp_cjiRecursiveTotal; ensureNotNull(_entity.contentJobItem).cjiStatus = tmp_cjiStatus; ensureNotNull(_entity.contentJobItem).cjiRecursiveStatus = tmp_cjiRecursiveStatus; ensureNotNull(_entity.contentJobItem).cjiConnectivityNeeded = tmp_cjiConnectivityNeeded; ensureNotNull(_entity.contentJobItem).cjiPluginId = tmp_cjiPluginId; ensureNotNull(_entity.contentJobItem).cjiAttemptCount = tmp_cjiAttemptCount; ensureNotNull(_entity.contentJobItem).cjiParentCjiUid = tmp_cjiParentCjiUid; ensureNotNull(_entity.contentJobItem).cjiServerJobId = tmp_cjiServerJobId; ensureNotNull(_entity.contentJobItem).cjiStartTime = tmp_cjiStartTime; ensureNotNull(_entity.contentJobItem).cjiFinishTime = tmp_cjiFinishTime; ensureNotNull(_entity.contentJobItem).cjiUploadSessionUid = tmp_cjiUploadSessionUid; ensureNotNull(_entity.contentJobItem).cjiContentDeletedOnCancellation = tmp_cjiContentDeletedOnCancellation; ensureNotNull(_entity.contentJobItem).cjiContainerProcessed = tmp_cjiContainerProcessed; }var _contentJob_nullFieldCount = 0; var tmp_cjUid = _resultSet.getLong_61zpoe$('cjUid'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }var tmp_toUri = _resultSet.getString_61zpoe$('toUri'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }var tmp_cjProgress = _resultSet.getLong_61zpoe$('cjProgress'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }var tmp_cjTotal = _resultSet.getLong_61zpoe$('cjTotal'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }var tmp_cjNotificationTitle = _resultSet.getString_61zpoe$('cjNotificationTitle'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }var tmp_cjIsMeteredAllowed = _resultSet.getBoolean_61zpoe$('cjIsMeteredAllowed'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }var tmp_params = _resultSet.getString_61zpoe$('params'); if (_resultSet.wasNull()) { _contentJob_nullFieldCount = _contentJob_nullFieldCount + 1 | 0; }if (_contentJob_nullFieldCount < 7) { if (_entity.contentJob == null) { _entity.contentJob = new ContentJob(); }ensureNotNull(_entity.contentJob).cjUid = tmp_cjUid; ensureNotNull(_entity.contentJob).toUri = tmp_toUri; ensureNotNull(_entity.contentJob).cjProgress = tmp_cjProgress; ensureNotNull(_entity.contentJob).cjTotal = tmp_cjTotal; ensureNotNull(_entity.contentJob).cjNotificationTitle = tmp_cjNotificationTitle; ensureNotNull(_entity.contentJob).cjIsMeteredAllowed = tmp_cjIsMeteredAllowed; ensureNotNull(_entity.contentJob).params = tmp_params; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(closure$contentJobUid_0, closure$limit_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentJobUid = closure$contentJobUid_0; this.local$closure$limit = closure$limit_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda; Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentJobUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$limit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(closure$contentJobUid_0, closure$limit_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(closure$contentJobUid_0, closure$limit_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findNextItemsInQueue_yhmem3$($this, contentJobUid_0, limit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentJobUid = contentJobUid_0; this.local$limit = limit_0; } Coroutine$findNextItemsInQueue_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextItemsInQueue_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextItemsInQueue_yhmem3$.prototype.constructor = Coroutine$findNextItemsInQueue_yhmem3$; Coroutine$findNextItemsInQueue_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | WITH ConnectivityStateCte(state) AS \n | (SELECT COALESCE(\n | (SELECT connectivityState \n | FROM ConnectivityStatus \n | LIMIT 1), 0))\n | \n | SELECT ContentJobItem.*, ContentJob.*\n | FROM ContentJobItem\n | JOIN ContentJob\n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE ContentJobItem.cjiJobUid = ?\n | AND (ContentJobItem.cjiStatus = 4 OR \n | ContentJobItem.cjiStatus = 5)\n | AND (\n | NOT cjiConnectivityNeeded \n | OR ((SELECT state FROM ConnectivityStateCte) = 4) \n | OR (cjIsMeteredAllowed \n | AND (SELECT state FROM ConnectivityStateCte) = 3)\n | )\n | LIMIT ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | WITH ConnectivityStateCte(state) AS \n | (SELECT COALESCE(\n | (SELECT connectivityState \n | FROM ConnectivityStatus \n | LIMIT 1), 0))\n | \n | SELECT ContentJobItem.*, ContentJob.*\n | FROM ContentJobItem\n | JOIN ContentJob\n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE ContentJobItem.cjiJobUid = ?\n | AND (ContentJobItem.cjiStatus = 4 OR \n | ContentJobItem.cjiStatus = 5)\n | AND (\n | NOT cjiConnectivityNeeded \n | OR ((SELECT state FROM ConnectivityStateCte) = 4) \n | OR (cjIsMeteredAllowed \n | AND (SELECT state FROM ConnectivityStateCte) = 3)\n | )\n | LIMIT ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(this.local$contentJobUid, this.local$limit, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.findNextItemsInQueue_yhmem3$ = function (contentJobUid_0, limit_0, continuation_0, suspended) { var instance = new Coroutine$findNextItemsInQueue_yhmem3$(this, contentJobUid_0, limit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_progress = _resultSet.getInt_61zpoe$('progress'); var tmp_total = _resultSet.getInt_61zpoe$('total'); var tmp_progressTitle = _resultSet.getString_61zpoe$('progressTitle'); var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); var _entity = new ContentJobItemProgress(); _entity.progress = tmp_progress; _entity.total = tmp_total; _entity.progressTitle = tmp_progressTitle; _entity.cjiUid = tmp_cjiUid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda; Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findActiveContentJobItems_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findActiveContentJobItems_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveContentJobItems_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveContentJobItems_s8cxhz$.prototype.constructor = Coroutine$findActiveContentJobItems_s8cxhz$; Coroutine$findActiveContentJobItems_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT cjiRecursiveProgress AS progress, \n | cjiRecursiveTotal AS total, \n | cjNotificationTitle as progressTitle,\n | ContentJobItem.cjiUid\n | FROM ContentJobItem\n | JOIN ContentJob\n | ON ContentJob.cjUid = ContentJobItem.cjiJobUid\n | WHERE cjiContentEntryUid = ?\n | AND cjiRecursiveStatus >= 4\n | AND cjiRecursiveStatus <= 20\n | ORDER BY cjiStartTime DESC\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT cjiRecursiveProgress AS progress, \n | cjiRecursiveTotal AS total, \n | cjNotificationTitle as progressTitle,\n | ContentJobItem.cjiUid\n | FROM ContentJobItem\n | JOIN ContentJob\n | ON ContentJob.cjUid = ContentJobItem.cjiJobUid\n | WHERE cjiContentEntryUid = ?\n | AND cjiRecursiveStatus >= 4\n | AND cjiRecursiveStatus <= 20\n | ORDER BY cjiStartTime DESC\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.findActiveContentJobItems_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findActiveContentJobItems_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertJobItem_letzpf$($this, jobItem_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobItem = jobItem_0; } Coroutine$insertJobItem_letzpf$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertJobItem_letzpf$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertJobItem_letzpf$.prototype.constructor = Coroutine$insertJobItem_letzpf$; Coroutine$insertJobItem_letzpf$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentJobItem_.insertAndReturnIdAsync_11rb$(this.local$jobItem, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.insertJobItem_letzpf$ = function (jobItem_0, continuation_0, suspended) { var instance = new Coroutine$insertJobItem_letzpf$(this, jobItem_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertJobItems_xpde42$($this, jobItems_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobItems = jobItems_0; } Coroutine$insertJobItems_xpde42$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertJobItems_xpde42$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertJobItems_xpde42$.prototype.constructor = Coroutine$insertJobItems_xpde42$; Coroutine$insertJobItems_xpde42$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentJobItem_.insertListAsync_4ezy5m$(this.local$jobItems, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.insertJobItems_xpde42$ = function (jobItems_0, continuation_0, suspended) { var instance = new Coroutine$insertJobItems_xpde42$(this, jobItems_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda(closure$status_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$status = closure$status_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$status); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateItemStatus$lambda(closure$status_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda(closure$status_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateItemStatus_yhmem3$($this, cjiUid_0, status_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$status = status_0; } Coroutine$updateItemStatus_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateItemStatus_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateItemStatus_yhmem3$.prototype.constructor = Coroutine$updateItemStatus_yhmem3$; Coroutine$updateItemStatus_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem \n | SET cjiStatus = ?\n | WHERE cjiUid= ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem \n | SET cjiStatus = ?\n | WHERE cjiUid= ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateItemStatus$lambda(this.local$status, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateItemStatus_yhmem3$ = function (cjiUid_0, status_0, continuation_0, suspended) { var instance = new Coroutine$updateItemStatus_yhmem3$(this, cjiUid_0, status_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$isJobDone$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda(closure$jobUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobUid = closure$jobUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda; Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$isJobDone$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$isJobDone$lambda(closure$jobUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda(closure$jobUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$isJobDone_s8cxhz$($this, jobUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$jobUid = jobUid_0; } Coroutine$isJobDone_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isJobDone_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isJobDone_s8cxhz$.prototype.constructor = Coroutine$isJobDone_s8cxhz$; Coroutine$isJobDone_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT NOT EXISTS(\n | SELECT cjiUid \n | FROM ContentJobItem\n | WHERE cjiJobUid = ?\n | AND cjiStatus < 21) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT NOT EXISTS(\n | SELECT cjiUid \n | FROM ContentJobItem\n | WHERE cjiJobUid = ?\n | AND cjiStatus < 21) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$isJobDone$lambda(this.local$jobUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.isJobDone_s8cxhz$ = function (jobUid_0, continuation_0, suspended) { var instance = new Coroutine$isJobDone_s8cxhz$(this, jobUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); var tmp_cjiJobUid = _resultSet.getLong_61zpoe$('cjiJobUid'); var tmp_sourceUri = _resultSet.getString_61zpoe$('sourceUri'); var tmp_cjiIsLeaf = _resultSet.getBoolean_61zpoe$('cjiIsLeaf'); var tmp_cjiContentEntryUid = _resultSet.getLong_61zpoe$('cjiContentEntryUid'); var tmp_cjiParentContentEntryUid = _resultSet.getLong_61zpoe$('cjiParentContentEntryUid'); var tmp_cjiContainerUid = _resultSet.getLong_61zpoe$('cjiContainerUid'); var tmp_cjiItemProgress = _resultSet.getLong_61zpoe$('cjiItemProgress'); var tmp_cjiItemTotal = _resultSet.getLong_61zpoe$('cjiItemTotal'); var tmp_cjiRecursiveProgress = _resultSet.getLong_61zpoe$('cjiRecursiveProgress'); var tmp_cjiRecursiveTotal = _resultSet.getLong_61zpoe$('cjiRecursiveTotal'); var tmp_cjiStatus = _resultSet.getInt_61zpoe$('cjiStatus'); var tmp_cjiRecursiveStatus = _resultSet.getInt_61zpoe$('cjiRecursiveStatus'); var tmp_cjiConnectivityNeeded = _resultSet.getBoolean_61zpoe$('cjiConnectivityNeeded'); var tmp_cjiPluginId = _resultSet.getInt_61zpoe$('cjiPluginId'); var tmp_cjiAttemptCount = _resultSet.getInt_61zpoe$('cjiAttemptCount'); var tmp_cjiParentCjiUid = _resultSet.getLong_61zpoe$('cjiParentCjiUid'); var tmp_cjiServerJobId = _resultSet.getLong_61zpoe$('cjiServerJobId'); var tmp_cjiStartTime = _resultSet.getLong_61zpoe$('cjiStartTime'); var tmp_cjiFinishTime = _resultSet.getLong_61zpoe$('cjiFinishTime'); var tmp_cjiUploadSessionUid = _resultSet.getString_61zpoe$('cjiUploadSessionUid'); var tmp_cjiContentDeletedOnCancellation = _resultSet.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var tmp_cjiContainerProcessed = _resultSet.getBoolean_61zpoe$('cjiContainerProcessed'); var _entity = new ContentJobItem(); _entity.cjiUid = tmp_cjiUid; _entity.cjiJobUid = tmp_cjiJobUid; _entity.sourceUri = tmp_sourceUri; _entity.cjiIsLeaf = tmp_cjiIsLeaf; _entity.cjiContentEntryUid = tmp_cjiContentEntryUid; _entity.cjiParentContentEntryUid = tmp_cjiParentContentEntryUid; _entity.cjiContainerUid = tmp_cjiContainerUid; _entity.cjiItemProgress = tmp_cjiItemProgress; _entity.cjiItemTotal = tmp_cjiItemTotal; _entity.cjiRecursiveProgress = tmp_cjiRecursiveProgress; _entity.cjiRecursiveTotal = tmp_cjiRecursiveTotal; _entity.cjiStatus = tmp_cjiStatus; _entity.cjiRecursiveStatus = tmp_cjiRecursiveStatus; _entity.cjiConnectivityNeeded = tmp_cjiConnectivityNeeded; _entity.cjiPluginId = tmp_cjiPluginId; _entity.cjiAttemptCount = tmp_cjiAttemptCount; _entity.cjiParentCjiUid = tmp_cjiParentCjiUid; _entity.cjiServerJobId = tmp_cjiServerJobId; _entity.cjiStartTime = tmp_cjiStartTime; _entity.cjiFinishTime = tmp_cjiFinishTime; _entity.cjiUploadSessionUid = tmp_cjiUploadSessionUid; _entity.cjiContentDeletedOnCancellation = tmp_cjiContentDeletedOnCancellation; _entity.cjiContainerProcessed = tmp_cjiContainerProcessed; closure$_result.v = _entity; }return Unit; }; } function ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda(closure$jobUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$jobUid); useResults(_stmt.executeQuery(), ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda$lambda(closure$_result)); return Unit; }; } ContentJobItemDao_JdbcKt.prototype.findRootJobItemByJobId_s8cxhz$ = function (jobUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJobItem) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | AND cjiParentCjiUid = 0 \n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | AND cjiParentCjiUid = 0 \n | LIMIT 1\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda(jobUid, _result)); return _result.v; }; function Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda(closure$cjiProgress_0, closure$cjiTotal_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjiProgress = closure$cjiProgress_0; this.local$closure$cjiTotal = closure$cjiTotal_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjiProgress); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiTotal); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateItemProgress$lambda(closure$cjiProgress_0, closure$cjiTotal_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda(closure$cjiProgress_0, closure$cjiTotal_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateItemProgress_b9bd0d$($this, cjiUid_0, cjiProgress_0, cjiTotal_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$cjiProgress = cjiProgress_0; this.local$cjiTotal = cjiTotal_0; } Coroutine$updateItemProgress_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateItemProgress_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateItemProgress_b9bd0d$.prototype.constructor = Coroutine$updateItemProgress_b9bd0d$; Coroutine$updateItemProgress_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiItemProgress = ?,\n | cjiItemTotal = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiItemProgress = ?,\n | cjiItemTotal = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateItemProgress$lambda(this.local$cjiProgress, this.local$cjiTotal, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateItemProgress_b9bd0d$ = function (cjiUid_0, cjiProgress_0, cjiTotal_0, continuation_0, suspended) { var instance = new Coroutine$updateItemProgress_b9bd0d$(this, cjiUid_0, cjiProgress_0, cjiTotal_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(closure$connectivityNeeded_0, closure$contentJobItemId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$connectivityNeeded = closure$connectivityNeeded_0; this.local$closure$contentJobItemId = closure$contentJobItemId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$connectivityNeeded); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentJobItemId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(closure$connectivityNeeded_0, closure$contentJobItemId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(closure$connectivityNeeded_0, closure$contentJobItemId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateConnectivityNeeded_2gd3um$($this, contentJobItemId_0, connectivityNeeded_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentJobItemId = contentJobItemId_0; this.local$connectivityNeeded = connectivityNeeded_0; } Coroutine$updateConnectivityNeeded_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateConnectivityNeeded_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateConnectivityNeeded_2gd3um$.prototype.constructor = Coroutine$updateConnectivityNeeded_2gd3um$; Coroutine$updateConnectivityNeeded_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiConnectivityNeeded = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiConnectivityNeeded = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(this.local$connectivityNeeded, this.local$contentJobItemId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateConnectivityNeeded_2gd3um$ = function (contentJobItemId_0, connectivityNeeded_0, continuation_0, suspended) { var instance = new Coroutine$updateConnectivityNeeded_2gd3um$(this, contentJobItemId_0, connectivityNeeded_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(closure$cjiContainerProcessed_0, closure$contentJobItemId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjiContainerProcessed = closure$cjiContainerProcessed_0; this.local$closure$contentJobItemId = closure$contentJobItemId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$cjiContainerProcessed); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentJobItemId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(closure$cjiContainerProcessed_0, closure$contentJobItemId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(closure$cjiContainerProcessed_0, closure$contentJobItemId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContainerProcessed_2gd3um$($this, contentJobItemId_0, cjiContainerProcessed_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentJobItemId = contentJobItemId_0; this.local$cjiContainerProcessed = cjiContainerProcessed_0; } Coroutine$updateContainerProcessed_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerProcessed_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerProcessed_2gd3um$.prototype.constructor = Coroutine$updateContainerProcessed_2gd3um$; Coroutine$updateContainerProcessed_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiContainerProcessed = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiContainerProcessed = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(this.local$cjiContainerProcessed, this.local$contentJobItemId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateContainerProcessed_2gd3um$ = function (contentJobItemId_0, cjiContainerProcessed_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerProcessed_2gd3um$(this, contentJobItemId_0, cjiContainerProcessed_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(closure$status_0, closure$attemptCount_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$status = closure$status_0; this.local$closure$attemptCount = closure$attemptCount_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$status); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$attemptCount); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(closure$status_0, closure$attemptCount_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(closure$status_0, closure$attemptCount_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateJobItemAttemptCountAndStatus_liip7b$($this, cjiUid_0, attemptCount_0, status_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$attemptCount = attemptCount_0; this.local$status = status_0; } Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.prototype.constructor = Coroutine$updateJobItemAttemptCountAndStatus_liip7b$; Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStatus = ?,\n | cjiAttemptCount = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStatus = ?,\n | cjiAttemptCount = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(this.local$status, this.local$attemptCount, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateJobItemAttemptCountAndStatus_liip7b$ = function (cjiUid_0, attemptCount_0, status_0, continuation_0, suspended) { var instance = new Coroutine$updateJobItemAttemptCountAndStatus_liip7b$(this, cjiUid_0, attemptCount_0, status_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(closure$startTime_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$startTime = closure$startTime_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$startTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(closure$startTime_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(closure$startTime_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateStartTimeForJob_3pjtqy$($this, cjiUid_0, startTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$startTime = startTime_0; } Coroutine$updateStartTimeForJob_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateStartTimeForJob_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateStartTimeForJob_3pjtqy$.prototype.constructor = Coroutine$updateStartTimeForJob_3pjtqy$; Coroutine$updateStartTimeForJob_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStartTime = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStartTime = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(this.local$startTime, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateStartTimeForJob_3pjtqy$ = function (cjiUid_0, startTime_0, continuation_0, suspended) { var instance = new Coroutine$updateStartTimeForJob_3pjtqy$(this, cjiUid_0, startTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(closure$finishTime_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$finishTime = closure$finishTime_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$finishTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(closure$finishTime_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(closure$finishTime_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateFinishTimeForJob_3pjtqy$($this, cjiUid_0, finishTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$finishTime = finishTime_0; } Coroutine$updateFinishTimeForJob_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateFinishTimeForJob_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateFinishTimeForJob_3pjtqy$.prototype.constructor = Coroutine$updateFinishTimeForJob_3pjtqy$; Coroutine$updateFinishTimeForJob_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiFinishTime = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiFinishTime = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(this.local$finishTime, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateFinishTimeForJob_3pjtqy$ = function (cjiUid_0, finishTime_0, continuation_0, suspended) { var instance = new Coroutine$updateFinishTimeForJob_3pjtqy$(this, cjiUid_0, finishTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(closure$contentEntryUid_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(closure$contentEntryUid_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(closure$contentEntryUid_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContentEntryUid_3pjtqy$($this, cjiUid_0, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$updateContentEntryUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentEntryUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentEntryUid_3pjtqy$.prototype.constructor = Coroutine$updateContentEntryUid_3pjtqy$; Coroutine$updateContentEntryUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobITem\n | SET cjiContentEntryUid = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobITem\n | SET cjiContentEntryUid = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(this.local$contentEntryUid, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateContentEntryUid_3pjtqy$ = function (cjiUid_0, contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$updateContentEntryUid_3pjtqy$(this, cjiUid_0, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(closure$containerUid_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(closure$containerUid_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(closure$containerUid_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContentJobItemContainer_3pjtqy$($this, cjiUid_0, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$containerUid = containerUid_0; } Coroutine$updateContentJobItemContainer_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentJobItemContainer_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentJobItemContainer_3pjtqy$.prototype.constructor = Coroutine$updateContentJobItemContainer_3pjtqy$; Coroutine$updateContentJobItemContainer_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiContainerUid = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiContainerUid = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(this.local$containerUid, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateContentJobItemContainer_3pjtqy$ = function (cjiUid_0, containerUid_0, continuation_0, suspended) { var instance = new Coroutine$updateContentJobItemContainer_3pjtqy$(this, cjiUid_0, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findAll$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); var tmp_cjiJobUid = _resultSet.getLong_61zpoe$('cjiJobUid'); var tmp_sourceUri = _resultSet.getString_61zpoe$('sourceUri'); var tmp_cjiIsLeaf = _resultSet.getBoolean_61zpoe$('cjiIsLeaf'); var tmp_cjiContentEntryUid = _resultSet.getLong_61zpoe$('cjiContentEntryUid'); var tmp_cjiParentContentEntryUid = _resultSet.getLong_61zpoe$('cjiParentContentEntryUid'); var tmp_cjiContainerUid = _resultSet.getLong_61zpoe$('cjiContainerUid'); var tmp_cjiItemProgress = _resultSet.getLong_61zpoe$('cjiItemProgress'); var tmp_cjiItemTotal = _resultSet.getLong_61zpoe$('cjiItemTotal'); var tmp_cjiRecursiveProgress = _resultSet.getLong_61zpoe$('cjiRecursiveProgress'); var tmp_cjiRecursiveTotal = _resultSet.getLong_61zpoe$('cjiRecursiveTotal'); var tmp_cjiStatus = _resultSet.getInt_61zpoe$('cjiStatus'); var tmp_cjiRecursiveStatus = _resultSet.getInt_61zpoe$('cjiRecursiveStatus'); var tmp_cjiConnectivityNeeded = _resultSet.getBoolean_61zpoe$('cjiConnectivityNeeded'); var tmp_cjiPluginId = _resultSet.getInt_61zpoe$('cjiPluginId'); var tmp_cjiAttemptCount = _resultSet.getInt_61zpoe$('cjiAttemptCount'); var tmp_cjiParentCjiUid = _resultSet.getLong_61zpoe$('cjiParentCjiUid'); var tmp_cjiServerJobId = _resultSet.getLong_61zpoe$('cjiServerJobId'); var tmp_cjiStartTime = _resultSet.getLong_61zpoe$('cjiStartTime'); var tmp_cjiFinishTime = _resultSet.getLong_61zpoe$('cjiFinishTime'); var tmp_cjiUploadSessionUid = _resultSet.getString_61zpoe$('cjiUploadSessionUid'); var tmp_cjiContentDeletedOnCancellation = _resultSet.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var tmp_cjiContainerProcessed = _resultSet.getBoolean_61zpoe$('cjiContainerProcessed'); var _entity = new ContentJobItem(); _entity.cjiUid = tmp_cjiUid; _entity.cjiJobUid = tmp_cjiJobUid; _entity.sourceUri = tmp_sourceUri; _entity.cjiIsLeaf = tmp_cjiIsLeaf; _entity.cjiContentEntryUid = tmp_cjiContentEntryUid; _entity.cjiParentContentEntryUid = tmp_cjiParentContentEntryUid; _entity.cjiContainerUid = tmp_cjiContainerUid; _entity.cjiItemProgress = tmp_cjiItemProgress; _entity.cjiItemTotal = tmp_cjiItemTotal; _entity.cjiRecursiveProgress = tmp_cjiRecursiveProgress; _entity.cjiRecursiveTotal = tmp_cjiRecursiveTotal; _entity.cjiStatus = tmp_cjiStatus; _entity.cjiRecursiveStatus = tmp_cjiRecursiveStatus; _entity.cjiConnectivityNeeded = tmp_cjiConnectivityNeeded; _entity.cjiPluginId = tmp_cjiPluginId; _entity.cjiAttemptCount = tmp_cjiAttemptCount; _entity.cjiParentCjiUid = tmp_cjiParentCjiUid; _entity.cjiServerJobId = tmp_cjiServerJobId; _entity.cjiStartTime = tmp_cjiStartTime; _entity.cjiFinishTime = tmp_cjiFinishTime; _entity.cjiUploadSessionUid = tmp_cjiUploadSessionUid; _entity.cjiContentDeletedOnCancellation = tmp_cjiContentDeletedOnCancellation; _entity.cjiContainerProcessed = tmp_cjiContainerProcessed; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda; Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findAll$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findAll$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAll($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$findAll.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAll.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAll.prototype.constructor = Coroutine$findAll; Coroutine$findAll.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findAll$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.findAll = function (continuation_0, suspended) { var instance = new Coroutine$findAll(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); var tmp_cjiJobUid = _resultSet.getLong_61zpoe$('cjiJobUid'); var tmp_sourceUri = _resultSet.getString_61zpoe$('sourceUri'); var tmp_cjiIsLeaf = _resultSet.getBoolean_61zpoe$('cjiIsLeaf'); var tmp_cjiContentEntryUid = _resultSet.getLong_61zpoe$('cjiContentEntryUid'); var tmp_cjiParentContentEntryUid = _resultSet.getLong_61zpoe$('cjiParentContentEntryUid'); var tmp_cjiContainerUid = _resultSet.getLong_61zpoe$('cjiContainerUid'); var tmp_cjiItemProgress = _resultSet.getLong_61zpoe$('cjiItemProgress'); var tmp_cjiItemTotal = _resultSet.getLong_61zpoe$('cjiItemTotal'); var tmp_cjiRecursiveProgress = _resultSet.getLong_61zpoe$('cjiRecursiveProgress'); var tmp_cjiRecursiveTotal = _resultSet.getLong_61zpoe$('cjiRecursiveTotal'); var tmp_cjiStatus = _resultSet.getInt_61zpoe$('cjiStatus'); var tmp_cjiRecursiveStatus = _resultSet.getInt_61zpoe$('cjiRecursiveStatus'); var tmp_cjiConnectivityNeeded = _resultSet.getBoolean_61zpoe$('cjiConnectivityNeeded'); var tmp_cjiPluginId = _resultSet.getInt_61zpoe$('cjiPluginId'); var tmp_cjiAttemptCount = _resultSet.getInt_61zpoe$('cjiAttemptCount'); var tmp_cjiParentCjiUid = _resultSet.getLong_61zpoe$('cjiParentCjiUid'); var tmp_cjiServerJobId = _resultSet.getLong_61zpoe$('cjiServerJobId'); var tmp_cjiStartTime = _resultSet.getLong_61zpoe$('cjiStartTime'); var tmp_cjiFinishTime = _resultSet.getLong_61zpoe$('cjiFinishTime'); var tmp_cjiUploadSessionUid = _resultSet.getString_61zpoe$('cjiUploadSessionUid'); var tmp_cjiContentDeletedOnCancellation = _resultSet.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var tmp_cjiContainerProcessed = _resultSet.getBoolean_61zpoe$('cjiContainerProcessed'); var _entity = new ContentJobItem(); _entity.cjiUid = tmp_cjiUid; _entity.cjiJobUid = tmp_cjiJobUid; _entity.sourceUri = tmp_sourceUri; _entity.cjiIsLeaf = tmp_cjiIsLeaf; _entity.cjiContentEntryUid = tmp_cjiContentEntryUid; _entity.cjiParentContentEntryUid = tmp_cjiParentContentEntryUid; _entity.cjiContainerUid = tmp_cjiContainerUid; _entity.cjiItemProgress = tmp_cjiItemProgress; _entity.cjiItemTotal = tmp_cjiItemTotal; _entity.cjiRecursiveProgress = tmp_cjiRecursiveProgress; _entity.cjiRecursiveTotal = tmp_cjiRecursiveTotal; _entity.cjiStatus = tmp_cjiStatus; _entity.cjiRecursiveStatus = tmp_cjiRecursiveStatus; _entity.cjiConnectivityNeeded = tmp_cjiConnectivityNeeded; _entity.cjiPluginId = tmp_cjiPluginId; _entity.cjiAttemptCount = tmp_cjiAttemptCount; _entity.cjiParentCjiUid = tmp_cjiParentCjiUid; _entity.cjiServerJobId = tmp_cjiServerJobId; _entity.cjiStartTime = tmp_cjiStartTime; _entity.cjiFinishTime = tmp_cjiFinishTime; _entity.cjiUploadSessionUid = tmp_cjiUploadSessionUid; _entity.cjiContentDeletedOnCancellation = tmp_cjiContentDeletedOnCancellation; _entity.cjiContainerProcessed = tmp_cjiContainerProcessed; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda(closure$cjiUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjiUid = closure$cjiUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findByUidAsync$lambda(closure$cjiUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda(closure$cjiUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_12($this, cjiUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$cjiUid = cjiUid_0; } Coroutine$findByUidAsync_s8cxhz$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_12.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_12; Coroutine$findByUidAsync_s8cxhz$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJobItem) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.*\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJobItem.*\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findByUidAsync$lambda(this.local$cjiUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (cjiUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_12(this, cjiUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$.prototype.constructor = Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$; Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT ContentJobItem.cjiJobUid\n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | AND cjiStatus BETWEEN 4 AND 20\n | ORDER BY cjiFinishTime DESC), 0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT ContentJobItem.cjiJobUid\n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | AND cjiStatus BETWEEN 4 AND 20\n | ORDER BY cjiFinishTime DESC), 0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.getActiveContentJobIdByContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getActiveContentJobIdByContentEntryUid_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(closure$uploadSessionUuid_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uploadSessionUuid = closure$uploadSessionUuid_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$uploadSessionUuid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(closure$uploadSessionUuid_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(closure$uploadSessionUuid_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateUploadSessionUuid_a4hdmt$($this, cjiUid_0, uploadSessionUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$uploadSessionUuid = uploadSessionUuid_0; } Coroutine$updateUploadSessionUuid_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateUploadSessionUuid_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateUploadSessionUuid_a4hdmt$.prototype.constructor = Coroutine$updateUploadSessionUuid_a4hdmt$; Coroutine$updateUploadSessionUuid_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiUploadSessionUid = ?\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiUploadSessionUid = ?\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(this.local$uploadSessionUuid, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateUploadSessionUuid_a4hdmt$ = function (cjiUid_0, uploadSessionUuid_0, continuation_0, suspended) { var instance = new Coroutine$updateUploadSessionUuid_a4hdmt$(this, cjiUid_0, uploadSessionUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findAllByJobId$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); var tmp_cjiJobUid = _resultSet.getLong_61zpoe$('cjiJobUid'); var tmp_sourceUri = _resultSet.getString_61zpoe$('sourceUri'); var tmp_cjiIsLeaf = _resultSet.getBoolean_61zpoe$('cjiIsLeaf'); var tmp_cjiContentEntryUid = _resultSet.getLong_61zpoe$('cjiContentEntryUid'); var tmp_cjiParentContentEntryUid = _resultSet.getLong_61zpoe$('cjiParentContentEntryUid'); var tmp_cjiContainerUid = _resultSet.getLong_61zpoe$('cjiContainerUid'); var tmp_cjiItemProgress = _resultSet.getLong_61zpoe$('cjiItemProgress'); var tmp_cjiItemTotal = _resultSet.getLong_61zpoe$('cjiItemTotal'); var tmp_cjiRecursiveProgress = _resultSet.getLong_61zpoe$('cjiRecursiveProgress'); var tmp_cjiRecursiveTotal = _resultSet.getLong_61zpoe$('cjiRecursiveTotal'); var tmp_cjiStatus = _resultSet.getInt_61zpoe$('cjiStatus'); var tmp_cjiRecursiveStatus = _resultSet.getInt_61zpoe$('cjiRecursiveStatus'); var tmp_cjiConnectivityNeeded = _resultSet.getBoolean_61zpoe$('cjiConnectivityNeeded'); var tmp_cjiPluginId = _resultSet.getInt_61zpoe$('cjiPluginId'); var tmp_cjiAttemptCount = _resultSet.getInt_61zpoe$('cjiAttemptCount'); var tmp_cjiParentCjiUid = _resultSet.getLong_61zpoe$('cjiParentCjiUid'); var tmp_cjiServerJobId = _resultSet.getLong_61zpoe$('cjiServerJobId'); var tmp_cjiStartTime = _resultSet.getLong_61zpoe$('cjiStartTime'); var tmp_cjiFinishTime = _resultSet.getLong_61zpoe$('cjiFinishTime'); var tmp_cjiUploadSessionUid = _resultSet.getString_61zpoe$('cjiUploadSessionUid'); var tmp_cjiContentDeletedOnCancellation = _resultSet.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var tmp_cjiContainerProcessed = _resultSet.getBoolean_61zpoe$('cjiContainerProcessed'); var _entity = new ContentJobItem(); _entity.cjiUid = tmp_cjiUid; _entity.cjiJobUid = tmp_cjiJobUid; _entity.sourceUri = tmp_sourceUri; _entity.cjiIsLeaf = tmp_cjiIsLeaf; _entity.cjiContentEntryUid = tmp_cjiContentEntryUid; _entity.cjiParentContentEntryUid = tmp_cjiParentContentEntryUid; _entity.cjiContainerUid = tmp_cjiContainerUid; _entity.cjiItemProgress = tmp_cjiItemProgress; _entity.cjiItemTotal = tmp_cjiItemTotal; _entity.cjiRecursiveProgress = tmp_cjiRecursiveProgress; _entity.cjiRecursiveTotal = tmp_cjiRecursiveTotal; _entity.cjiStatus = tmp_cjiStatus; _entity.cjiRecursiveStatus = tmp_cjiRecursiveStatus; _entity.cjiConnectivityNeeded = tmp_cjiConnectivityNeeded; _entity.cjiPluginId = tmp_cjiPluginId; _entity.cjiAttemptCount = tmp_cjiAttemptCount; _entity.cjiParentCjiUid = tmp_cjiParentCjiUid; _entity.cjiServerJobId = tmp_cjiServerJobId; _entity.cjiStartTime = tmp_cjiStartTime; _entity.cjiFinishTime = tmp_cjiFinishTime; _entity.cjiUploadSessionUid = tmp_cjiUploadSessionUid; _entity.cjiContentDeletedOnCancellation = tmp_cjiContentDeletedOnCancellation; _entity.cjiContainerProcessed = tmp_cjiContainerProcessed; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ContentJobItemDao_JdbcKt$findAllByJobId$lambda(closure$jobId, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$jobId); useResults(_stmt.executeQuery(), ContentJobItemDao_JdbcKt$findAllByJobId$lambda$lambda(closure$_result)); return Unit; }; } ContentJobItemDao_JdbcKt.prototype.findAllByJobId_s8cxhz$ = function (jobId) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findAllByJobId$lambda(jobId, _result)); return _result.v; }; function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cjiUid = _resultSet.getLong_61zpoe$('cjiUid'); var tmp_cjiJobUid = _resultSet.getLong_61zpoe$('cjiJobUid'); var tmp_sourceUri = _resultSet.getString_61zpoe$('sourceUri'); var tmp_cjiIsLeaf = _resultSet.getBoolean_61zpoe$('cjiIsLeaf'); var tmp_cjiContentEntryUid = _resultSet.getLong_61zpoe$('cjiContentEntryUid'); var tmp_cjiParentContentEntryUid = _resultSet.getLong_61zpoe$('cjiParentContentEntryUid'); var tmp_cjiContainerUid = _resultSet.getLong_61zpoe$('cjiContainerUid'); var tmp_cjiItemProgress = _resultSet.getLong_61zpoe$('cjiItemProgress'); var tmp_cjiItemTotal = _resultSet.getLong_61zpoe$('cjiItemTotal'); var tmp_cjiRecursiveProgress = _resultSet.getLong_61zpoe$('cjiRecursiveProgress'); var tmp_cjiRecursiveTotal = _resultSet.getLong_61zpoe$('cjiRecursiveTotal'); var tmp_cjiStatus = _resultSet.getInt_61zpoe$('cjiStatus'); var tmp_cjiRecursiveStatus = _resultSet.getInt_61zpoe$('cjiRecursiveStatus'); var tmp_cjiConnectivityNeeded = _resultSet.getBoolean_61zpoe$('cjiConnectivityNeeded'); var tmp_cjiPluginId = _resultSet.getInt_61zpoe$('cjiPluginId'); var tmp_cjiAttemptCount = _resultSet.getInt_61zpoe$('cjiAttemptCount'); var tmp_cjiParentCjiUid = _resultSet.getLong_61zpoe$('cjiParentCjiUid'); var tmp_cjiServerJobId = _resultSet.getLong_61zpoe$('cjiServerJobId'); var tmp_cjiStartTime = _resultSet.getLong_61zpoe$('cjiStartTime'); var tmp_cjiFinishTime = _resultSet.getLong_61zpoe$('cjiFinishTime'); var tmp_cjiUploadSessionUid = _resultSet.getString_61zpoe$('cjiUploadSessionUid'); var tmp_cjiContentDeletedOnCancellation = _resultSet.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var tmp_cjiContainerProcessed = _resultSet.getBoolean_61zpoe$('cjiContainerProcessed'); var _entity = new ContentJobItem(); _entity.cjiUid = tmp_cjiUid; _entity.cjiJobUid = tmp_cjiJobUid; _entity.sourceUri = tmp_sourceUri; _entity.cjiIsLeaf = tmp_cjiIsLeaf; _entity.cjiContentEntryUid = tmp_cjiContentEntryUid; _entity.cjiParentContentEntryUid = tmp_cjiParentContentEntryUid; _entity.cjiContainerUid = tmp_cjiContainerUid; _entity.cjiItemProgress = tmp_cjiItemProgress; _entity.cjiItemTotal = tmp_cjiItemTotal; _entity.cjiRecursiveProgress = tmp_cjiRecursiveProgress; _entity.cjiRecursiveTotal = tmp_cjiRecursiveTotal; _entity.cjiStatus = tmp_cjiStatus; _entity.cjiRecursiveStatus = tmp_cjiRecursiveStatus; _entity.cjiConnectivityNeeded = tmp_cjiConnectivityNeeded; _entity.cjiPluginId = tmp_cjiPluginId; _entity.cjiAttemptCount = tmp_cjiAttemptCount; _entity.cjiParentCjiUid = tmp_cjiParentCjiUid; _entity.cjiServerJobId = tmp_cjiServerJobId; _entity.cjiStartTime = tmp_cjiStartTime; _entity.cjiFinishTime = tmp_cjiFinishTime; _entity.cjiUploadSessionUid = tmp_cjiUploadSessionUid; _entity.cjiContentDeletedOnCancellation = tmp_cjiContentDeletedOnCancellation; _entity.cjiContainerProcessed = tmp_cjiContainerProcessed; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this$ContentJobItemDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentJobItemDao_JdbcKt = this$ContentJobItemDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentJobItem) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT *\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentJobItemDao_JdbcKt._db, _stmtConfig, ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this$ContentJobItemDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this$ContentJobItemDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.getJobItemByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ContentJobItem'), ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this, uid)); return _result; }; function ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getContainerUidByJobItemUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$getContainerUidByJobItemUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContainerUidByJobItemUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContainerUidByJobItemUid_s8cxhz$.prototype.constructor = Coroutine$getContainerUidByJobItemUid_s8cxhz$; Coroutine$getContainerUidByJobItemUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT cjiContainerUid\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT cjiContainerUid\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.getContainerUidByJobItemUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$getContainerUidByJobItemUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(closure$newStatus_0, closure$jobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newStatus = closure$newStatus_0; this.local$closure$jobUid = closure$jobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newStatus); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$jobUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$newStatus); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(closure$newStatus_0, closure$jobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(closure$newStatus_0, closure$jobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAllStatusesByJobUid_yhmem3$($this, jobUid_0, newStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobUid = jobUid_0; this.local$newStatus = newStatus_0; } Coroutine$updateAllStatusesByJobUid_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAllStatusesByJobUid_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAllStatusesByJobUid_yhmem3$.prototype.constructor = Coroutine$updateAllStatusesByJobUid_yhmem3$; Coroutine$updateAllStatusesByJobUid_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStatus = ?\n | WHERE cjiJobUid = ?\n | AND cjiStatus != ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStatus = ?\n | WHERE cjiJobUid = ?\n | AND cjiStatus != ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(this.local$newStatus, this.local$jobUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateAllStatusesByJobUid_yhmem3$ = function (jobUid_0, newStatus_0, continuation_0, suspended) { var instance = new Coroutine$updateAllStatusesByJobUid_yhmem3$(this, jobUid_0, newStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(closure$jobUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobUid = closure$jobUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(closure$jobUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(closure$jobUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllContainersByJobUid_s8cxhz$($this, jobUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$jobUid = jobUid_0; } Coroutine$findAllContainersByJobUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllContainersByJobUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllContainersByJobUid_s8cxhz$.prototype.constructor = Coroutine$findAllContainersByJobUid_s8cxhz$; Coroutine$findAllContainersByJobUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.cjiContainerUid\n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ContentJobItem.cjiContainerUid\n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(this.local$jobUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.findAllContainersByJobUid_s8cxhz$ = function (jobUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllContainersByJobUid_s8cxhz$(this, jobUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContentJobItem (cjiUid, cjiJobUid, sourceUri, cjiIsLeaf, cjiContentEntryUid, cjiParentContentEntryUid, cjiContainerUid, cjiItemProgress, cjiItemTotal, cjiRecursiveProgress, cjiRecursiveTotal, cjiStatus, cjiRecursiveStatus, cjiConnectivityNeeded, cjiPluginId, cjiAttemptCount, cjiParentCjiUid, cjiServerJobId, cjiStartTime, cjiFinishTime, cjiUploadSessionUid, cjiContentDeletedOnCancellation, cjiContainerProcessed) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cjiUid'; } else tmp$ = ''; return "INSERT INTO ContentJobItem (cjiUid, cjiJobUid, sourceUri, cjiIsLeaf, cjiContentEntryUid, cjiParentContentEntryUid, cjiContainerUid, cjiItemProgress, cjiItemTotal, cjiRecursiveProgress, cjiRecursiveTotal, cjiStatus, cjiRecursiveStatus, cjiConnectivityNeeded, cjiPluginId, cjiAttemptCount, cjiParentCjiUid, cjiServerJobId, cjiStartTime, cjiFinishTime, cjiUploadSessionUid, cjiContentDeletedOnCancellation, cjiContainerProcessed) VALUES(COALESCE(?,nextval('ContentJobItem_cjiUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cjiUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cjiUid); } stmt.setLong_6svq3l$(2, entity.cjiJobUid); stmt.setString_vqvrqt$(3, entity.sourceUri); stmt.setBoolean_fzusl$(4, entity.cjiIsLeaf); stmt.setLong_6svq3l$(5, entity.cjiContentEntryUid); stmt.setLong_6svq3l$(6, entity.cjiParentContentEntryUid); stmt.setLong_6svq3l$(7, entity.cjiContainerUid); stmt.setLong_6svq3l$(8, entity.cjiItemProgress); stmt.setLong_6svq3l$(9, entity.cjiItemTotal); stmt.setLong_6svq3l$(10, entity.cjiRecursiveProgress); stmt.setLong_6svq3l$(11, entity.cjiRecursiveTotal); stmt.setInt_vux9f0$(12, entity.cjiStatus); stmt.setInt_vux9f0$(13, entity.cjiRecursiveStatus); stmt.setBoolean_fzusl$(14, entity.cjiConnectivityNeeded); stmt.setInt_vux9f0$(15, entity.cjiPluginId); stmt.setInt_vux9f0$(16, entity.cjiAttemptCount); stmt.setLong_6svq3l$(17, entity.cjiParentCjiUid); stmt.setLong_6svq3l$(18, entity.cjiServerJobId); stmt.setLong_6svq3l$(19, entity.cjiStartTime); stmt.setLong_6svq3l$(20, entity.cjiFinishTime); stmt.setString_vqvrqt$(21, entity.cjiUploadSessionUid); stmt.setBoolean_fzusl$(22, entity.cjiContentDeletedOnCancellation); stmt.setBoolean_fzusl$(23, entity.cjiContainerProcessed); }; ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentJobItemDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemDao_JdbcKt', interfaces: [ContentJobItemDao]}; function ContextXObjectStatementJoinDao_JdbcKt(_db) { ContextXObjectStatementJoinDao.call(this); this._db = _db; this._insertAdapterContextXObjectStatementJoin_ = new ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral(this._db); } function Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_59($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_59.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_59.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_59.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_59; Coroutine$replicateOnNewNode_s8cxhz$_59.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | REPLACE INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjPk,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | JOIN ContextXObjectStatementJoin\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | WHERE UserSession.usClientNodeId = ?\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | --notpsql\n | strftime('%s', 'now') * 1000\n | --endnotpsql\n | /*psql\n | ROUND(EXTRACT(epoch from NOW())*1000)\n | */\n | - (30 * CAST(86400000 AS BIGINT))) \n | --notpsql \n | AND ContextXObjectStatementJoin.contextXObjectLct != COALESCE(\n | (SELECT cxosjVersionId\n | FROM ContextXObjectStatementJoinReplicate\n | WHERE cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | AND cxosjDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | */ \n | \n "), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjPk,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | JOIN ContextXObjectStatementJoin\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | WHERE UserSession.usClientNodeId = ?\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | \n | ROUND(EXTRACT(epoch from NOW())*1000)\n | \n | - (30 * CAST(86400000 AS BIGINT))) \n | ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_59(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_56($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_56.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_56.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_56.prototype.constructor = Coroutine$replicateOnChange_56; Coroutine$replicateOnChange_56.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjUid,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM ChangeLog\n | JOIN ContextXObjectStatementJoin\n | ON ChangeLog.chTableId = 66\n | AND ChangeLog.chEntityPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | JOIN StatementEntity\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | --notpsql \n | AND ContextXObjectStatementJoin.contextXObjectLct != COALESCE(\n | (SELECT cxosjVersionId\n | FROM ContextXObjectStatementJoinReplicate\n | WHERE cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | AND cxosjDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql\n | /*psql ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjUid,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM ChangeLog\n | JOIN ContextXObjectStatementJoin\n | ON ChangeLog.chTableId = 66\n | AND ChangeLog.chEntityPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | JOIN StatementEntity\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_56(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_contextXObjectStatementJoinUid = _resultSet.getLong_61zpoe$('contextXObjectStatementJoinUid'); var tmp_contextActivityFlag = _resultSet.getInt_61zpoe$('contextActivityFlag'); var tmp_contextStatementUid = _resultSet.getLong_61zpoe$('contextStatementUid'); var tmp_contextXObjectUid = _resultSet.getLong_61zpoe$('contextXObjectUid'); var tmp_verbMasterChangeSeqNum = _resultSet.getLong_61zpoe$('verbMasterChangeSeqNum'); var tmp_verbLocalChangeSeqNum = _resultSet.getLong_61zpoe$('verbLocalChangeSeqNum'); var tmp_verbLastChangedBy = _resultSet.getInt_61zpoe$('verbLastChangedBy'); var tmp_contextXObjectLct = _resultSet.getLong_61zpoe$('contextXObjectLct'); var _entity = new ContextXObjectStatementJoin(); _entity.contextXObjectStatementJoinUid = tmp_contextXObjectStatementJoinUid; _entity.contextActivityFlag = tmp_contextActivityFlag; _entity.contextStatementUid = tmp_contextStatementUid; _entity.contextXObjectUid = tmp_contextXObjectUid; _entity.verbMasterChangeSeqNum = tmp_verbMasterChangeSeqNum; _entity.verbLocalChangeSeqNum = tmp_verbLocalChangeSeqNum; _entity.verbLastChangedBy = tmp_verbLastChangedBy; _entity.contextXObjectLct = tmp_contextXObjectLct; closure$_result.v = _entity; }return Unit; }; } function ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda(closure$statementUid, closure$objectUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$statementUid); _stmt.setLong_6svq3l$(2, closure$objectUid); useResults(_stmt.executeQuery(), ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda$lambda(closure$_result)); return Unit; }; } ContextXObjectStatementJoinDao_JdbcKt.prototype.findByStatementAndObjectUid_3pjtqy$ = function (statementUid, objectUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContextXObjectStatementJoin) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ContextXObjectStatementJoin where contextStatementUid = ? and contextXObjectUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ContextXObjectStatementJoin where contextStatementUid = ? and contextXObjectUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda(statementUid, objectUid, _result)); return _result.v; }; ContextXObjectStatementJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContextXObjectStatementJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_62($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_62.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_62.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_62.prototype.constructor = Coroutine$insertAsync_62; Coroutine$insertAsync_62.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContextXObjectStatementJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_62(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContextXObjectStatementJoin_.insertList_4ezy5m$(entityList); }; function ContextXObjectStatementJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setInt_vux9f0$(1, _entity.contextActivityFlag); _stmt.setLong_6svq3l$(2, _entity.contextStatementUid); _stmt.setLong_6svq3l$(3, _entity.contextXObjectUid); _stmt.setLong_6svq3l$(4, _entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.verbLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.contextXObjectLct); _stmt.setLong_6svq3l$(8, _entity.contextXObjectStatementJoinUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContextXObjectStatementJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContextXObjectStatementJoin SET contextActivityFlag = ?, contextStatementUid = ?, contextXObjectUid = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, contextXObjectLct = ? WHERE contextXObjectStatementJoinUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContextXObjectStatementJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContextXObjectStatementJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$entity.contextActivityFlag); _stmt.setLong_6svq3l$(2, closure$entity.contextStatementUid); _stmt.setLong_6svq3l$(3, closure$entity.contextXObjectUid); _stmt.setLong_6svq3l$(4, closure$entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.verbLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.contextXObjectLct); _stmt.setLong_6svq3l$(8, closure$entity.contextXObjectStatementJoinUid); return _stmt.executeUpdate(); }; } ContextXObjectStatementJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContextXObjectStatementJoin SET contextActivityFlag = ?, contextStatementUid = ?, contextXObjectUid = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, contextXObjectLct = ? WHERE contextXObjectStatementJoinUid = ?'; prepareAndUseStatement_0(this._db, _sql, ContextXObjectStatementJoinDao_JdbcKt$update$lambda(entity)); }; function ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ContextXObjectStatementJoin (contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING contextXObjectStatementJoinUid'; } else tmp$ = ''; return "INSERT INTO ContextXObjectStatementJoin (contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES(COALESCE(?,nextval('ContextXObjectStatementJoin_contextXObjectStatementJoinUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contextXObjectStatementJoinUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contextXObjectStatementJoinUid); } stmt.setInt_vux9f0$(2, entity.contextActivityFlag); stmt.setLong_6svq3l$(3, entity.contextStatementUid); stmt.setLong_6svq3l$(4, entity.contextXObjectUid); stmt.setLong_6svq3l$(5, entity.verbMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.verbLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.verbLastChangedBy); stmt.setLong_6svq3l$(8, entity.contextXObjectLct); }; ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContextXObjectStatementJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao_JdbcKt', interfaces: [ContextXObjectStatementJoinDao]}; function ContextXObjectStatementJoinDao_ReplicateWrapper(_db, _dao) { ContextXObjectStatementJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_60($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_60.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_60.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_60.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_60; Coroutine$replicateOnNewNode_s8cxhz$_60.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_60(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_57($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_57.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_57.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_57.prototype.constructor = Coroutine$replicateOnChange_57; Coroutine$replicateOnChange_57.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_57(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.findByStatementAndObjectUid_3pjtqy$ = function (statementUid, objectUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_63($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_63.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_63.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_63.prototype.constructor = Coroutine$insertAsync_63; Coroutine$insertAsync_63.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contextXObjectStatementJoinUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(66, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contextXObjectStatementJoinUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contextXObjectLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contextXObjectStatementJoinUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_63(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao_ReplicateWrapper', interfaces: [ContextXObjectStatementJoinDao]}; function ContextXObjectStatementJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContextXObjectStatementJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_61($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_61.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_61.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_61.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_61; Coroutine$replicateOnNewNode_s8cxhz$_61.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_61(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_58($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_58.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_58.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_58.prototype.constructor = Coroutine$replicateOnChange_58; Coroutine$replicateOnChange_58.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_58(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_Repo.prototype.findByStatementAndObjectUid_3pjtqy$ = function (statementUid, objectUid) { var _result = this._dao.findByStatementAndObjectUid_3pjtqy$(statementUid, objectUid); return _result; }; ContextXObjectStatementJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_64($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_64.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_64.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_64.prototype.constructor = Coroutine$insertAsync_64; Coroutine$insertAsync_64.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_64(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContextXObjectStatementJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContextXObjectStatementJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContextXObjectStatementJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao_Repo', interfaces: [ContextXObjectStatementJoinDao]}; function CourseAssignmentMarkDao_JdbcKt(_db) { CourseAssignmentMarkDao.call(this); this._db = _db; this._insertAdapterCourseAssignmentMark_ = new CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral(this._db); } function Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_62($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_62.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_62.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_62.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_62; Coroutine$replicateOnNewNode_s8cxhz$_62.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | ? AS camDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = ?), 0) \n | /*psql ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | ? AS camDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = ?), 0) \n | ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_62(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_59($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_59.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_59.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_59.prototype.constructor = Coroutine$replicateOnChange_59; Coroutine$replicateOnChange_59.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | UserSession.usClientNodeId AS camDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentMark\n | ON ChangeLog.chTableId = 523\n | AND ChangeLog.chEntityPk = CourseAssignmentMark.camUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | UserSession.usClientNodeId AS camDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentMark\n | ON ChangeLog.chTableId = 523\n | AND ChangeLog.chEntityPk = CourseAssignmentMark.camUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_59(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_camUid = _resultSet.getLong_61zpoe$('camUid'); var tmp_camAssignmentUid = _resultSet.getLong_61zpoe$('camAssignmentUid'); var tmp_camSubmitterUid = _resultSet.getLong_61zpoe$('camSubmitterUid'); var tmp_camMark = _resultSet.getFloat_61zpoe$('camMark'); var tmp_camPenalty = _resultSet.getInt_61zpoe$('camPenalty'); var tmp_camLct = _resultSet.getLong_61zpoe$('camLct'); var _entity = new CourseAssignmentMark(); _entity.camUid = tmp_camUid; _entity.camAssignmentUid = tmp_camAssignmentUid; _entity.camSubmitterUid = tmp_camSubmitterUid; _entity.camMark = tmp_camMark; _entity.camPenalty = tmp_camPenalty; _entity.camLct = tmp_camLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this$CourseAssignmentMarkDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentMarkDao_JdbcKt = this$CourseAssignmentMarkDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_liveResult = void 0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseAssignmentMark) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentMark \n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = ?\n | ORDER BY camLct DESC\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentMark \n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = ?\n | ORDER BY camLct DESC\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentMarkDao_JdbcKt._db, _stmtConfig, CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this$CourseAssignmentMarkDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this$CourseAssignmentMarkDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentMarkDao_JdbcKt.prototype.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('CourseAssignmentMark'), CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this, assignmentUid, submitterUid)); return _result; }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_camUid = _resultSet.getLong_61zpoe$('camUid'); var tmp_camAssignmentUid = _resultSet.getLong_61zpoe$('camAssignmentUid'); var tmp_camSubmitterUid = _resultSet.getLong_61zpoe$('camSubmitterUid'); var tmp_camMark = _resultSet.getFloat_61zpoe$('camMark'); var tmp_camPenalty = _resultSet.getInt_61zpoe$('camPenalty'); var tmp_camLct = _resultSet.getLong_61zpoe$('camLct'); var _entity = new CourseAssignmentMark(); _entity.camUid = tmp_camUid; _entity.camAssignmentUid = tmp_camAssignmentUid; _entity.camSubmitterUid = tmp_camSubmitterUid; _entity.camMark = tmp_camMark; _entity.camPenalty = tmp_camPenalty; _entity.camLct = tmp_camLct; closure$_result.v = _entity; }return Unit; }; } function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda(closure$assignmentUid, closure$submitterUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$assignmentUid); _stmt.setLong_6svq3l$(2, closure$submitterUid); useResults(_stmt.executeQuery(), CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda$lambda(closure$_result)); return Unit; }; } CourseAssignmentMarkDao_JdbcKt.prototype.getMarkOfAssignmentForStudent_3pjtqy$ = function (assignmentUid, submitterUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseAssignmentMark) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = ?\n | ORDER BY camLct DESC\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = ?\n | ORDER BY camLct DESC\n | LIMIT 1\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda(assignmentUid, submitterUid, _result)); return _result.v; }; function CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.prototype.constructor = Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$; Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT casSubmitterUid\n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camSubmitterUid = CourseAssignmentSubmission.casSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = ?\n | \n | WHERE CourseAssignmentSubmission.casSubmitterUid != ?\n | AND CourseAssignmentMark.camUid IS NULL\n | GROUP BY casSubmitterUid\n | LIMIT 1),0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT casSubmitterUid\n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camSubmitterUid = CourseAssignmentSubmission.casSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = ?\n | \n | WHERE CourseAssignmentSubmission.casSubmitterUid != ?\n | AND CourseAssignmentMark.camUid IS NULL\n | GROUP BY casSubmitterUid\n | LIMIT 1),0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(this.local$assignmentUid, this.local$submitterUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.findNextSubmitterToMarkForAssignment_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseAssignmentMark_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_65($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_65.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_65.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_65.prototype.constructor = Coroutine$insertAsync_65; Coroutine$insertAsync_65.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentMark_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_65(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseAssignmentMark_.insertList_4ezy5m$(entityList); }; function CourseAssignmentMarkDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.camAssignmentUid); _stmt.setLong_6svq3l$(2, _entity.camSubmitterUid); _stmt.setFloat_24o109$(3, _entity.camMark); _stmt.setInt_vux9f0$(4, _entity.camPenalty); _stmt.setLong_6svq3l$(5, _entity.camLct); _stmt.setLong_6svq3l$(6, _entity.camUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseAssignmentMarkDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseAssignmentMark SET camAssignmentUid = ?, camSubmitterUid = ?, camMark = ?, camPenalty = ?, camLct = ? WHERE camUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseAssignmentMarkDao_JdbcKt$updateList$lambda(entityList)); }; function CourseAssignmentMarkDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.camAssignmentUid); _stmt.setLong_6svq3l$(2, closure$entity.camSubmitterUid); _stmt.setFloat_24o109$(3, closure$entity.camMark); _stmt.setInt_vux9f0$(4, closure$entity.camPenalty); _stmt.setLong_6svq3l$(5, closure$entity.camLct); _stmt.setLong_6svq3l$(6, closure$entity.camUid); return _stmt.executeUpdate(); }; } CourseAssignmentMarkDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseAssignmentMark SET camAssignmentUid = ?, camSubmitterUid = ?, camMark = ?, camPenalty = ?, camLct = ? WHERE camUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseAssignmentMarkDao_JdbcKt$update$lambda(entity)); }; function CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseAssignmentMark (camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING camUid'; } else tmp$ = ''; return "INSERT INTO CourseAssignmentMark (camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES(COALESCE(?,nextval('CourseAssignmentMark_camUid_seq')), ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.camUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.camUid); } stmt.setLong_6svq3l$(2, entity.camAssignmentUid); stmt.setLong_6svq3l$(3, entity.camSubmitterUid); stmt.setFloat_24o109$(4, entity.camMark); stmt.setInt_vux9f0$(5, entity.camPenalty); stmt.setLong_6svq3l$(6, entity.camLct); }; CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseAssignmentMarkDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao_JdbcKt', interfaces: [CourseAssignmentMarkDao]}; function CourseAssignmentMarkDao_ReplicateWrapper(_db, _dao) { CourseAssignmentMarkDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_63($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_63.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_63.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_63.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_63; Coroutine$replicateOnNewNode_s8cxhz$_63.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_63(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_60($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_60.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_60.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_60.prototype.constructor = Coroutine$replicateOnChange_60; Coroutine$replicateOnChange_60.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_60(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$ = function (assignmentUid, submitterUid) { return this._dao_0.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$(assignmentUid, submitterUid); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.getMarkOfAssignmentForStudent_3pjtqy$ = function (assignmentUid, submitterUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.findNextSubmitterToMarkForAssignment_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return this._dao_0.findNextSubmitterToMarkForAssignment_3pjtqy$(assignmentUid, submitterUid, continuation); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_66($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_66.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_66.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_66.prototype.constructor = Coroutine$insertAsync_66; Coroutine$insertAsync_66.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.camUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(523, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.camUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.camLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.camUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_66(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao_ReplicateWrapper', interfaces: [CourseAssignmentMarkDao]}; function CourseAssignmentMarkDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseAssignmentMarkDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_64($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_64.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_64.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_64.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_64; Coroutine$replicateOnNewNode_s8cxhz$_64.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_64(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_61($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_61.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_61.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_61.prototype.constructor = Coroutine$replicateOnChange_61; Coroutine$replicateOnChange_61.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_61(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_Repo.prototype.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$(assignmentUid, submitterUid); return _result; }; CourseAssignmentMarkDao_Repo.prototype.getMarkOfAssignmentForStudent_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getMarkOfAssignmentForStudent_3pjtqy$(assignmentUid, submitterUid); return _result; }; function Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0.prototype.constructor = Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0; Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findNextSubmitterToMarkForAssignment_3pjtqy$(this.local$assignmentUid, this.local$submitterUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.findNextSubmitterToMarkForAssignment_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$_0(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_67($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_67.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_67.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_67.prototype.constructor = Coroutine$insertAsync_67; Coroutine$insertAsync_67.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_67(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseAssignmentMarkDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseAssignmentMarkDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseAssignmentMarkDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao_Repo', interfaces: [CourseAssignmentMarkDao]}; function CourseAssignmentSubmissionAttachmentDao_JdbcKt(_db) { CourseAssignmentSubmissionAttachmentDao.call(this); this._db = _db; this._insertAdapterCourseAssignmentSubmissionAttachment_ = new CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral(this._db); } function Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_65($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_65.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_65.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_65.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_65; Coroutine$replicateOnNewNode_s8cxhz$_65.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | ? AS casaDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = ?), 0) \n | /*psql ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | ? AS casaDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = ?), 0) \n | ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_65(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_62($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_62.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_62.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_62.prototype.constructor = Coroutine$replicateOnChange_62; Coroutine$replicateOnChange_62.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | UserSession.usClientNodeId AS casaDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmissionAttachment\n | ON ChangeLog.chTableId = 90\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmissionAttachment.casaUid\n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid \n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | UserSession.usClientNodeId AS casaDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmissionAttachment\n | ON ChangeLog.chTableId = 90\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmissionAttachment.casaUid\n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid \n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_62(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_5($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5.prototype.constructor = Coroutine$insertListAsync_5; Coroutine$insertListAsync_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmissionAttachment_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseAssignmentSubmissionAttachment_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_68($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_68.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_68.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_68.prototype.constructor = Coroutine$insertAsync_68; Coroutine$insertAsync_68.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmissionAttachment_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_68(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseAssignmentSubmissionAttachment_.insertList_4ezy5m$(entityList); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.casaSubmissionUid); _stmt.setString_vqvrqt$(2, _entity.casaMimeType); _stmt.setString_vqvrqt$(3, _entity.casaFileName); _stmt.setString_vqvrqt$(4, _entity.casaUri); _stmt.setString_vqvrqt$(5, _entity.casaMd5); _stmt.setInt_vux9f0$(6, _entity.casaSize); _stmt.setLong_6svq3l$(7, _entity.casaTimestamp); _stmt.setLong_6svq3l$(8, _entity.casaUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseAssignmentSubmissionAttachment SET casaSubmissionUid = ?, casaMimeType = ?, casaFileName = ?, casaUri = ?, casaMd5 = ?, casaSize = ?, casaTimestamp = ? WHERE casaUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseAssignmentSubmissionAttachmentDao_JdbcKt$updateList$lambda(entityList)); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.casaSubmissionUid); _stmt.setString_vqvrqt$(2, closure$entity.casaMimeType); _stmt.setString_vqvrqt$(3, closure$entity.casaFileName); _stmt.setString_vqvrqt$(4, closure$entity.casaUri); _stmt.setString_vqvrqt$(5, closure$entity.casaMd5); _stmt.setInt_vux9f0$(6, closure$entity.casaSize); _stmt.setLong_6svq3l$(7, closure$entity.casaTimestamp); _stmt.setLong_6svq3l$(8, closure$entity.casaUid); return _stmt.executeUpdate(); }; } CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseAssignmentSubmissionAttachment SET casaSubmissionUid = ?, casaMimeType = ?, casaFileName = ?, casaUri = ?, casaMd5 = ?, casaSize = ?, casaTimestamp = ? WHERE casaUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseAssignmentSubmissionAttachmentDao_JdbcKt$update$lambda(entity)); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseAssignmentSubmissionAttachment (casaUid, casaSubmissionUid, casaMimeType, casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING casaUid'; } else tmp$ = ''; return "INSERT INTO CourseAssignmentSubmissionAttachment (casaUid, casaSubmissionUid, casaMimeType, casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES(COALESCE(?,nextval('CourseAssignmentSubmissionAttachment_casaUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.casaUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.casaUid); } stmt.setLong_6svq3l$(2, entity.casaSubmissionUid); stmt.setString_vqvrqt$(3, entity.casaMimeType); stmt.setString_vqvrqt$(4, entity.casaFileName); stmt.setString_vqvrqt$(5, entity.casaUri); stmt.setString_vqvrqt$(6, entity.casaMd5); stmt.setInt_vux9f0$(7, entity.casaSize); stmt.setLong_6svq3l$(8, entity.casaTimestamp); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseAssignmentSubmissionAttachmentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao_JdbcKt', interfaces: [CourseAssignmentSubmissionAttachmentDao]}; function CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper(_db, _dao) { CourseAssignmentSubmissionAttachmentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_66($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_66.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_66.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_66.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_66; Coroutine$replicateOnNewNode_s8cxhz$_66.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_66(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_63($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_63.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_63.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_63.prototype.constructor = Coroutine$replicateOnChange_63; Coroutine$replicateOnChange_63.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_63(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_6($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tmp$ = void 0; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6.prototype.constructor = Coroutine$insertListAsync_6; Coroutine$insertListAsync_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = storeAttachment(this.$this._db_0, new CourseAssignmentSubmissionAttachment_EwaAdapter(element), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 5; continue; case 5: if (!this.local$$receiver.hasNext()) { this.state_0 = 8; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.casaUid, L0)) { this.state_0 = 6; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(90, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 7; continue; } case 6: var _newPk = this.result_0; this.local$element.casaUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 7; continue; case 7: this.local$element.casaTimestamp = systemTimeInMillis(); this.state_0 = 5; continue; case 8: this.state_0 = 9; this.result_0 = this.$this._dao_0.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 9: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_69($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_69.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_69.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_69.prototype.constructor = Coroutine$insertAsync_69; Coroutine$insertAsync_69.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new CourseAssignmentSubmissionAttachment_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.casaUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(90, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.casaUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.casaTimestamp = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.casaUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_69(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper', interfaces: [CourseAssignmentSubmissionAttachmentDao]}; function CourseAssignmentSubmissionAttachmentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseAssignmentSubmissionAttachmentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_67($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_67.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_67.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_67.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_67; Coroutine$replicateOnNewNode_s8cxhz$_67.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_67(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_64($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_64.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_64.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_64.prototype.constructor = Coroutine$replicateOnChange_64; Coroutine$replicateOnChange_64.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_64(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_7($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7.prototype.constructor = Coroutine$insertListAsync_7; Coroutine$insertListAsync_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_70($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_70.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_70.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_70.prototype.constructor = Coroutine$insertAsync_70; Coroutine$insertAsync_70.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_70(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseAssignmentSubmissionAttachmentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao_Repo', interfaces: [CourseAssignmentSubmissionAttachmentDao]}; function CourseAssignmentSubmissionDao_JdbcKt(_db) { CourseAssignmentSubmissionDao.call(this); this._db = _db; this._insertAdapterCourseAssignmentSubmission_ = new CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral(this._db); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_68($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_68.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_68.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_68.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_68; Coroutine$replicateOnNewNode_s8cxhz$_68.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | ? AS casDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = ?), 0) \n | /*psql ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | ? AS casDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = ?), 0) \n | ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_68(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_65($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_65.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_65.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_65.prototype.constructor = Coroutine$replicateOnChange_65; Coroutine$replicateOnChange_65.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | UserSession.usClientNodeId AS casDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmission\n | ON ChangeLog.chTableId = 522\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmission.casUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | UserSession.usClientNodeId AS casDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmission\n | ON ChangeLog.chTableId = 522\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmission.casUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_65(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_8($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_8.prototype.constructor = Coroutine$insertListAsync_8; Coroutine$insertListAsync_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmission_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_8(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral(this$CourseAssignmentSubmissionDao_JdbcKt, closure$assignmentUid, closure$submitterUid) { this.this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt; this.closure$assignmentUid = closure$assignmentUid; this.closure$submitterUid = closure$submitterUid; DoorDataSourceFactory.call(this); } function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_casUid = _resultSet.getLong_61zpoe$('casUid'); var tmp_casAssignmentUid = _resultSet.getLong_61zpoe$('casAssignmentUid'); var tmp_casSubmitterUid = _resultSet.getLong_61zpoe$('casSubmitterUid'); var tmp_casSubmitterPersonUid = _resultSet.getLong_61zpoe$('casSubmitterPersonUid'); var tmp_casText = _resultSet.getString_61zpoe$('casText'); var tmp_casType = _resultSet.getInt_61zpoe$('casType'); var tmp_casTimestamp = _resultSet.getLong_61zpoe$('casTimestamp'); var _entity = new CourseAssignmentSubmissionWithAttachment(); _entity.casUid = tmp_casUid; _entity.casAssignmentUid = tmp_casAssignmentUid; _entity.casSubmitterUid = tmp_casSubmitterUid; _entity.casSubmitterPersonUid = tmp_casSubmitterPersonUid; _entity.casText = tmp_casText; _entity.casType = tmp_casType; _entity.casTimestamp = tmp_casTimestamp; var _attachment_nullFieldCount = 0; var tmp_casaUid = _resultSet.getLong_61zpoe$('casaUid'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaSubmissionUid = _resultSet.getLong_61zpoe$('casaSubmissionUid'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaMimeType = _resultSet.getString_61zpoe$('casaMimeType'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaFileName = _resultSet.getString_61zpoe$('casaFileName'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaUri = _resultSet.getString_61zpoe$('casaUri'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaMd5 = _resultSet.getString_61zpoe$('casaMd5'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaSize = _resultSet.getInt_61zpoe$('casaSize'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }var tmp_casaTimestamp = _resultSet.getLong_61zpoe$('casaTimestamp'); if (_resultSet.wasNull()) { _attachment_nullFieldCount = _attachment_nullFieldCount + 1 | 0; }if (_attachment_nullFieldCount < 8) { if (_entity.attachment == null) { _entity.attachment = new CourseAssignmentSubmissionAttachment(); }ensureNotNull(_entity.attachment).casaUid = tmp_casaUid; ensureNotNull(_entity.attachment).casaSubmissionUid = tmp_casaSubmissionUid; ensureNotNull(_entity.attachment).casaMimeType = tmp_casaMimeType; ensureNotNull(_entity.attachment).casaFileName = tmp_casaFileName; ensureNotNull(_entity.attachment).casaUri = tmp_casaUri; ensureNotNull(_entity.attachment).casaMd5 = tmp_casaMd5; ensureNotNull(_entity.attachment).casaSize = tmp_casaSize; ensureNotNull(_entity.attachment).casaTimestamp = tmp_casaTimestamp; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT * \n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | \n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT * \n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | \n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CourseAssignmentSubmissionDao_JdbcKt._db, listOf(['CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment']), CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this.this$CourseAssignmentSubmissionDao_JdbcKt, this.closure$assignmentUid, this.closure$submitterUid, _limit, _offset)); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_liveResult = void 0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT * \n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | \n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT * \n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | \n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CourseAssignmentSubmissionDao_JdbcKt._db, listOf(['CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment']), CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this.this$CourseAssignmentSubmissionDao_JdbcKt, this.closure$assignmentUid, this.closure$submitterUid)); }; CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CourseAssignmentSubmissionDao_JdbcKt.prototype.getAllSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = new CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral(this, assignmentUid, submitterUid); return _result; }; function CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$countFileSubmissionFromStudent_3pjtqy$($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$countFileSubmissionFromStudent_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countFileSubmissionFromStudent_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countFileSubmissionFromStudent_3pjtqy$.prototype.constructor = Coroutine$countFileSubmissionFromStudent_3pjtqy$; Coroutine$countFileSubmissionFromStudent_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Count(casUid)\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | AND casType = 2\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Count(casUid)\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | AND casType = 2\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(this.local$assignmentUid, this.local$submitterUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.countFileSubmissionFromStudent_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$countFileSubmissionFromStudent_3pjtqy$(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$countSubmissionsFromSubmitter_3pjtqy$($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$countSubmissionsFromSubmitter_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countSubmissionsFromSubmitter_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countSubmissionsFromSubmitter_3pjtqy$.prototype.constructor = Coroutine$countSubmissionsFromSubmitter_3pjtqy$; Coroutine$countSubmissionsFromSubmitter_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Count(casUid)\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Count(casUid)\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(this.local$assignmentUid, this.local$submitterUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.countSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$countSubmissionsFromSubmitter_3pjtqy$(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_liveResult = void 0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT (CASE WHEN CourseAssignmentMark.camAssignmentUid IS NOT NULL \n | THEN 2\n | ELSE 1 \n | END) AS status\n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ?\n | AND CourseAssignmentMark.camSubmitterUid = ?\n | \n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentSubmission.casSubmitterUid = ?\n | LIMIT 1\n | ),0) AS Status\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT (CASE WHEN CourseAssignmentMark.camAssignmentUid IS NOT NULL \n | THEN 2\n | ELSE 1 \n | END) AS status\n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ?\n | AND CourseAssignmentMark.camSubmitterUid = ?\n | \n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentSubmission.casSubmitterUid = ?\n | LIMIT 1\n | ),0) AS Status\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.getStatusOfAssignmentForSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = new DoorLiveDataImpl(this._db, listOf(['CourseAssignmentSubmission', 'CourseAssignmentMark']), CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this, assignmentUid, submitterUid)); return _result; }; function CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_casUid = _resultSet.getLong_61zpoe$('casUid'); var tmp_casAssignmentUid = _resultSet.getLong_61zpoe$('casAssignmentUid'); var tmp_casSubmitterUid = _resultSet.getLong_61zpoe$('casSubmitterUid'); var tmp_casSubmitterPersonUid = _resultSet.getLong_61zpoe$('casSubmitterPersonUid'); var tmp_casText = _resultSet.getString_61zpoe$('casText'); var tmp_casType = _resultSet.getInt_61zpoe$('casType'); var tmp_casTimestamp = _resultSet.getLong_61zpoe$('casTimestamp'); var _entity = new CourseAssignmentSubmission(); _entity.casUid = tmp_casUid; _entity.casAssignmentUid = tmp_casAssignmentUid; _entity.casSubmitterUid = tmp_casSubmitterUid; _entity.casSubmitterPersonUid = tmp_casSubmitterPersonUid; _entity.casText = tmp_casText; _entity.casType = tmp_casType; _entity.casTimestamp = tmp_casTimestamp; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findLastSubmissionFromStudent_3pjtqy$($this, submitterUid_0, assignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$submitterUid = submitterUid_0; this.local$assignmentUid = assignmentUid_0; } Coroutine$findLastSubmissionFromStudent_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLastSubmissionFromStudent_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLastSubmissionFromStudent_3pjtqy$.prototype.constructor = Coroutine$findLastSubmissionFromStudent_3pjtqy$; Coroutine$findLastSubmissionFromStudent_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseAssignmentSubmission) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentSubmission\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentSubmission.casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentSubmission\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentSubmission.casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(this.local$assignmentUid, this.local$submitterUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.findLastSubmissionFromStudent_3pjtqy$ = function (submitterUid_0, assignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$findLastSubmissionFromStudent_3pjtqy$(this, submitterUid_0, assignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(closure$assignmentUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(closure$assignmentUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(closure$assignmentUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$_liveResult = void 0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT NOT EXISTS(SELECT 1\n | FROM CourseAssignmentSubmission\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | LIMIT 1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT NOT EXISTS(SELECT 1\n | FROM CourseAssignmentSubmission\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | LIMIT 1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, _stmtConfig, CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(this.local$closure$assignmentUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.checkNoSubmissionsMade_s8cxhz$ = function (assignmentUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('CourseAssignmentSubmission'), CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this, assignmentUid)); return _result; }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseAssignmentSubmission_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_71($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_71.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_71.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_71.prototype.constructor = Coroutine$insertAsync_71; Coroutine$insertAsync_71.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmission_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_71(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseAssignmentSubmission_.insertList_4ezy5m$(entityList); }; function CourseAssignmentSubmissionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.casAssignmentUid); _stmt.setLong_6svq3l$(2, _entity.casSubmitterUid); _stmt.setLong_6svq3l$(3, _entity.casSubmitterPersonUid); _stmt.setString_vqvrqt$(4, _entity.casText); _stmt.setInt_vux9f0$(5, _entity.casType); _stmt.setLong_6svq3l$(6, _entity.casTimestamp); _stmt.setLong_6svq3l$(7, _entity.casUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseAssignmentSubmission SET casAssignmentUid = ?, casSubmitterUid = ?, casSubmitterPersonUid = ?, casText = ?, casType = ?, casTimestamp = ? WHERE casUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseAssignmentSubmissionDao_JdbcKt$updateList$lambda(entityList)); }; function CourseAssignmentSubmissionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.casAssignmentUid); _stmt.setLong_6svq3l$(2, closure$entity.casSubmitterUid); _stmt.setLong_6svq3l$(3, closure$entity.casSubmitterPersonUid); _stmt.setString_vqvrqt$(4, closure$entity.casText); _stmt.setInt_vux9f0$(5, closure$entity.casType); _stmt.setLong_6svq3l$(6, closure$entity.casTimestamp); _stmt.setLong_6svq3l$(7, closure$entity.casUid); return _stmt.executeUpdate(); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseAssignmentSubmission SET casAssignmentUid = ?, casSubmitterUid = ?, casSubmitterPersonUid = ?, casText = ?, casType = ?, casTimestamp = ? WHERE casUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseAssignmentSubmissionDao_JdbcKt$update$lambda(entity)); }; function CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseAssignmentSubmission (casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING casUid'; } else tmp$ = ''; return "INSERT INTO CourseAssignmentSubmission (casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES(COALESCE(?,nextval('CourseAssignmentSubmission_casUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.casUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.casUid); } stmt.setLong_6svq3l$(2, entity.casAssignmentUid); stmt.setLong_6svq3l$(3, entity.casSubmitterUid); stmt.setLong_6svq3l$(4, entity.casSubmitterPersonUid); stmt.setString_vqvrqt$(5, entity.casText); stmt.setInt_vux9f0$(6, entity.casType); stmt.setLong_6svq3l$(7, entity.casTimestamp); }; CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseAssignmentSubmissionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao_JdbcKt', interfaces: [CourseAssignmentSubmissionDao]}; function CourseAssignmentSubmissionDao_ReplicateWrapper(_db, _dao) { CourseAssignmentSubmissionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_69($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_69.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_69.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_69.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_69; Coroutine$replicateOnNewNode_s8cxhz$_69.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_69(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_66($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_66.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_66.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_66.prototype.constructor = Coroutine$replicateOnChange_66; Coroutine$replicateOnChange_66.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_66(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_9($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_9.prototype.constructor = Coroutine$insertListAsync_9; Coroutine$insertListAsync_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.casUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(522, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.casUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.casTimestamp = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_9(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.getAllSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { return this._dao_0.getAllSubmissionsFromSubmitter_3pjtqy$(assignmentUid, submitterUid); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.countFileSubmissionFromStudent_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return this._dao_0.countFileSubmissionFromStudent_3pjtqy$(assignmentUid, submitterUid, continuation); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.countSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return this._dao_0.countSubmissionsFromSubmitter_3pjtqy$(assignmentUid, submitterUid, continuation); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.getStatusOfAssignmentForSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { return this._dao_0.getStatusOfAssignmentForSubmitter_3pjtqy$(assignmentUid, submitterUid); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.findLastSubmissionFromStudent_3pjtqy$ = function (submitterUid, assignmentUid, continuation) { return this._dao_0.findLastSubmissionFromStudent_3pjtqy$(submitterUid, assignmentUid, continuation); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.checkNoSubmissionsMade_s8cxhz$ = function (assignmentUid) { return this._dao_0.checkNoSubmissionsMade_s8cxhz$(assignmentUid); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_72($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_72.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_72.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_72.prototype.constructor = Coroutine$insertAsync_72; Coroutine$insertAsync_72.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.casUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(522, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.casUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.casTimestamp = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.casUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_72(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao_ReplicateWrapper', interfaces: [CourseAssignmentSubmissionDao]}; function CourseAssignmentSubmissionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseAssignmentSubmissionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_70($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_70.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_70.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_70.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_70; Coroutine$replicateOnNewNode_s8cxhz$_70.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_70(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_67($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_67.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_67.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_67.prototype.constructor = Coroutine$replicateOnChange_67; Coroutine$replicateOnChange_67.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_67(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_10($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_10.prototype.constructor = Coroutine$insertListAsync_10; Coroutine$insertListAsync_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_10(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.getAllSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getAllSubmissionsFromSubmitter_3pjtqy$(assignmentUid, submitterUid); return _result; }; function Coroutine$countFileSubmissionFromStudent_3pjtqy$_0($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$countFileSubmissionFromStudent_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countFileSubmissionFromStudent_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countFileSubmissionFromStudent_3pjtqy$_0.prototype.constructor = Coroutine$countFileSubmissionFromStudent_3pjtqy$_0; Coroutine$countFileSubmissionFromStudent_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.countFileSubmissionFromStudent_3pjtqy$(this.local$assignmentUid, this.local$submitterUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.countFileSubmissionFromStudent_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$countFileSubmissionFromStudent_3pjtqy$_0(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0.prototype.constructor = Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0; Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.countSubmissionsFromSubmitter_3pjtqy$(this.local$assignmentUid, this.local$submitterUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.countSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$countSubmissionsFromSubmitter_3pjtqy$_0(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.getStatusOfAssignmentForSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getStatusOfAssignmentForSubmitter_3pjtqy$(assignmentUid, submitterUid); return _result; }; function Coroutine$findLastSubmissionFromStudent_3pjtqy$_0($this, submitterUid_0, assignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$submitterUid = submitterUid_0; this.local$assignmentUid = assignmentUid_0; } Coroutine$findLastSubmissionFromStudent_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLastSubmissionFromStudent_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLastSubmissionFromStudent_3pjtqy$_0.prototype.constructor = Coroutine$findLastSubmissionFromStudent_3pjtqy$_0; Coroutine$findLastSubmissionFromStudent_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findLastSubmissionFromStudent_3pjtqy$(this.local$submitterUid, this.local$assignmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.findLastSubmissionFromStudent_3pjtqy$ = function (submitterUid_0, assignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$findLastSubmissionFromStudent_3pjtqy$_0(this, submitterUid_0, assignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.checkNoSubmissionsMade_s8cxhz$ = function (assignmentUid) { var _result = this._dao.checkNoSubmissionsMade_s8cxhz$(assignmentUid); return _result; }; CourseAssignmentSubmissionDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_73($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_73.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_73.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_73.prototype.constructor = Coroutine$insertAsync_73; Coroutine$insertAsync_73.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_73(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseAssignmentSubmissionDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseAssignmentSubmissionDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseAssignmentSubmissionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao_Repo', interfaces: [CourseAssignmentSubmissionDao]}; function CourseBlockDao_JdbcKt(_db) { CourseBlockDao.call(this); this._db = _db; this._insertAdapterCourseBlock_upsert = new CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral(this._db); this._insertAdapterCourseBlock_ = new CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral(this._db); } function Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_71($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_71.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_71.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_71.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_71; Coroutine$replicateOnNewNode_s8cxhz$_71.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | ? AS cbDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseBlock\n | ON CourseBlock.cbClazzUid = Clazz.clazzUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = ?), 0) \n | /*psql ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | ? AS cbDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseBlock\n | ON CourseBlock.cbClazzUid = Clazz.clazzUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = ?), 0) \n | ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_71(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_68($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_68.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_68.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_68.prototype.constructor = Coroutine$replicateOnChange_68; Coroutine$replicateOnChange_68.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | UserSession.usClientNodeId AS cbDestination\n | FROM ChangeLog\n | JOIN CourseBlock\n | ON ChangeLog.chTableId = 124\n | AND ChangeLog.chEntityPk = CourseBlock.cbUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseBlock.cbClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | UserSession.usClientNodeId AS cbDestination\n | FROM ChangeLog\n | JOIN CourseBlock\n | ON ChangeLog.chTableId = 124\n | AND ChangeLog.chEntityPk = CourseBlock.cbUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseBlock.cbClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseBlockDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_68(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cbUid = _resultSet.getLong_61zpoe$('cbUid'); var tmp_cbType = _resultSet.getInt_61zpoe$('cbType'); var tmp_cbIndentLevel = _resultSet.getInt_61zpoe$('cbIndentLevel'); var tmp_cbModuleParentBlockUid = _resultSet.getLong_61zpoe$('cbModuleParentBlockUid'); var tmp_cbTitle = _resultSet.getString_61zpoe$('cbTitle'); var tmp_cbDescription = _resultSet.getString_61zpoe$('cbDescription'); var tmp_cbCompletionCriteria = _resultSet.getInt_61zpoe$('cbCompletionCriteria'); var tmp_cbHideUntilDate = _resultSet.getLong_61zpoe$('cbHideUntilDate'); var tmp_cbDeadlineDate = _resultSet.getLong_61zpoe$('cbDeadlineDate'); var tmp_cbLateSubmissionPenalty = _resultSet.getInt_61zpoe$('cbLateSubmissionPenalty'); var tmp_cbGracePeriodDate = _resultSet.getLong_61zpoe$('cbGracePeriodDate'); var tmp_cbMaxPoints = _resultSet.getInt_61zpoe$('cbMaxPoints'); var tmp_cbMinPoints = _resultSet.getInt_61zpoe$('cbMinPoints'); var tmp_cbIndex = _resultSet.getInt_61zpoe$('cbIndex'); var tmp_cbClazzUid = _resultSet.getLong_61zpoe$('cbClazzUid'); var tmp_cbActive = _resultSet.getBoolean_61zpoe$('cbActive'); var tmp_cbHidden = _resultSet.getBoolean_61zpoe$('cbHidden'); var tmp_cbEntityUid = _resultSet.getLong_61zpoe$('cbEntityUid'); var tmp_cbLct = _resultSet.getLong_61zpoe$('cbLct'); var _entity = new CourseBlock(); _entity.cbUid = tmp_cbUid; _entity.cbType = tmp_cbType; _entity.cbIndentLevel = tmp_cbIndentLevel; _entity.cbModuleParentBlockUid = tmp_cbModuleParentBlockUid; _entity.cbTitle = tmp_cbTitle; _entity.cbDescription = tmp_cbDescription; _entity.cbCompletionCriteria = tmp_cbCompletionCriteria; _entity.cbHideUntilDate = tmp_cbHideUntilDate; _entity.cbDeadlineDate = tmp_cbDeadlineDate; _entity.cbLateSubmissionPenalty = tmp_cbLateSubmissionPenalty; _entity.cbGracePeriodDate = tmp_cbGracePeriodDate; _entity.cbMaxPoints = tmp_cbMaxPoints; _entity.cbMinPoints = tmp_cbMinPoints; _entity.cbIndex = tmp_cbIndex; _entity.cbClazzUid = tmp_cbClazzUid; _entity.cbActive = tmp_cbActive; _entity.cbHidden = tmp_cbHidden; _entity.cbEntityUid = tmp_cbEntityUid; _entity.cbLct = tmp_cbLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid.prototype.constructor = Coroutine$findByUid; Coroutine$findByUid.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseBlock) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CourseBlock WHERE cbUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CourseBlock WHERE cbUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseBlockDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entity.cbType); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.cbIndentLevel); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.cbModuleParentBlockUid); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.cbTitle); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.cbDescription); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.cbCompletionCriteria); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.cbHideUntilDate); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.cbDeadlineDate); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.cbLateSubmissionPenalty); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.cbGracePeriodDate); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$entity.cbMaxPoints); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$entity.cbMinPoints); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$entity.cbIndex); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.cbClazzUid); this.local$_stmt.setBoolean_fzusl$(15, this.local$closure$entity.cbActive); this.local$_stmt.setBoolean_fzusl$(16, this.local$closure$entity.cbHidden); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.cbEntityUid); this.local$_stmt.setLong_6svq3l$(18, this.local$closure$entity.cbLct); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.cbUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_dk05ec$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_dk05ec$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_dk05ec$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_dk05ec$.prototype.constructor = Coroutine$updateAsync_dk05ec$; Coroutine$updateAsync_dk05ec$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseBlockDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.updateAsync_dk05ec$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_dk05ec$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_u9gaf9$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_u9gaf9$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_u9gaf9$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_u9gaf9$.prototype.constructor = Coroutine$replaceListAsync_u9gaf9$; Coroutine$replaceListAsync_u9gaf9$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseBlock_upsert.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.replaceListAsync_u9gaf9$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_u9gaf9$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cbUid = _resultSet.getLong_61zpoe$('cbUid'); var tmp_cbType = _resultSet.getInt_61zpoe$('cbType'); var tmp_cbIndentLevel = _resultSet.getInt_61zpoe$('cbIndentLevel'); var tmp_cbModuleParentBlockUid = _resultSet.getLong_61zpoe$('cbModuleParentBlockUid'); var tmp_cbTitle = _resultSet.getString_61zpoe$('cbTitle'); var tmp_cbDescription = _resultSet.getString_61zpoe$('cbDescription'); var tmp_cbCompletionCriteria = _resultSet.getInt_61zpoe$('cbCompletionCriteria'); var tmp_cbHideUntilDate = _resultSet.getLong_61zpoe$('cbHideUntilDate'); var tmp_cbDeadlineDate = _resultSet.getLong_61zpoe$('cbDeadlineDate'); var tmp_cbLateSubmissionPenalty = _resultSet.getInt_61zpoe$('cbLateSubmissionPenalty'); var tmp_cbGracePeriodDate = _resultSet.getLong_61zpoe$('cbGracePeriodDate'); var tmp_cbMaxPoints = _resultSet.getInt_61zpoe$('cbMaxPoints'); var tmp_cbMinPoints = _resultSet.getInt_61zpoe$('cbMinPoints'); var tmp_cbIndex = _resultSet.getInt_61zpoe$('cbIndex'); var tmp_cbClazzUid = _resultSet.getLong_61zpoe$('cbClazzUid'); var tmp_cbActive = _resultSet.getBoolean_61zpoe$('cbActive'); var tmp_cbHidden = _resultSet.getBoolean_61zpoe$('cbHidden'); var tmp_cbEntityUid = _resultSet.getLong_61zpoe$('cbEntityUid'); var tmp_cbLct = _resultSet.getLong_61zpoe$('cbLct'); var _entity = new CourseBlockWithEntityDb(); _entity.cbUid = tmp_cbUid; _entity.cbType = tmp_cbType; _entity.cbIndentLevel = tmp_cbIndentLevel; _entity.cbModuleParentBlockUid = tmp_cbModuleParentBlockUid; _entity.cbTitle = tmp_cbTitle; _entity.cbDescription = tmp_cbDescription; _entity.cbCompletionCriteria = tmp_cbCompletionCriteria; _entity.cbHideUntilDate = tmp_cbHideUntilDate; _entity.cbDeadlineDate = tmp_cbDeadlineDate; _entity.cbLateSubmissionPenalty = tmp_cbLateSubmissionPenalty; _entity.cbGracePeriodDate = tmp_cbGracePeriodDate; _entity.cbMaxPoints = tmp_cbMaxPoints; _entity.cbMinPoints = tmp_cbMinPoints; _entity.cbIndex = tmp_cbIndex; _entity.cbClazzUid = tmp_cbClazzUid; _entity.cbActive = tmp_cbActive; _entity.cbHidden = tmp_cbHidden; _entity.cbEntityUid = tmp_cbEntityUid; _entity.cbLct = tmp_cbLct; var _assignment_nullFieldCount = 0; var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }if (_assignment_nullFieldCount < 23) { if (_entity.assignment == null) { _entity.assignment = new ClazzAssignment(); }ensureNotNull(_entity.assignment).caUid = tmp_caUid; ensureNotNull(_entity.assignment).caTitle = tmp_caTitle; ensureNotNull(_entity.assignment).caDescription = tmp_caDescription; ensureNotNull(_entity.assignment).caGroupUid = tmp_caGroupUid; ensureNotNull(_entity.assignment).caActive = tmp_caActive; ensureNotNull(_entity.assignment).caClassCommentEnabled = tmp_caClassCommentEnabled; ensureNotNull(_entity.assignment).caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; ensureNotNull(_entity.assignment).caCompletionCriteria = tmp_caCompletionCriteria; ensureNotNull(_entity.assignment).caRequireFileSubmission = tmp_caRequireFileSubmission; ensureNotNull(_entity.assignment).caFileType = tmp_caFileType; ensureNotNull(_entity.assignment).caSizeLimit = tmp_caSizeLimit; ensureNotNull(_entity.assignment).caNumberOfFiles = tmp_caNumberOfFiles; ensureNotNull(_entity.assignment).caSubmissionPolicy = tmp_caSubmissionPolicy; ensureNotNull(_entity.assignment).caMarkingType = tmp_caMarkingType; ensureNotNull(_entity.assignment).caRequireTextSubmission = tmp_caRequireTextSubmission; ensureNotNull(_entity.assignment).caTextLimitType = tmp_caTextLimitType; ensureNotNull(_entity.assignment).caTextLimit = tmp_caTextLimit; ensureNotNull(_entity.assignment).caXObjectUid = tmp_caXObjectUid; ensureNotNull(_entity.assignment).caClazzUid = tmp_caClazzUid; ensureNotNull(_entity.assignment).caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; ensureNotNull(_entity.assignment).caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; ensureNotNull(_entity.assignment).caLastChangedBy = tmp_caLastChangedBy; ensureNotNull(_entity.assignment).caLct = tmp_caLct; }var _entry_nullFieldCount = 0; var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_title = _resultSet.getString_61zpoe$('title'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_description = _resultSet.getString_61zpoe$('description'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_author = _resultSet.getString_61zpoe$('author'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }if (_entry_nullFieldCount < 26) { if (_entity.entry == null) { _entity.entry = new ContentEntry(); }ensureNotNull(_entity.entry).contentEntryUid = tmp_contentEntryUid; ensureNotNull(_entity.entry).title = tmp_title; ensureNotNull(_entity.entry).description = tmp_description; ensureNotNull(_entity.entry).entryId = tmp_entryId; ensureNotNull(_entity.entry).author = tmp_author; ensureNotNull(_entity.entry).publisher = tmp_publisher; ensureNotNull(_entity.entry).licenseType = tmp_licenseType; ensureNotNull(_entity.entry).licenseName = tmp_licenseName; ensureNotNull(_entity.entry).licenseUrl = tmp_licenseUrl; ensureNotNull(_entity.entry).sourceUrl = tmp_sourceUrl; ensureNotNull(_entity.entry).thumbnailUrl = tmp_thumbnailUrl; ensureNotNull(_entity.entry).lastModified = tmp_lastModified; ensureNotNull(_entity.entry).primaryLanguageUid = tmp_primaryLanguageUid; ensureNotNull(_entity.entry).languageVariantUid = tmp_languageVariantUid; ensureNotNull(_entity.entry).contentFlags = tmp_contentFlags; ensureNotNull(_entity.entry).leaf = tmp_leaf; ensureNotNull(_entity.entry).publik = tmp_publik; ensureNotNull(_entity.entry).ceInactive = tmp_ceInactive; ensureNotNull(_entity.entry).completionCriteria = tmp_completionCriteria; ensureNotNull(_entity.entry).minScore = tmp_minScore; ensureNotNull(_entity.entry).contentTypeFlag = tmp_contentTypeFlag; ensureNotNull(_entity.entry).contentOwner = tmp_contentOwner; ensureNotNull(_entity.entry).contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; ensureNotNull(_entity.entry).contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; ensureNotNull(_entity.entry).contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; ensureNotNull(_entity.entry).contentEntryLct = tmp_contentEntryLct; }var _courseDiscussion_nullFieldCount = 0; var tmp_courseDiscussionUid = _resultSet.getLong_61zpoe$('courseDiscussionUid'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionTitle = _resultSet.getString_61zpoe$('courseDiscussionTitle'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionDesc = _resultSet.getString_61zpoe$('courseDiscussionDesc'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionClazzUid = _resultSet.getLong_61zpoe$('courseDiscussionClazzUid'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionActive = _resultSet.getBoolean_61zpoe$('courseDiscussionActive'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionLct = _resultSet.getLong_61zpoe$('courseDiscussionLct'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }if (_courseDiscussion_nullFieldCount < 6) { if (_entity.courseDiscussion == null) { _entity.courseDiscussion = new CourseDiscussion(); }ensureNotNull(_entity.courseDiscussion).courseDiscussionUid = tmp_courseDiscussionUid; ensureNotNull(_entity.courseDiscussion).courseDiscussionTitle = tmp_courseDiscussionTitle; ensureNotNull(_entity.courseDiscussion).courseDiscussionDesc = tmp_courseDiscussionDesc; ensureNotNull(_entity.courseDiscussion).courseDiscussionClazzUid = tmp_courseDiscussionClazzUid; ensureNotNull(_entity.courseDiscussion).courseDiscussionActive = tmp_courseDiscussionActive; ensureNotNull(_entity.courseDiscussion).courseDiscussionLct = tmp_courseDiscussionLct; }var _language_nullFieldCount = 0; var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_name = _resultSet.getString_61zpoe$('name'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); if (_resultSet.wasNull()) { _language_nullFieldCount = _language_nullFieldCount + 1 | 0; }if (_language_nullFieldCount < 11) { if (_entity.language == null) { _entity.language = new Language(); }ensureNotNull(_entity.language).langUid = tmp_langUid; ensureNotNull(_entity.language).name = tmp_name; ensureNotNull(_entity.language).iso_639_1_standard = tmp_iso_639_1_standard; ensureNotNull(_entity.language).iso_639_2_standard = tmp_iso_639_2_standard; ensureNotNull(_entity.language).iso_639_3_standard = tmp_iso_639_3_standard; ensureNotNull(_entity.language).Language_Type = tmp_Language_Type; ensureNotNull(_entity.language).languageActive = tmp_languageActive; ensureNotNull(_entity.language).langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; ensureNotNull(_entity.language).langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; ensureNotNull(_entity.language).langLastChangedBy = tmp_langLastChangedBy; ensureNotNull(_entity.language).langLct = tmp_langLct; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$; Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseBlock \n | LEFT JOIN ClazzAssignment as assignment\n | ON assignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | LEFT JOIN CourseDiscussion as courseDiscussion\n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | LEFT JOIN ContentEntry as entry\n | ON entry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN Language\n | ON Language.langUid = entry.primaryLanguageUid\n | AND CourseBlock.cbType = 104\n | \n | WHERE cbClazzUid = ?\n | AND cbActive\n | ORDER BY cbIndex\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseBlock \n | LEFT JOIN ClazzAssignment as assignment\n | ON assignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | LEFT JOIN CourseDiscussion as courseDiscussion\n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | LEFT JOIN ContentEntry as entry\n | ON entry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN Language\n | ON Language.langUid = entry.primaryLanguageUid\n | AND CourseBlock.cbType = 104\n | \n | WHERE cbClazzUid = ?\n | AND cbActive\n | ORDER BY cbIndex\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.findAllCourseBlockByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral(this$CourseBlockDao_JdbcKt, closure$clazzUid, closure$personUid, closure$collapseList, closure$currentTime) { this.this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; this.closure$personUid = closure$personUid; this.closure$collapseList = closure$collapseList; this.closure$currentTime = closure$currentTime; DoorDataSourceFactory.call(this); } function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_expanded = _resultSet.getBoolean_61zpoe$('expanded'); var tmp_cbUid = _resultSet.getLong_61zpoe$('cbUid'); var tmp_cbType = _resultSet.getInt_61zpoe$('cbType'); var tmp_cbIndentLevel = _resultSet.getInt_61zpoe$('cbIndentLevel'); var tmp_cbModuleParentBlockUid = _resultSet.getLong_61zpoe$('cbModuleParentBlockUid'); var tmp_cbTitle = _resultSet.getString_61zpoe$('cbTitle'); var tmp_cbDescription = _resultSet.getString_61zpoe$('cbDescription'); var tmp_cbCompletionCriteria = _resultSet.getInt_61zpoe$('cbCompletionCriteria'); var tmp_cbHideUntilDate = _resultSet.getLong_61zpoe$('cbHideUntilDate'); var tmp_cbDeadlineDate = _resultSet.getLong_61zpoe$('cbDeadlineDate'); var tmp_cbLateSubmissionPenalty = _resultSet.getInt_61zpoe$('cbLateSubmissionPenalty'); var tmp_cbGracePeriodDate = _resultSet.getLong_61zpoe$('cbGracePeriodDate'); var tmp_cbMaxPoints = _resultSet.getInt_61zpoe$('cbMaxPoints'); var tmp_cbMinPoints = _resultSet.getInt_61zpoe$('cbMinPoints'); var tmp_cbIndex = _resultSet.getInt_61zpoe$('cbIndex'); var tmp_cbClazzUid = _resultSet.getLong_61zpoe$('cbClazzUid'); var tmp_cbActive = _resultSet.getBoolean_61zpoe$('cbActive'); var tmp_cbHidden = _resultSet.getBoolean_61zpoe$('cbHidden'); var tmp_cbEntityUid = _resultSet.getLong_61zpoe$('cbEntityUid'); var tmp_cbLct = _resultSet.getLong_61zpoe$('cbLct'); var _entity = new CourseBlockWithCompleteEntity(); _entity.expanded = tmp_expanded; _entity.cbUid = tmp_cbUid; _entity.cbType = tmp_cbType; _entity.cbIndentLevel = tmp_cbIndentLevel; _entity.cbModuleParentBlockUid = tmp_cbModuleParentBlockUid; _entity.cbTitle = tmp_cbTitle; _entity.cbDescription = tmp_cbDescription; _entity.cbCompletionCriteria = tmp_cbCompletionCriteria; _entity.cbHideUntilDate = tmp_cbHideUntilDate; _entity.cbDeadlineDate = tmp_cbDeadlineDate; _entity.cbLateSubmissionPenalty = tmp_cbLateSubmissionPenalty; _entity.cbGracePeriodDate = tmp_cbGracePeriodDate; _entity.cbMaxPoints = tmp_cbMaxPoints; _entity.cbMinPoints = tmp_cbMinPoints; _entity.cbIndex = tmp_cbIndex; _entity.cbClazzUid = tmp_cbClazzUid; _entity.cbActive = tmp_cbActive; _entity.cbHidden = tmp_cbHidden; _entity.cbEntityUid = tmp_cbEntityUid; _entity.cbLct = tmp_cbLct; var _assignment_nullFieldCount = 0; var tmp_fileSubmissionStatus = _resultSet.getInt_61zpoe$('fileSubmissionStatus'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caUid = _resultSet.getLong_61zpoe$('caUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caTitle = _resultSet.getString_61zpoe$('caTitle'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caDescription = _resultSet.getString_61zpoe$('caDescription'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caGroupUid = _resultSet.getLong_61zpoe$('caGroupUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caActive = _resultSet.getBoolean_61zpoe$('caActive'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caClassCommentEnabled = _resultSet.getBoolean_61zpoe$('caClassCommentEnabled'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caPrivateCommentsEnabled = _resultSet.getBoolean_61zpoe$('caPrivateCommentsEnabled'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caCompletionCriteria = _resultSet.getInt_61zpoe$('caCompletionCriteria'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caRequireFileSubmission = _resultSet.getBoolean_61zpoe$('caRequireFileSubmission'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caFileType = _resultSet.getInt_61zpoe$('caFileType'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caSizeLimit = _resultSet.getInt_61zpoe$('caSizeLimit'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caNumberOfFiles = _resultSet.getInt_61zpoe$('caNumberOfFiles'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caSubmissionPolicy = _resultSet.getInt_61zpoe$('caSubmissionPolicy'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caMarkingType = _resultSet.getInt_61zpoe$('caMarkingType'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caRequireTextSubmission = _resultSet.getBoolean_61zpoe$('caRequireTextSubmission'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caTextLimitType = _resultSet.getInt_61zpoe$('caTextLimitType'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caTextLimit = _resultSet.getInt_61zpoe$('caTextLimit'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caXObjectUid = _resultSet.getLong_61zpoe$('caXObjectUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caClazzUid = _resultSet.getLong_61zpoe$('caClazzUid'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caLocalChangeSeqNum = _resultSet.getLong_61zpoe$('caLocalChangeSeqNum'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caMasterChangeSeqNum = _resultSet.getLong_61zpoe$('caMasterChangeSeqNum'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caLastChangedBy = _resultSet.getInt_61zpoe$('caLastChangedBy'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }var tmp_caLct = _resultSet.getLong_61zpoe$('caLct'); if (_resultSet.wasNull()) { _assignment_nullFieldCount = _assignment_nullFieldCount + 1 | 0; }if (_assignment_nullFieldCount < 26) { if (_entity.assignment == null) { _entity.assignment = new ClazzAssignmentWithMetrics(); }ensureNotNull(_entity.assignment).fileSubmissionStatus = tmp_fileSubmissionStatus; ensureNotNull(_entity.assignment).caUid = tmp_caUid; ensureNotNull(_entity.assignment).caTitle = tmp_caTitle; ensureNotNull(_entity.assignment).caDescription = tmp_caDescription; ensureNotNull(_entity.assignment).caGroupUid = tmp_caGroupUid; ensureNotNull(_entity.assignment).caActive = tmp_caActive; ensureNotNull(_entity.assignment).caClassCommentEnabled = tmp_caClassCommentEnabled; ensureNotNull(_entity.assignment).caPrivateCommentsEnabled = tmp_caPrivateCommentsEnabled; ensureNotNull(_entity.assignment).caCompletionCriteria = tmp_caCompletionCriteria; ensureNotNull(_entity.assignment).caRequireFileSubmission = tmp_caRequireFileSubmission; ensureNotNull(_entity.assignment).caFileType = tmp_caFileType; ensureNotNull(_entity.assignment).caSizeLimit = tmp_caSizeLimit; ensureNotNull(_entity.assignment).caNumberOfFiles = tmp_caNumberOfFiles; ensureNotNull(_entity.assignment).caSubmissionPolicy = tmp_caSubmissionPolicy; ensureNotNull(_entity.assignment).caMarkingType = tmp_caMarkingType; ensureNotNull(_entity.assignment).caRequireTextSubmission = tmp_caRequireTextSubmission; ensureNotNull(_entity.assignment).caTextLimitType = tmp_caTextLimitType; ensureNotNull(_entity.assignment).caTextLimit = tmp_caTextLimit; ensureNotNull(_entity.assignment).caXObjectUid = tmp_caXObjectUid; ensureNotNull(_entity.assignment).caClazzUid = tmp_caClazzUid; ensureNotNull(_entity.assignment).caLocalChangeSeqNum = tmp_caLocalChangeSeqNum; ensureNotNull(_entity.assignment).caMasterChangeSeqNum = tmp_caMasterChangeSeqNum; ensureNotNull(_entity.assignment).caLastChangedBy = tmp_caLastChangedBy; ensureNotNull(_entity.assignment).caLct = tmp_caLct; }var _progressSummary_nullFieldCount = 0; var tmp_notSubmittedStudents = _resultSet.getInt_61zpoe$('notSubmittedStudents'); if (_resultSet.wasNull()) { _progressSummary_nullFieldCount = _progressSummary_nullFieldCount + 1 | 0; }var tmp_submittedStudents = _resultSet.getInt_61zpoe$('submittedStudents'); if (_resultSet.wasNull()) { _progressSummary_nullFieldCount = _progressSummary_nullFieldCount + 1 | 0; }var tmp_totalStudents = _resultSet.getInt_61zpoe$('totalStudents'); if (_resultSet.wasNull()) { _progressSummary_nullFieldCount = _progressSummary_nullFieldCount + 1 | 0; }var tmp_markedStudents = _resultSet.getInt_61zpoe$('markedStudents'); if (_resultSet.wasNull()) { _progressSummary_nullFieldCount = _progressSummary_nullFieldCount + 1 | 0; }var tmp_hasMetricsPermission = _resultSet.getBoolean_61zpoe$('hasMetricsPermission'); if (_resultSet.wasNull()) { _progressSummary_nullFieldCount = _progressSummary_nullFieldCount + 1 | 0; }if (_progressSummary_nullFieldCount < 5) { if (_entity.assignment == null) { _entity.assignment = new ClazzAssignmentWithMetrics(); }if (ensureNotNull(_entity.assignment).progressSummary == null) { ensureNotNull(_entity.assignment).progressSummary = new AssignmentProgressSummary(); }ensureNotNull(ensureNotNull(_entity.assignment).progressSummary).notSubmittedStudents = tmp_notSubmittedStudents; ensureNotNull(ensureNotNull(_entity.assignment).progressSummary).submittedStudents = tmp_submittedStudents; ensureNotNull(ensureNotNull(_entity.assignment).progressSummary).totalStudents = tmp_totalStudents; ensureNotNull(ensureNotNull(_entity.assignment).progressSummary).markedStudents = tmp_markedStudents; ensureNotNull(ensureNotNull(_entity.assignment).progressSummary).hasMetricsPermission = tmp_hasMetricsPermission; }var _mark_nullFieldCount = 0; var tmp_camUid = _resultSet.getLong_61zpoe$('camUid'); if (_resultSet.wasNull()) { _mark_nullFieldCount = _mark_nullFieldCount + 1 | 0; }var tmp_camAssignmentUid = _resultSet.getLong_61zpoe$('camAssignmentUid'); if (_resultSet.wasNull()) { _mark_nullFieldCount = _mark_nullFieldCount + 1 | 0; }var tmp_camSubmitterUid = _resultSet.getLong_61zpoe$('camSubmitterUid'); if (_resultSet.wasNull()) { _mark_nullFieldCount = _mark_nullFieldCount + 1 | 0; }var tmp_camMark = _resultSet.getFloat_61zpoe$('camMark'); if (_resultSet.wasNull()) { _mark_nullFieldCount = _mark_nullFieldCount + 1 | 0; }var tmp_camPenalty = _resultSet.getInt_61zpoe$('camPenalty'); if (_resultSet.wasNull()) { _mark_nullFieldCount = _mark_nullFieldCount + 1 | 0; }var tmp_camLct = _resultSet.getLong_61zpoe$('camLct'); if (_resultSet.wasNull()) { _mark_nullFieldCount = _mark_nullFieldCount + 1 | 0; }if (_mark_nullFieldCount < 6) { if (_entity.assignment == null) { _entity.assignment = new ClazzAssignmentWithMetrics(); }if (ensureNotNull(_entity.assignment).mark == null) { ensureNotNull(_entity.assignment).mark = new CourseAssignmentMark(); }ensureNotNull(ensureNotNull(_entity.assignment).mark).camUid = tmp_camUid; ensureNotNull(ensureNotNull(_entity.assignment).mark).camAssignmentUid = tmp_camAssignmentUid; ensureNotNull(ensureNotNull(_entity.assignment).mark).camSubmitterUid = tmp_camSubmitterUid; ensureNotNull(ensureNotNull(_entity.assignment).mark).camMark = tmp_camMark; ensureNotNull(ensureNotNull(_entity.assignment).mark).camPenalty = tmp_camPenalty; ensureNotNull(ensureNotNull(_entity.assignment).mark).camLct = tmp_camLct; }var _entry_nullFieldCount = 0; var tmp_assignmentContentWeight = _resultSet.getInt_61zpoe$('assignmentContentWeight'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryUid = _resultSet.getLong_61zpoe$('contentEntryUid'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_title = _resultSet.getString_61zpoe$('title'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_description = _resultSet.getString_61zpoe$('description'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_entryId = _resultSet.getString_61zpoe$('entryId'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_author = _resultSet.getString_61zpoe$('author'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_publisher = _resultSet.getString_61zpoe$('publisher'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_licenseType = _resultSet.getInt_61zpoe$('licenseType'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_licenseName = _resultSet.getString_61zpoe$('licenseName'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_licenseUrl = _resultSet.getString_61zpoe$('licenseUrl'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_sourceUrl = _resultSet.getString_61zpoe$('sourceUrl'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_thumbnailUrl = _resultSet.getString_61zpoe$('thumbnailUrl'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_lastModified = _resultSet.getLong_61zpoe$('lastModified'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_primaryLanguageUid = _resultSet.getLong_61zpoe$('primaryLanguageUid'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_languageVariantUid = _resultSet.getLong_61zpoe$('languageVariantUid'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentFlags = _resultSet.getInt_61zpoe$('contentFlags'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_leaf = _resultSet.getBoolean_61zpoe$('leaf'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_publik = _resultSet.getBoolean_61zpoe$('publik'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_ceInactive = _resultSet.getBoolean_61zpoe$('ceInactive'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_completionCriteria = _resultSet.getInt_61zpoe$('completionCriteria'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_minScore = _resultSet.getInt_61zpoe$('minScore'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentTypeFlag = _resultSet.getInt_61zpoe$('contentTypeFlag'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentOwner = _resultSet.getLong_61zpoe$('contentOwner'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryLocalChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryMasterChangeSeqNum = _resultSet.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryLastChangedBy = _resultSet.getInt_61zpoe$('contentEntryLastChangedBy'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }var tmp_contentEntryLct = _resultSet.getLong_61zpoe$('contentEntryLct'); if (_resultSet.wasNull()) { _entry_nullFieldCount = _entry_nullFieldCount + 1 | 0; }if (_entry_nullFieldCount < 30) { if (_entity.entry == null) { _entity.entry = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); }ensureNotNull(_entity.entry).assignmentContentWeight = tmp_assignmentContentWeight; ensureNotNull(_entity.entry).contentEntryUid = tmp_contentEntryUid; ensureNotNull(_entity.entry).title = tmp_title; ensureNotNull(_entity.entry).description = tmp_description; ensureNotNull(_entity.entry).entryId = tmp_entryId; ensureNotNull(_entity.entry).author = tmp_author; ensureNotNull(_entity.entry).publisher = tmp_publisher; ensureNotNull(_entity.entry).licenseType = tmp_licenseType; ensureNotNull(_entity.entry).licenseName = tmp_licenseName; ensureNotNull(_entity.entry).licenseUrl = tmp_licenseUrl; ensureNotNull(_entity.entry).sourceUrl = tmp_sourceUrl; ensureNotNull(_entity.entry).thumbnailUrl = tmp_thumbnailUrl; ensureNotNull(_entity.entry).lastModified = tmp_lastModified; ensureNotNull(_entity.entry).primaryLanguageUid = tmp_primaryLanguageUid; ensureNotNull(_entity.entry).languageVariantUid = tmp_languageVariantUid; ensureNotNull(_entity.entry).contentFlags = tmp_contentFlags; ensureNotNull(_entity.entry).leaf = tmp_leaf; ensureNotNull(_entity.entry).publik = tmp_publik; ensureNotNull(_entity.entry).ceInactive = tmp_ceInactive; ensureNotNull(_entity.entry).completionCriteria = tmp_completionCriteria; ensureNotNull(_entity.entry).minScore = tmp_minScore; ensureNotNull(_entity.entry).contentTypeFlag = tmp_contentTypeFlag; ensureNotNull(_entity.entry).contentOwner = tmp_contentOwner; ensureNotNull(_entity.entry).contentEntryLocalChangeSeqNum = tmp_contentEntryLocalChangeSeqNum; ensureNotNull(_entity.entry).contentEntryMasterChangeSeqNum = tmp_contentEntryMasterChangeSeqNum; ensureNotNull(_entity.entry).contentEntryLastChangedBy = tmp_contentEntryLastChangedBy; ensureNotNull(_entity.entry).contentEntryLct = tmp_contentEntryLct; }var _mostRecentContainer_nullFieldCount = 0; var tmp_containerUid = _resultSet.getLong_61zpoe$('containerUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLocalCsn = _resultSet.getLong_61zpoe$('cntLocalCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntMasterCsn = _resultSet.getLong_61zpoe$('cntMasterCsn'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModBy = _resultSet.getInt_61zpoe$('cntLastModBy'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLct = _resultSet.getLong_61zpoe$('cntLct'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_fileSize = _resultSet.getLong_61zpoe$('fileSize'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_containerContentEntryUid = _resultSet.getLong_61zpoe$('containerContentEntryUid'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntLastModified = _resultSet.getLong_61zpoe$('cntLastModified'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_remarks = _resultSet.getString_61zpoe$('remarks'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_mobileOptimized = _resultSet.getBoolean_61zpoe$('mobileOptimized'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }var tmp_cntNumEntries = _resultSet.getInt_61zpoe$('cntNumEntries'); if (_resultSet.wasNull()) { _mostRecentContainer_nullFieldCount = _mostRecentContainer_nullFieldCount + 1 | 0; }if (_mostRecentContainer_nullFieldCount < 12) { if (_entity.entry == null) { _entity.entry = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); }if (ensureNotNull(_entity.entry).mostRecentContainer == null) { ensureNotNull(_entity.entry).mostRecentContainer = new Container(); }ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).containerUid = tmp_containerUid; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).cntLocalCsn = tmp_cntLocalCsn; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).cntMasterCsn = tmp_cntMasterCsn; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).cntLastModBy = tmp_cntLastModBy; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).cntLct = tmp_cntLct; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).fileSize = tmp_fileSize; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).containerContentEntryUid = tmp_containerContentEntryUid; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).cntLastModified = tmp_cntLastModified; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).mimeType = tmp_mimeType; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).remarks = tmp_remarks; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).mobileOptimized = tmp_mobileOptimized; ensureNotNull(ensureNotNull(_entity.entry).mostRecentContainer).cntNumEntries = tmp_cntNumEntries; }var _contentEntryParentChildJoin_nullFieldCount = 0; var tmp_cepcjParentContentEntryUid = _resultSet.getLong_61zpoe$('cepcjParentContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjChildContentEntryUid = _resultSet.getLong_61zpoe$('cepcjChildContentEntryUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_childIndex = _resultSet.getInt_61zpoe$('childIndex'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjUid = _resultSet.getLong_61zpoe$('cepcjUid'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLocalChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjMasterChangeSeqNum = _resultSet.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLastChangedBy = _resultSet.getInt_61zpoe$('cepcjLastChangedBy'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }var tmp_cepcjLct = _resultSet.getLong_61zpoe$('cepcjLct'); if (_resultSet.wasNull()) { _contentEntryParentChildJoin_nullFieldCount = _contentEntryParentChildJoin_nullFieldCount + 1 | 0; }if (_contentEntryParentChildJoin_nullFieldCount < 8) { if (_entity.entry == null) { _entity.entry = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); }if (ensureNotNull(_entity.entry).contentEntryParentChildJoin == null) { ensureNotNull(_entity.entry).contentEntryParentChildJoin = new ContentEntryParentChildJoin(); }ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjParentContentEntryUid = tmp_cepcjParentContentEntryUid; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjChildContentEntryUid = tmp_cepcjChildContentEntryUid; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).childIndex = tmp_childIndex; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjUid = tmp_cepcjUid; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjLocalChangeSeqNum = tmp_cepcjLocalChangeSeqNum; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjMasterChangeSeqNum = tmp_cepcjMasterChangeSeqNum; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjLastChangedBy = tmp_cepcjLastChangedBy; ensureNotNull(ensureNotNull(_entity.entry).contentEntryParentChildJoin).cepcjLct = tmp_cepcjLct; }var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.entry == null) { _entity.entry = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); }if (ensureNotNull(_entity.entry).scoreProgress == null) { ensureNotNull(_entity.entry).scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).resultScore = tmp_resultScore; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).resultMax = tmp_resultMax; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).progress = tmp_progress; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).success = tmp_success; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).penalty = tmp_penalty; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).totalContent = tmp_totalContent; ensureNotNull(ensureNotNull(_entity.entry).scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }var _courseDiscussion_nullFieldCount = 0; var tmp_courseDiscussionUid = _resultSet.getLong_61zpoe$('courseDiscussionUid'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionTitle = _resultSet.getString_61zpoe$('courseDiscussionTitle'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionDesc = _resultSet.getString_61zpoe$('courseDiscussionDesc'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionClazzUid = _resultSet.getLong_61zpoe$('courseDiscussionClazzUid'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionActive = _resultSet.getBoolean_61zpoe$('courseDiscussionActive'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }var tmp_courseDiscussionLct = _resultSet.getLong_61zpoe$('courseDiscussionLct'); if (_resultSet.wasNull()) { _courseDiscussion_nullFieldCount = _courseDiscussion_nullFieldCount + 1 | 0; }if (_courseDiscussion_nullFieldCount < 6) { if (_entity.courseDiscussion == null) { _entity.courseDiscussion = new CourseDiscussion(); }ensureNotNull(_entity.courseDiscussion).courseDiscussionUid = tmp_courseDiscussionUid; ensureNotNull(_entity.courseDiscussion).courseDiscussionTitle = tmp_courseDiscussionTitle; ensureNotNull(_entity.courseDiscussion).courseDiscussionDesc = tmp_courseDiscussionDesc; ensureNotNull(_entity.courseDiscussion).courseDiscussionClazzUid = tmp_courseDiscussionClazzUid; ensureNotNull(_entity.courseDiscussion).courseDiscussionActive = tmp_courseDiscussionActive; ensureNotNull(_entity.courseDiscussion).courseDiscussionLct = tmp_courseDiscussionLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$personUid_0, this$CourseBlockDao_JdbcKt_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$clazzUid); this.local$_stmt.setArray_wqp8hw$(6, this.local$this$CourseBlockDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setArray_wqp8hw$(15, this.local$this$CourseBlockDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.local$_stmt.setInt_vux9f0$(16, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$personUid_0, this$CourseBlockDao_JdbcKt_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$personUid_0, this$CourseBlockDao_JdbcKt_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | WITH CtePermissionCheck (hasPermission) \n | AS (SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 549755813888\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)), \n | \n | \n | SubmitterList (submitterId, assignmentUid)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | \n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, assignmentUid\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, assignmentUid\n | )\n | \n | \n |\n | SELECT CourseBlock.*, ClazzAssignment.*, ContentEntry.*, CourseDiscussion.*, ContentEntryParentChildJoin.*, \n | Container.*, CourseAssignmentMark.*, (CourseBlock.cbUid NOT IN (?)) AS expanded,\n | \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | \n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 AS assignmentContentWeight,\n | 1 as totalContent, \n | 0 as penalty,\n | \n | (SELECT hasPermission FROM CtePermissionCheck) AS hasMetricsPermission,\n | \n | \n | (SELECT COUNT(*) \n | FROM SubmitterList \n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid) \n | AS totalStudents, \n | \n | 0 AS notSubmittedStudents,\n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck)\n | THEN (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | AND CourseAssignmentSubmission.casSubmitterUid IN \n | (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid)) \n | ELSE 0 END) AS submittedStudents, \n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck) \n | THEN (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid \n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid))\n | ELSE 0 END) AS markedStudents,\n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus\n | \n | \n | FROM CourseBlock \n | \n | LEFT JOIN CourseBlock AS parentBlock\n | ON CourseBlock.cbModuleParentBlockUid = parentBlock.cbUid\n | AND CourseBlock.cbTYpe != 100\n | \n | LEFT JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | \n | LEFT JOIN ContentEntry\n | ON ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND NOT ceInactive\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t ON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1) \n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON casUid = (SELECT casUid \n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ClazzAssignment.caUid\n | AND casSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY casTimestamp DESC\n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentMark\n | ON camUid = (SELECT camUid \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ClazzAssignment.caUid\n | AND camSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY camLct DESC\n | LIMIT 1) \n | WHERE CourseBlock.cbClazzUid = ?\n | AND CourseBlock.cbActive\n | AND NOT CourseBlock.cbHidden\n | AND ? > CourseBlock.cbHideUntilDate\n | AND ? > COALESCE(parentBlock.cbHideUntilDate,0)\n | AND CourseBlock.cbModuleParentBlockUid NOT IN (?)\n | ORDER BY CourseBlock.cbIndex\n | ) LIMIT ? OFFSET ? \n "), true, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | WITH CtePermissionCheck (hasPermission) \n | AS (SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 549755813888\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)), \n | \n | \n | SubmitterList (submitterId, assignmentUid)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | \n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, assignmentUid\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, assignmentUid\n | )\n | \n | \n |\n | SELECT CourseBlock.*, ClazzAssignment.*, ContentEntry.*, CourseDiscussion.*, ContentEntryParentChildJoin.*, \n | Container.*, CourseAssignmentMark.*, (CourseBlock.cbUid NOT IN (?)) AS expanded,\n | \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | \n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 AS assignmentContentWeight,\n | 1 as totalContent, \n | 0 as penalty,\n | \n | (SELECT hasPermission FROM CtePermissionCheck) AS hasMetricsPermission,\n | \n | \n | (SELECT COUNT(*) \n | FROM SubmitterList \n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid) \n | AS totalStudents, \n | \n | 0 AS notSubmittedStudents,\n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck)\n | THEN (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | AND CourseAssignmentSubmission.casSubmitterUid IN \n | (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid)) \n | ELSE 0 END) AS submittedStudents, \n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck) \n | THEN (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid \n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid))\n | ELSE 0 END) AS markedStudents,\n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus\n | \n | \n | FROM CourseBlock \n | \n | LEFT JOIN CourseBlock AS parentBlock\n | ON CourseBlock.cbModuleParentBlockUid = parentBlock.cbUid\n | AND CourseBlock.cbTYpe != 100\n | \n | LEFT JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | \n | LEFT JOIN ContentEntry\n | ON ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND NOT ceInactive\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t ON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1) \n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON casUid = (SELECT casUid \n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ClazzAssignment.caUid\n | AND casSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY casTimestamp DESC\n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentMark\n | ON camUid = (SELECT camUid \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ClazzAssignment.caUid\n | AND camSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY camLct DESC\n | LIMIT 1) \n | WHERE CourseBlock.cbClazzUid = ?\n | AND CourseBlock.cbActive\n | AND NOT CourseBlock.cbHidden\n | AND ? > CourseBlock.cbHideUntilDate\n | AND ? > COALESCE(parentBlock.cbHideUntilDate,0)\n | AND CourseBlock.cbModuleParentBlockUid NOT IN (?)\n | ORDER BY CourseBlock.cbIndex\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseBlockDao_JdbcKt._db, _stmtConfig, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$personUid, this.local$this$CourseBlockDao_JdbcKt, this.local$closure$collapseList, this.local$closure$currentTime, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CourseBlockDao_JdbcKt._db, listOf(['CourseBlock', 'ClazzAssignment', 'CourseDiscussion', 'ContentEntry', 'CourseAssignmentMark', 'StatementEntity', 'Container', 'ContentEntryParentChildJoin', 'PersonGroupMember', 'Clazz', 'ScopedGrant', 'ClazzEnrolment', 'CourseAssignmentSubmission', 'CourseGroupMember']), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this.this$CourseBlockDao_JdbcKt, this.closure$clazzUid, this.closure$personUid, this.closure$collapseList, this.closure$currentTime, _limit, _offset)); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$personUid_0, this$CourseBlockDao_JdbcKt_0, closure$collapseList_0, closure$currentTime_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$clazzUid); this.local$_stmt.setArray_wqp8hw$(6, this.local$this$CourseBlockDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setArray_wqp8hw$(15, this.local$this$CourseBlockDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$personUid_0, this$CourseBlockDao_JdbcKt_0, closure$collapseList_0, closure$currentTime_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$personUid_0, this$CourseBlockDao_JdbcKt_0, closure$collapseList_0, closure$currentTime_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$_liveResult = void 0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | WITH CtePermissionCheck (hasPermission) \n | AS (SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 549755813888\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)), \n | \n | \n | SubmitterList (submitterId, assignmentUid)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | \n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, assignmentUid\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, assignmentUid\n | )\n | \n | \n |\n | SELECT CourseBlock.*, ClazzAssignment.*, ContentEntry.*, CourseDiscussion.*, ContentEntryParentChildJoin.*, \n | Container.*, CourseAssignmentMark.*, (CourseBlock.cbUid NOT IN (?)) AS expanded,\n | \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | \n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 AS assignmentContentWeight,\n | 1 as totalContent, \n | 0 as penalty,\n | \n | (SELECT hasPermission FROM CtePermissionCheck) AS hasMetricsPermission,\n | \n | \n | (SELECT COUNT(*) \n | FROM SubmitterList \n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid) \n | AS totalStudents, \n | \n | 0 AS notSubmittedStudents,\n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck)\n | THEN (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | AND CourseAssignmentSubmission.casSubmitterUid IN \n | (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid)) \n | ELSE 0 END) AS submittedStudents, \n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck) \n | THEN (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid \n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid))\n | ELSE 0 END) AS markedStudents,\n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus\n | \n | \n | FROM CourseBlock \n | \n | LEFT JOIN CourseBlock AS parentBlock\n | ON CourseBlock.cbModuleParentBlockUid = parentBlock.cbUid\n | AND CourseBlock.cbTYpe != 100\n | \n | LEFT JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | \n | LEFT JOIN ContentEntry\n | ON ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND NOT ceInactive\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t ON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1) \n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON casUid = (SELECT casUid \n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ClazzAssignment.caUid\n | AND casSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY casTimestamp DESC\n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentMark\n | ON camUid = (SELECT camUid \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ClazzAssignment.caUid\n | AND camSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY camLct DESC\n | LIMIT 1) \n | WHERE CourseBlock.cbClazzUid = ?\n | AND CourseBlock.cbActive\n | AND NOT CourseBlock.cbHidden\n | AND ? > CourseBlock.cbHideUntilDate\n | AND ? > COALESCE(parentBlock.cbHideUntilDate,0)\n | AND CourseBlock.cbModuleParentBlockUid NOT IN (?)\n | ORDER BY CourseBlock.cbIndex\n | ) \n "), true, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | WITH CtePermissionCheck (hasPermission) \n | AS (SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 549755813888\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)), \n | \n | \n | SubmitterList (submitterId, assignmentUid)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | \n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, assignmentUid\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, assignmentUid\n | )\n | \n | \n |\n | SELECT CourseBlock.*, ClazzAssignment.*, ContentEntry.*, CourseDiscussion.*, ContentEntryParentChildJoin.*, \n | Container.*, CourseAssignmentMark.*, (CourseBlock.cbUid NOT IN (?)) AS expanded,\n | \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | \n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 AS assignmentContentWeight,\n | 1 as totalContent, \n | 0 as penalty,\n | \n | (SELECT hasPermission FROM CtePermissionCheck) AS hasMetricsPermission,\n | \n | \n | (SELECT COUNT(*) \n | FROM SubmitterList \n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid) \n | AS totalStudents, \n | \n | 0 AS notSubmittedStudents,\n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck)\n | THEN (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | AND CourseAssignmentSubmission.casSubmitterUid IN \n | (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid)) \n | ELSE 0 END) AS submittedStudents, \n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck) \n | THEN (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid \n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid))\n | ELSE 0 END) AS markedStudents,\n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus\n | \n | \n | FROM CourseBlock \n | \n | LEFT JOIN CourseBlock AS parentBlock\n | ON CourseBlock.cbModuleParentBlockUid = parentBlock.cbUid\n | AND CourseBlock.cbTYpe != 100\n | \n | LEFT JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | \n | LEFT JOIN ContentEntry\n | ON ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND NOT ceInactive\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t ON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1) \n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON casUid = (SELECT casUid \n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ClazzAssignment.caUid\n | AND casSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY casTimestamp DESC\n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentMark\n | ON camUid = (SELECT camUid \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ClazzAssignment.caUid\n | AND camSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY camLct DESC\n | LIMIT 1) \n | WHERE CourseBlock.cbClazzUid = ?\n | AND CourseBlock.cbActive\n | AND NOT CourseBlock.cbHidden\n | AND ? > CourseBlock.cbHideUntilDate\n | AND ? > COALESCE(parentBlock.cbHideUntilDate,0)\n | AND CourseBlock.cbModuleParentBlockUid NOT IN (?)\n | ORDER BY CourseBlock.cbIndex\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseBlockDao_JdbcKt._db, _stmtConfig, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$closure$personUid, this.local$this$CourseBlockDao_JdbcKt, this.local$closure$collapseList, this.local$closure$currentTime, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CourseBlockDao_JdbcKt._db, listOf(['CourseBlock', 'ClazzAssignment', 'CourseDiscussion', 'ContentEntry', 'CourseAssignmentMark', 'StatementEntity', 'Container', 'ContentEntryParentChildJoin', 'PersonGroupMember', 'Clazz', 'ScopedGrant', 'ClazzEnrolment', 'CourseAssignmentSubmission', 'CourseGroupMember']), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this.this$CourseBlockDao_JdbcKt, this.closure$clazzUid, this.closure$personUid, this.closure$collapseList, this.closure$currentTime)); }; CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CourseBlockDao_JdbcKt.prototype.findAllCourseBlockByClazzUidLive_uwwcm7$ = function (clazzUid, personUid, collapseList, currentTime) { var _result = new CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral(this, clazzUid, personUid, collapseList, currentTime); return _result; }; function Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$cbUid = closure$cbUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda; Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cbUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_5($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_5.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_5; Coroutine$updateActiveByUid_zaz62j$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE CourseBlock \n | SET cbActive = ?, \n | cbLct = ?\n | WHERE cbUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE CourseBlock \n | SET cbActive = ?, \n | cbLct = ?\n | WHERE cbUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseBlockDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$cbUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_5(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseBlock_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_74($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_74.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_74.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_74.prototype.constructor = Coroutine$insertAsync_74; Coroutine$insertAsync_74.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseBlock_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_74(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseBlock_.insertList_4ezy5m$(entityList); }; function CourseBlockDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setInt_vux9f0$(1, _entity.cbType); _stmt.setInt_vux9f0$(2, _entity.cbIndentLevel); _stmt.setLong_6svq3l$(3, _entity.cbModuleParentBlockUid); _stmt.setString_vqvrqt$(4, _entity.cbTitle); _stmt.setString_vqvrqt$(5, _entity.cbDescription); _stmt.setInt_vux9f0$(6, _entity.cbCompletionCriteria); _stmt.setLong_6svq3l$(7, _entity.cbHideUntilDate); _stmt.setLong_6svq3l$(8, _entity.cbDeadlineDate); _stmt.setInt_vux9f0$(9, _entity.cbLateSubmissionPenalty); _stmt.setLong_6svq3l$(10, _entity.cbGracePeriodDate); _stmt.setInt_vux9f0$(11, _entity.cbMaxPoints); _stmt.setInt_vux9f0$(12, _entity.cbMinPoints); _stmt.setInt_vux9f0$(13, _entity.cbIndex); _stmt.setLong_6svq3l$(14, _entity.cbClazzUid); _stmt.setBoolean_fzusl$(15, _entity.cbActive); _stmt.setBoolean_fzusl$(16, _entity.cbHidden); _stmt.setLong_6svq3l$(17, _entity.cbEntityUid); _stmt.setLong_6svq3l$(18, _entity.cbLct); _stmt.setLong_6svq3l$(19, _entity.cbUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseBlockDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseBlockDao_JdbcKt$updateList$lambda(entityList)); }; function CourseBlockDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$entity.cbType); _stmt.setInt_vux9f0$(2, closure$entity.cbIndentLevel); _stmt.setLong_6svq3l$(3, closure$entity.cbModuleParentBlockUid); _stmt.setString_vqvrqt$(4, closure$entity.cbTitle); _stmt.setString_vqvrqt$(5, closure$entity.cbDescription); _stmt.setInt_vux9f0$(6, closure$entity.cbCompletionCriteria); _stmt.setLong_6svq3l$(7, closure$entity.cbHideUntilDate); _stmt.setLong_6svq3l$(8, closure$entity.cbDeadlineDate); _stmt.setInt_vux9f0$(9, closure$entity.cbLateSubmissionPenalty); _stmt.setLong_6svq3l$(10, closure$entity.cbGracePeriodDate); _stmt.setInt_vux9f0$(11, closure$entity.cbMaxPoints); _stmt.setInt_vux9f0$(12, closure$entity.cbMinPoints); _stmt.setInt_vux9f0$(13, closure$entity.cbIndex); _stmt.setLong_6svq3l$(14, closure$entity.cbClazzUid); _stmt.setBoolean_fzusl$(15, closure$entity.cbActive); _stmt.setBoolean_fzusl$(16, closure$entity.cbHidden); _stmt.setLong_6svq3l$(17, closure$entity.cbEntityUid); _stmt.setLong_6svq3l$(18, closure$entity.cbLct); _stmt.setLong_6svq3l$(19, closure$entity.cbUid); return _stmt.executeUpdate(); }; } CourseBlockDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseBlockDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_8($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_8.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_8; Coroutine$insertListAsync_4ezy5m$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseBlock_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_8(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setInt_vux9f0$(1, _entity.cbType); this.local$_stmt.setInt_vux9f0$(2, _entity.cbIndentLevel); this.local$_stmt.setLong_6svq3l$(3, _entity.cbModuleParentBlockUid); this.local$_stmt.setString_vqvrqt$(4, _entity.cbTitle); this.local$_stmt.setString_vqvrqt$(5, _entity.cbDescription); this.local$_stmt.setInt_vux9f0$(6, _entity.cbCompletionCriteria); this.local$_stmt.setLong_6svq3l$(7, _entity.cbHideUntilDate); this.local$_stmt.setLong_6svq3l$(8, _entity.cbDeadlineDate); this.local$_stmt.setInt_vux9f0$(9, _entity.cbLateSubmissionPenalty); this.local$_stmt.setLong_6svq3l$(10, _entity.cbGracePeriodDate); this.local$_stmt.setInt_vux9f0$(11, _entity.cbMaxPoints); this.local$_stmt.setInt_vux9f0$(12, _entity.cbMinPoints); this.local$_stmt.setInt_vux9f0$(13, _entity.cbIndex); this.local$_stmt.setLong_6svq3l$(14, _entity.cbClazzUid); this.local$_stmt.setBoolean_fzusl$(15, _entity.cbActive); this.local$_stmt.setBoolean_fzusl$(16, _entity.cbHidden); this.local$_stmt.setLong_6svq3l$(17, _entity.cbEntityUid); this.local$_stmt.setLong_6svq3l$(18, _entity.cbLct); this.local$_stmt.setLong_6svq3l$(19, _entity.cbUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_8($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_8.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_8; Coroutine$updateListAsync_4ezy5m$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseBlockDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_8(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO CourseBlock (cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cbUid'; } else tmp$ = ''; return "INSERT INTO CourseBlock (cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct) VALUES(COALESCE(?,nextval('CourseBlock_cbUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (cbUid) DO UPDATE SET cbType = excluded.cbType,cbIndentLevel = excluded.cbIndentLevel,cbModuleParentBlockUid = excluded.cbModuleParentBlockUid,cbTitle = excluded.cbTitle,cbDescription = excluded.cbDescription,cbCompletionCriteria = excluded.cbCompletionCriteria,cbHideUntilDate = excluded.cbHideUntilDate,cbDeadlineDate = excluded.cbDeadlineDate,cbLateSubmissionPenalty = excluded.cbLateSubmissionPenalty,cbGracePeriodDate = excluded.cbGracePeriodDate,cbMaxPoints = excluded.cbMaxPoints,cbMinPoints = excluded.cbMinPoints,cbIndex = excluded.cbIndex,cbClazzUid = excluded.cbClazzUid,cbActive = excluded.cbActive,cbHidden = excluded.cbHidden,cbEntityUid = excluded.cbEntityUid,cbLct = excluded.cbLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cbUid); } stmt.setInt_vux9f0$(2, entity.cbType); stmt.setInt_vux9f0$(3, entity.cbIndentLevel); stmt.setLong_6svq3l$(4, entity.cbModuleParentBlockUid); stmt.setString_vqvrqt$(5, entity.cbTitle); stmt.setString_vqvrqt$(6, entity.cbDescription); stmt.setInt_vux9f0$(7, entity.cbCompletionCriteria); stmt.setLong_6svq3l$(8, entity.cbHideUntilDate); stmt.setLong_6svq3l$(9, entity.cbDeadlineDate); stmt.setInt_vux9f0$(10, entity.cbLateSubmissionPenalty); stmt.setLong_6svq3l$(11, entity.cbGracePeriodDate); stmt.setInt_vux9f0$(12, entity.cbMaxPoints); stmt.setInt_vux9f0$(13, entity.cbMinPoints); stmt.setInt_vux9f0$(14, entity.cbIndex); stmt.setLong_6svq3l$(15, entity.cbClazzUid); stmt.setBoolean_fzusl$(16, entity.cbActive); stmt.setBoolean_fzusl$(17, entity.cbHidden); stmt.setLong_6svq3l$(18, entity.cbEntityUid); stmt.setLong_6svq3l$(19, entity.cbLct); }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseBlock (cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cbUid'; } else tmp$ = ''; return "INSERT INTO CourseBlock (cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct) VALUES(COALESCE(?,nextval('CourseBlock_cbUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cbUid); } stmt.setInt_vux9f0$(2, entity.cbType); stmt.setInt_vux9f0$(3, entity.cbIndentLevel); stmt.setLong_6svq3l$(4, entity.cbModuleParentBlockUid); stmt.setString_vqvrqt$(5, entity.cbTitle); stmt.setString_vqvrqt$(6, entity.cbDescription); stmt.setInt_vux9f0$(7, entity.cbCompletionCriteria); stmt.setLong_6svq3l$(8, entity.cbHideUntilDate); stmt.setLong_6svq3l$(9, entity.cbDeadlineDate); stmt.setInt_vux9f0$(10, entity.cbLateSubmissionPenalty); stmt.setLong_6svq3l$(11, entity.cbGracePeriodDate); stmt.setInt_vux9f0$(12, entity.cbMaxPoints); stmt.setInt_vux9f0$(13, entity.cbMinPoints); stmt.setInt_vux9f0$(14, entity.cbIndex); stmt.setLong_6svq3l$(15, entity.cbClazzUid); stmt.setBoolean_fzusl$(16, entity.cbActive); stmt.setBoolean_fzusl$(17, entity.cbHidden); stmt.setLong_6svq3l$(18, entity.cbEntityUid); stmt.setLong_6svq3l$(19, entity.cbLct); }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseBlockDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao_JdbcKt', interfaces: [CourseBlockDao]}; function CourseBlockDao_ReplicateWrapper(_db, _dao) { CourseBlockDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_72($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_72.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_72.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_72.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_72; Coroutine$replicateOnNewNode_s8cxhz$_72.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_72(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_69($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_69.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_69.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_69.prototype.constructor = Coroutine$replicateOnChange_69; Coroutine$replicateOnChange_69.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_69(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.findByUid = function (uid, continuation) { return this._dao_0.findByUid(uid, continuation); }; CourseBlockDao_ReplicateWrapper.prototype.updateAsync_dk05ec$ = function (entity, continuation) { entity.cbLct = systemTimeInMillis(); return this._dao_0.updateAsync_dk05ec$(entity, continuation); }; function Coroutine$replaceListAsync_u9gaf9$_0($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$list = list_0; } Coroutine$replaceListAsync_u9gaf9$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_u9gaf9$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_u9gaf9$_0.prototype.constructor = Coroutine$replaceListAsync_u9gaf9$_0; Coroutine$replaceListAsync_u9gaf9$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$list.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cbUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cbUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cbLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceListAsync_u9gaf9$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.replaceListAsync_u9gaf9$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_u9gaf9$_0(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.findAllCourseBlockByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.findAllCourseBlockByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; CourseBlockDao_ReplicateWrapper.prototype.findAllCourseBlockByClazzUidLive_uwwcm7$ = function (clazzUid, personUid, collapseList, currentTime) { return this._dao_0.findAllCourseBlockByClazzUidLive_uwwcm7$(clazzUid, personUid, collapseList, currentTime); }; function Coroutine$updateActiveByUid_zaz62j$_6($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_6.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_6; Coroutine$updateActiveByUid_zaz62j$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_6(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_75($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_75.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_75.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_75.prototype.constructor = Coroutine$insertAsync_75; Coroutine$insertAsync_75.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cbUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cbUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cbLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cbUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_75(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseBlockDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseBlockDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_9($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_9.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_9; Coroutine$insertListAsync_4ezy5m$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cbUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cbUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cbLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_9(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_9($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_9.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_9; Coroutine$updateListAsync_4ezy5m$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.cbLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_9(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao_ReplicateWrapper', interfaces: [CourseBlockDao]}; function CourseBlockDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseBlockDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_73($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_73.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_73.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_73.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_73; Coroutine$replicateOnNewNode_s8cxhz$_73.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_73(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_70($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_70.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_70.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_70.prototype.constructor = Coroutine$replicateOnChange_70; Coroutine$replicateOnChange_70.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_70(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_0.prototype.constructor = Coroutine$findByUid_0; Coroutine$findByUid_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_dk05ec$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_dk05ec$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_dk05ec$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_dk05ec$_0.prototype.constructor = Coroutine$updateAsync_dk05ec$_0; Coroutine$updateAsync_dk05ec$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_dk05ec$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.updateAsync_dk05ec$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_dk05ec$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_u9gaf9$_1($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_u9gaf9$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_u9gaf9$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_u9gaf9$_1.prototype.constructor = Coroutine$replaceListAsync_u9gaf9$_1; Coroutine$replaceListAsync_u9gaf9$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceListAsync_u9gaf9$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.replaceListAsync_u9gaf9$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_u9gaf9$_1(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0; Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllCourseBlockByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.findAllCourseBlockByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.prototype.findAllCourseBlockByClazzUidLive_uwwcm7$ = function (clazzUid, personUid, collapseList, currentTime) { var _result = this._dao.findAllCourseBlockByClazzUidLive_uwwcm7$(clazzUid, personUid, collapseList, currentTime); return _result; }; function Coroutine$updateActiveByUid_zaz62j$_7($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_7.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_7; Coroutine$updateActiveByUid_zaz62j$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_7(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_76($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_76.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_76.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_76.prototype.constructor = Coroutine$insertAsync_76; Coroutine$insertAsync_76.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_76(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseBlockDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseBlockDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_10($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_10.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_10; Coroutine$insertListAsync_4ezy5m$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_10(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_10($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_10.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_10; Coroutine$updateListAsync_4ezy5m$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_10(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao_Repo', interfaces: [CourseBlockDao]}; function CourseDiscussionDao_JdbcKt(_db) { CourseDiscussionDao.call(this); this._db = _db; this._insertAdapterCourseDiscussion_upsert = new CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral(this._db); this._insertAdapterCourseDiscussion_ = new CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral(this._db); } function Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_74($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_74.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_74.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_74.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_74; Coroutine$replicateOnNewNode_s8cxhz$_74.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionPk,\n | ? AS courseDiscussionDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionClazzUid = Clazz.clazzUid\n | \n | WHERE CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = ?), 0) \n | /*psql ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionPk,\n | ? AS courseDiscussionDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionClazzUid = Clazz.clazzUid\n | \n | WHERE CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = ?), 0) \n | ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_74(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_71($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_71.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_71.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_71.prototype.constructor = Coroutine$replicateOnChange_71; Coroutine$replicateOnChange_71.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionUid,\n | UserSession.usClientNodeId AS courseDiscussionDestination\n | FROM ChangeLog\n | JOIN CourseDiscussion\n | ON ChangeLog.chTableId = 130\n | AND ChangeLog.chEntityPk = CourseDiscussion.courseDiscussionUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseDiscussion.courseDiscussionClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionUid,\n | UserSession.usClientNodeId AS courseDiscussionDestination\n | FROM ChangeLog\n | JOIN CourseDiscussion\n | ON ChangeLog.chTableId = 130\n | AND ChangeLog.chEntityPk = CourseDiscussion.courseDiscussionUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseDiscussion.courseDiscussionClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseDiscussionDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_71(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$cbUid = closure$cbUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda; Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cbUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_8($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_8.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_8; Coroutine$updateActiveByUid_zaz62j$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE CourseDiscussion \n | SET courseDiscussionActive = ?, \n | courseDiscussionLct = ?\n | WHERE courseDiscussionUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE CourseDiscussion \n | SET courseDiscussionActive = ?, \n | courseDiscussionLct = ?\n | WHERE courseDiscussionUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$cbUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_8(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_courseDiscussionUid = _resultSet.getLong_61zpoe$('courseDiscussionUid'); var tmp_courseDiscussionTitle = _resultSet.getString_61zpoe$('courseDiscussionTitle'); var tmp_courseDiscussionDesc = _resultSet.getString_61zpoe$('courseDiscussionDesc'); var tmp_courseDiscussionClazzUid = _resultSet.getLong_61zpoe$('courseDiscussionClazzUid'); var tmp_courseDiscussionActive = _resultSet.getBoolean_61zpoe$('courseDiscussionActive'); var tmp_courseDiscussionLct = _resultSet.getLong_61zpoe$('courseDiscussionLct'); var _entity = new CourseDiscussion(); _entity.courseDiscussionUid = tmp_courseDiscussionUid; _entity.courseDiscussionTitle = tmp_courseDiscussionTitle; _entity.courseDiscussionDesc = tmp_courseDiscussionDesc; _entity.courseDiscussionClazzUid = tmp_courseDiscussionClazzUid; _entity.courseDiscussionActive = tmp_courseDiscussionActive; _entity.courseDiscussionLct = tmp_courseDiscussionLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(closure$courseDiscussionUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$courseDiscussionUid = closure$courseDiscussionUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$courseDiscussionUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(closure$courseDiscussionUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(closure$courseDiscussionUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this$CourseDiscussionDao_JdbcKt_0, closure$courseDiscussionUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseDiscussionDao_JdbcKt = this$CourseDiscussionDao_JdbcKt_0; this.local$closure$courseDiscussionUid = closure$courseDiscussionUid_0; this.local$_liveResult = void 0; } Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseDiscussion) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT CourseDiscussion.* \n | FROM CourseDiscussion\n | WHERE CourseDiscussion.courseDiscussionUid = ? \n | AND CAST(CourseDiscussion.courseDiscussionActive AS INTEGER) = 1 \n | \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT CourseDiscussion.* \n | FROM CourseDiscussion\n | WHERE CourseDiscussion.courseDiscussionUid = ? \n | AND CAST(CourseDiscussion.courseDiscussionActive AS INTEGER) = 1 \n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseDiscussionDao_JdbcKt._db, _stmtConfig, CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(this.local$closure$courseDiscussionUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this$CourseDiscussionDao_JdbcKt_0, closure$courseDiscussionUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this$CourseDiscussionDao_JdbcKt_0, closure$courseDiscussionUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseDiscussionDao_JdbcKt.prototype.getCourseDiscussionByUid_s8cxhz$ = function (courseDiscussionUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('CourseDiscussion'), CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this, courseDiscussionUid)); return _result; }; function Coroutine$replaceListAsync_4f5xb2$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_4f5xb2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_4f5xb2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_4f5xb2$.prototype.constructor = Coroutine$replaceListAsync_4f5xb2$; Coroutine$replaceListAsync_4f5xb2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseDiscussion_upsert.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.replaceListAsync_4f5xb2$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_4f5xb2$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseDiscussion_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_77($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_77.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_77.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_77.prototype.constructor = Coroutine$insertAsync_77; Coroutine$insertAsync_77.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseDiscussion_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_77(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseDiscussion_.insertList_4ezy5m$(entityList); }; function CourseDiscussionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.courseDiscussionTitle); _stmt.setString_vqvrqt$(2, _entity.courseDiscussionDesc); _stmt.setLong_6svq3l$(3, _entity.courseDiscussionClazzUid); _stmt.setBoolean_fzusl$(4, _entity.courseDiscussionActive); _stmt.setLong_6svq3l$(5, _entity.courseDiscussionLct); _stmt.setLong_6svq3l$(6, _entity.courseDiscussionUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseDiscussionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseDiscussion SET courseDiscussionTitle = ?, courseDiscussionDesc = ?, courseDiscussionClazzUid = ?, courseDiscussionActive = ?, courseDiscussionLct = ? WHERE courseDiscussionUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseDiscussionDao_JdbcKt$updateList$lambda(entityList)); }; function CourseDiscussionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.courseDiscussionTitle); _stmt.setString_vqvrqt$(2, closure$entity.courseDiscussionDesc); _stmt.setLong_6svq3l$(3, closure$entity.courseDiscussionClazzUid); _stmt.setBoolean_fzusl$(4, closure$entity.courseDiscussionActive); _stmt.setLong_6svq3l$(5, closure$entity.courseDiscussionLct); _stmt.setLong_6svq3l$(6, closure$entity.courseDiscussionUid); return _stmt.executeUpdate(); }; } CourseDiscussionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseDiscussion SET courseDiscussionTitle = ?, courseDiscussionDesc = ?, courseDiscussionClazzUid = ?, courseDiscussionActive = ?, courseDiscussionLct = ? WHERE courseDiscussionUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseDiscussionDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_11($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_11.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_11; Coroutine$insertListAsync_4ezy5m$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseDiscussion_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_11(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda; Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.courseDiscussionTitle); this.local$_stmt.setString_vqvrqt$(2, _entity.courseDiscussionDesc); this.local$_stmt.setLong_6svq3l$(3, _entity.courseDiscussionClazzUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.courseDiscussionActive); this.local$_stmt.setLong_6svq3l$(5, _entity.courseDiscussionLct); this.local$_stmt.setLong_6svq3l$(6, _entity.courseDiscussionUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_11($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_11.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_11; Coroutine$updateListAsync_4ezy5m$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CourseDiscussion SET courseDiscussionTitle = ?, courseDiscussionDesc = ?, courseDiscussionClazzUid = ?, courseDiscussionActive = ?, courseDiscussionLct = ? WHERE courseDiscussionUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseDiscussionDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_11(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO CourseDiscussion (courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING courseDiscussionUid'; } else tmp$ = ''; return "INSERT INTO CourseDiscussion (courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct) VALUES(COALESCE(?,nextval('CourseDiscussion_courseDiscussionUid_seq')), ?, ?, ?, ?, ?) ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionTitle = excluded.courseDiscussionTitle,courseDiscussionDesc = excluded.courseDiscussionDesc,courseDiscussionClazzUid = excluded.courseDiscussionClazzUid,courseDiscussionActive = excluded.courseDiscussionActive,courseDiscussionLct = excluded.courseDiscussionLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.courseDiscussionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.courseDiscussionUid); } stmt.setString_vqvrqt$(2, entity.courseDiscussionTitle); stmt.setString_vqvrqt$(3, entity.courseDiscussionDesc); stmt.setLong_6svq3l$(4, entity.courseDiscussionClazzUid); stmt.setBoolean_fzusl$(5, entity.courseDiscussionActive); stmt.setLong_6svq3l$(6, entity.courseDiscussionLct); }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseDiscussion (courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING courseDiscussionUid'; } else tmp$ = ''; return "INSERT INTO CourseDiscussion (courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct) VALUES(COALESCE(?,nextval('CourseDiscussion_courseDiscussionUid_seq')), ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.courseDiscussionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.courseDiscussionUid); } stmt.setString_vqvrqt$(2, entity.courseDiscussionTitle); stmt.setString_vqvrqt$(3, entity.courseDiscussionDesc); stmt.setLong_6svq3l$(4, entity.courseDiscussionClazzUid); stmt.setBoolean_fzusl$(5, entity.courseDiscussionActive); stmt.setLong_6svq3l$(6, entity.courseDiscussionLct); }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseDiscussionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao_JdbcKt', interfaces: [CourseDiscussionDao]}; function CourseDiscussionDao_ReplicateWrapper(_db, _dao) { CourseDiscussionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_75($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_75.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_75.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_75.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_75; Coroutine$replicateOnNewNode_s8cxhz$_75.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_75(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_72($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_72.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_72.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_72.prototype.constructor = Coroutine$replicateOnChange_72; Coroutine$replicateOnChange_72.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_72(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_9($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_9.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_9; Coroutine$updateActiveByUid_zaz62j$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_9(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.prototype.getCourseDiscussionByUid_s8cxhz$ = function (courseDiscussionUid) { return this._dao_0.getCourseDiscussionByUid_s8cxhz$(courseDiscussionUid); }; function Coroutine$replaceListAsync_4f5xb2$_0($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$list = list_0; } Coroutine$replaceListAsync_4f5xb2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_4f5xb2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_4f5xb2$_0.prototype.constructor = Coroutine$replaceListAsync_4f5xb2$_0; Coroutine$replaceListAsync_4f5xb2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$list.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.courseDiscussionUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.courseDiscussionUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.courseDiscussionLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceListAsync_4f5xb2$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.replaceListAsync_4f5xb2$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_4f5xb2$_0(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_78($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_78.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_78.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_78.prototype.constructor = Coroutine$insertAsync_78; Coroutine$insertAsync_78.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.courseDiscussionUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.courseDiscussionUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.courseDiscussionLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.courseDiscussionUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_78(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseDiscussionDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseDiscussionDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_12($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_12.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_12; Coroutine$insertListAsync_4ezy5m$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.courseDiscussionUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.courseDiscussionUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.courseDiscussionLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_12(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_12($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_12.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_12; Coroutine$updateListAsync_4ezy5m$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.courseDiscussionLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_12(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao_ReplicateWrapper', interfaces: [CourseDiscussionDao]}; function CourseDiscussionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseDiscussionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_76($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_76.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_76.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_76.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_76; Coroutine$replicateOnNewNode_s8cxhz$_76.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_76(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_73($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_73.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_73.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_73.prototype.constructor = Coroutine$replicateOnChange_73; Coroutine$replicateOnChange_73.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_73(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_10($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_10.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_10; Coroutine$updateActiveByUid_zaz62j$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_10(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.prototype.getCourseDiscussionByUid_s8cxhz$ = function (courseDiscussionUid) { var _result = this._dao.getCourseDiscussionByUid_s8cxhz$(courseDiscussionUid); return _result; }; function Coroutine$replaceListAsync_4f5xb2$_1($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_4f5xb2$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_4f5xb2$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_4f5xb2$_1.prototype.constructor = Coroutine$replaceListAsync_4f5xb2$_1; Coroutine$replaceListAsync_4f5xb2$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceListAsync_4f5xb2$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.replaceListAsync_4f5xb2$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_4f5xb2$_1(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_79($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_79.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_79.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_79.prototype.constructor = Coroutine$insertAsync_79; Coroutine$insertAsync_79.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_79(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseDiscussionDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseDiscussionDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_13($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_13.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_13; Coroutine$insertListAsync_4ezy5m$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_13(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_13($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_13.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_13; Coroutine$updateListAsync_4ezy5m$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_13(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao_Repo', interfaces: [CourseDiscussionDao]}; function CourseGroupMemberDao_JdbcKt(_db) { CourseGroupMemberDao.call(this); this._db = _db; this._insertAdapterCourseGroupMember_ = new CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral(this._db); } function Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_77($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_77.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_77.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_77.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_77; Coroutine$replicateOnNewNode_s8cxhz$_77.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | ? AS cgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | JOIN CourseGroupMember\n | ON CourseGroupMember.cgmSetUid = CourseGroupSet.cgsUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = ?), 0) \n | /*psql ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | ? AS cgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | JOIN CourseGroupMember\n | ON CourseGroupMember.cgmSetUid = CourseGroupSet.cgsUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = ?), 0) \n | ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_77(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_74($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_74.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_74.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_74.prototype.constructor = Coroutine$replicateOnChange_74; Coroutine$replicateOnChange_74.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | UserSession.usClientNodeId AS cgmDestination\n | FROM ChangeLog\n | JOIN CourseGroupMember\n | ON ChangeLog.chTableId = 243\n | AND ChangeLog.chEntityPk = CourseGroupMember.cgmUid\n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsUid = CourseGroupMember.cgmSetUid \n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | UserSession.usClientNodeId AS cgmDestination\n | FROM ChangeLog\n | JOIN CourseGroupMember\n | ON ChangeLog.chTableId = 243\n | AND ChangeLog.chEntityPk = CourseGroupMember.cgmUid\n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsUid = CourseGroupMember.cgmSetUid \n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_74(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new CourseGroupMemberPerson(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; var _member_nullFieldCount = 0; var tmp_cgmUid = _resultSet.getLong_61zpoe$('cgmUid'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmSetUid = _resultSet.getLong_61zpoe$('cgmSetUid'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmGroupNumber = _resultSet.getInt_61zpoe$('cgmGroupNumber'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmPersonUid = _resultSet.getLong_61zpoe$('cgmPersonUid'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmLct = _resultSet.getLong_61zpoe$('cgmLct'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }if (_member_nullFieldCount < 5) { if (_entity.member == null) { _entity.member = new CourseGroupMember(); }ensureNotNull(_entity.member).cgmUid = tmp_cgmUid; ensureNotNull(_entity.member).cgmSetUid = tmp_cgmSetUid; ensureNotNull(_entity.member).cgmGroupNumber = tmp_cgmGroupNumber; ensureNotNull(_entity.member).cgmPersonUid = tmp_cgmPersonUid; ensureNotNull(_entity.member).cgmLct = tmp_cgmLct; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(closure$setUid_0, closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$setUid = closure$setUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$setUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(closure$setUid_0, closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(closure$setUid_0, closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByGroupSetAsync_3pjtqy$($this, setUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$setUid = setUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByGroupSetAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByGroupSetAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByGroupSetAsync_3pjtqy$.prototype.constructor = Coroutine$findByGroupSetAsync_3pjtqy$; Coroutine$findByGroupSetAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*, CourseGroupMember.* \n | FROM Person\n | JOIN ClazzEnrolment \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | \n | LEFT JOIN CourseGroupMember\n | ON CourseGroupMember.cgmPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND CourseGroupMember.cgmSetUid = ?\n | \n | WHERE clazzEnrolmentClazzUid = ?\n | ORDER BY Person.firstNames\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Person.*, CourseGroupMember.* \n | FROM Person\n | JOIN ClazzEnrolment \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | \n | LEFT JOIN CourseGroupMember\n | ON CourseGroupMember.cgmPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND CourseGroupMember.cgmSetUid = ?\n | \n | WHERE clazzEnrolmentClazzUid = ?\n | ORDER BY Person.firstNames\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(this.local$setUid, this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.findByGroupSetAsync_3pjtqy$ = function (setUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByGroupSetAsync_3pjtqy$(this, setUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new CourseGroupMemberPerson(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; var _member_nullFieldCount = 0; var tmp_cgmUid = _resultSet.getLong_61zpoe$('cgmUid'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmSetUid = _resultSet.getLong_61zpoe$('cgmSetUid'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmGroupNumber = _resultSet.getInt_61zpoe$('cgmGroupNumber'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmPersonUid = _resultSet.getLong_61zpoe$('cgmPersonUid'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }var tmp_cgmLct = _resultSet.getLong_61zpoe$('cgmLct'); if (_resultSet.wasNull()) { _member_nullFieldCount = _member_nullFieldCount + 1 | 0; }if (_member_nullFieldCount < 5) { if (_entity.member == null) { _entity.member = new CourseGroupMember(); }ensureNotNull(_entity.member).cgmUid = tmp_cgmUid; ensureNotNull(_entity.member).cgmSetUid = tmp_cgmSetUid; ensureNotNull(_entity.member).cgmGroupNumber = tmp_cgmGroupNumber; ensureNotNull(_entity.member).cgmPersonUid = tmp_cgmPersonUid; ensureNotNull(_entity.member).cgmLct = tmp_cgmLct; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(closure$setUid_0, closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$setUid = closure$setUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$setUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(closure$setUid_0, closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(closure$setUid_0, closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByGroupSetOrderedAsync_3pjtqy$($this, setUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$setUid = setUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByGroupSetOrderedAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByGroupSetOrderedAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByGroupSetOrderedAsync_3pjtqy$.prototype.constructor = Coroutine$findByGroupSetOrderedAsync_3pjtqy$; Coroutine$findByGroupSetOrderedAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*, CourseGroupMember.* \n | FROM Person\n | JOIN ClazzEnrolment \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000 \n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | \n | LEFT JOIN CourseGroupMember\n | ON CourseGroupMember.cgmPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND CourseGroupMember.cgmSetUid = ?\n | \n | WHERE clazzEnrolmentClazzUid = ?\n | ORDER BY CourseGroupMember.cgmGroupNumber, Person.firstNames\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Person.*, CourseGroupMember.* \n | FROM Person\n | JOIN ClazzEnrolment \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000 \n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | \n | LEFT JOIN CourseGroupMember\n | ON CourseGroupMember.cgmPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND CourseGroupMember.cgmSetUid = ?\n | \n | WHERE clazzEnrolmentClazzUid = ?\n | ORDER BY CourseGroupMember.cgmGroupNumber, Person.firstNames\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(this.local$setUid, this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.findByGroupSetOrderedAsync_3pjtqy$ = function (setUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByGroupSetOrderedAsync_3pjtqy$(this, setUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cgmUid = _resultSet.getLong_61zpoe$('cgmUid'); var tmp_cgmSetUid = _resultSet.getLong_61zpoe$('cgmSetUid'); var tmp_cgmGroupNumber = _resultSet.getInt_61zpoe$('cgmGroupNumber'); var tmp_cgmPersonUid = _resultSet.getLong_61zpoe$('cgmPersonUid'); var tmp_cgmLct = _resultSet.getLong_61zpoe$('cgmLct'); var _entity = new CourseGroupMember(); _entity.cgmUid = tmp_cgmUid; _entity.cgmSetUid = tmp_cgmSetUid; _entity.cgmGroupNumber = tmp_cgmGroupNumber; _entity.cgmPersonUid = tmp_cgmPersonUid; _entity.cgmLct = tmp_cgmLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(closure$studentUid_0, closure$groupSetUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$studentUid = closure$studentUid_0; this.local$closure$groupSetUid = closure$groupSetUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$studentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$groupSetUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(closure$studentUid_0, closure$groupSetUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(closure$studentUid_0, closure$groupSetUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByPersonUid_3pjtqy$($this, groupSetUid_0, studentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$groupSetUid = groupSetUid_0; this.local$studentUid = studentUid_0; } Coroutine$findByPersonUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUid_3pjtqy$.prototype.constructor = Coroutine$findByPersonUid_3pjtqy$; Coroutine$findByPersonUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseGroupMember) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseGroupMember\n | WHERE cgmPersonUid = ? \n | AND cgmSetUid = ?\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseGroupMember\n | WHERE cgmPersonUid = ? \n | AND cgmSetUid = ?\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(this.local$studentUid, this.local$groupSetUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.findByPersonUid_3pjtqy$ = function (groupSetUid_0, studentUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUid_3pjtqy$(this, groupSetUid_0, studentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_23fuft$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_23fuft$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_23fuft$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_23fuft$.prototype.constructor = Coroutine$insertListAsync_23fuft$; Coroutine$insertListAsync_23fuft$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseGroupMember_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.insertListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_23fuft$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.cgmSetUid); this.local$_stmt.setInt_vux9f0$(2, _entity.cgmGroupNumber); this.local$_stmt.setLong_6svq3l$(3, _entity.cgmPersonUid); this.local$_stmt.setLong_6svq3l$(4, _entity.cgmLct); this.local$_stmt.setLong_6svq3l$(5, _entity.cgmUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_23fuft$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_23fuft$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_23fuft$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_23fuft$.prototype.constructor = Coroutine$updateListAsync_23fuft$; Coroutine$updateListAsync_23fuft$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CourseGroupMember SET cgmSetUid = ?, cgmGroupNumber = ?, cgmPersonUid = ?, cgmLct = ? WHERE cgmUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.updateListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_23fuft$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseGroupMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_80($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_80.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_80.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_80.prototype.constructor = Coroutine$insertAsync_80; Coroutine$insertAsync_80.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseGroupMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_80(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseGroupMember_.insertList_4ezy5m$(entityList); }; function CourseGroupMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cgmSetUid); _stmt.setInt_vux9f0$(2, _entity.cgmGroupNumber); _stmt.setLong_6svq3l$(3, _entity.cgmPersonUid); _stmt.setLong_6svq3l$(4, _entity.cgmLct); _stmt.setLong_6svq3l$(5, _entity.cgmUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseGroupMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseGroupMember SET cgmSetUid = ?, cgmGroupNumber = ?, cgmPersonUid = ?, cgmLct = ? WHERE cgmUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseGroupMemberDao_JdbcKt$updateList$lambda(entityList)); }; function CourseGroupMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cgmSetUid); _stmt.setInt_vux9f0$(2, closure$entity.cgmGroupNumber); _stmt.setLong_6svq3l$(3, closure$entity.cgmPersonUid); _stmt.setLong_6svq3l$(4, closure$entity.cgmLct); _stmt.setLong_6svq3l$(5, closure$entity.cgmUid); return _stmt.executeUpdate(); }; } CourseGroupMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseGroupMember SET cgmSetUid = ?, cgmGroupNumber = ?, cgmPersonUid = ?, cgmLct = ? WHERE cgmUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseGroupMemberDao_JdbcKt$update$lambda(entity)); }; function CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseGroupMember (cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES(?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cgmUid'; } else tmp$ = ''; return "INSERT INTO CourseGroupMember (cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES(COALESCE(?,nextval('CourseGroupMember_cgmUid_seq')), ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cgmUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cgmUid); } stmt.setLong_6svq3l$(2, entity.cgmSetUid); stmt.setInt_vux9f0$(3, entity.cgmGroupNumber); stmt.setLong_6svq3l$(4, entity.cgmPersonUid); stmt.setLong_6svq3l$(5, entity.cgmLct); }; CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseGroupMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao_JdbcKt', interfaces: [CourseGroupMemberDao]}; function CourseGroupMemberDao_ReplicateWrapper(_db, _dao) { CourseGroupMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_78($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_78.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_78.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_78.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_78; Coroutine$replicateOnNewNode_s8cxhz$_78.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_78(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_75($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_75.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_75.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_75.prototype.constructor = Coroutine$replicateOnChange_75; Coroutine$replicateOnChange_75.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_75(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_ReplicateWrapper.prototype.findByGroupSetAsync_3pjtqy$ = function (setUid, clazzUid, continuation) { return this._dao_0.findByGroupSetAsync_3pjtqy$(setUid, clazzUid, continuation); }; CourseGroupMemberDao_ReplicateWrapper.prototype.findByGroupSetOrderedAsync_3pjtqy$ = function (setUid, clazzUid, continuation) { return this._dao_0.findByGroupSetOrderedAsync_3pjtqy$(setUid, clazzUid, continuation); }; CourseGroupMemberDao_ReplicateWrapper.prototype.findByPersonUid_3pjtqy$ = function (groupSetUid, studentUid, continuation) { return this._dao_0.findByPersonUid_3pjtqy$(groupSetUid, studentUid, continuation); }; function Coroutine$insertListAsync_23fuft$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_23fuft$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_23fuft$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_23fuft$_0.prototype.constructor = Coroutine$insertListAsync_23fuft$_0; Coroutine$insertListAsync_23fuft$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cgmUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(243, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cgmUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cgmLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insertListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_23fuft$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_23fuft$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_23fuft$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_23fuft$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_23fuft$_0.prototype.constructor = Coroutine$updateListAsync_23fuft$_0; Coroutine$updateListAsync_23fuft$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.cgmLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.updateListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_23fuft$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_81($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_81.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_81.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_81.prototype.constructor = Coroutine$insertAsync_81; Coroutine$insertAsync_81.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cgmUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(243, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cgmUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cgmLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cgmUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_81(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao_ReplicateWrapper', interfaces: [CourseGroupMemberDao]}; function CourseGroupMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseGroupMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_79($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_79.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_79.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_79.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_79; Coroutine$replicateOnNewNode_s8cxhz$_79.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_79(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_76($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_76.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_76.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_76.prototype.constructor = Coroutine$replicateOnChange_76; Coroutine$replicateOnChange_76.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_76(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByGroupSetAsync_3pjtqy$_0($this, setUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$setUid = setUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByGroupSetAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByGroupSetAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByGroupSetAsync_3pjtqy$_0.prototype.constructor = Coroutine$findByGroupSetAsync_3pjtqy$_0; Coroutine$findByGroupSetAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByGroupSetAsync_3pjtqy$(this.local$setUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.findByGroupSetAsync_3pjtqy$ = function (setUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByGroupSetAsync_3pjtqy$_0(this, setUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0($this, setUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$setUid = setUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0.prototype.constructor = Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0; Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByGroupSetOrderedAsync_3pjtqy$(this.local$setUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.findByGroupSetOrderedAsync_3pjtqy$ = function (setUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByGroupSetOrderedAsync_3pjtqy$_0(this, setUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUid_3pjtqy$_0($this, groupSetUid_0, studentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupSetUid = groupSetUid_0; this.local$studentUid = studentUid_0; } Coroutine$findByPersonUid_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUid_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUid_3pjtqy$_0.prototype.constructor = Coroutine$findByPersonUid_3pjtqy$_0; Coroutine$findByPersonUid_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUid_3pjtqy$(this.local$groupSetUid, this.local$studentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.findByPersonUid_3pjtqy$ = function (groupSetUid_0, studentUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUid_3pjtqy$_0(this, groupSetUid_0, studentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_23fuft$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_23fuft$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_23fuft$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_23fuft$_1.prototype.constructor = Coroutine$insertListAsync_23fuft$_1; Coroutine$insertListAsync_23fuft$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.insertListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_23fuft$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_23fuft$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_23fuft$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_23fuft$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_23fuft$_1.prototype.constructor = Coroutine$updateListAsync_23fuft$_1; Coroutine$updateListAsync_23fuft$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.updateListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_23fuft$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_82($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_82.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_82.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_82.prototype.constructor = Coroutine$insertAsync_82; Coroutine$insertAsync_82.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_82(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseGroupMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseGroupMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseGroupMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao_Repo', interfaces: [CourseGroupMemberDao]}; function CourseGroupSetDao_JdbcKt(_db) { CourseGroupSetDao.call(this); this._db = _db; this._insertAdapterCourseGroupSet_ = new CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral(this._db); } function Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_80($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_80.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_80.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_80.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_80; Coroutine$replicateOnNewNode_s8cxhz$_80.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | ? AS cgsDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = ?), 0) \n | /*psql ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | ? AS cgsDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = ?), 0) \n | ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_80(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_77($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_77.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_77.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_77.prototype.constructor = Coroutine$replicateOnChange_77; Coroutine$replicateOnChange_77.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | UserSession.usClientNodeId AS cgsDestination\n | FROM ChangeLog\n | JOIN CourseGroupSet\n | ON ChangeLog.chTableId = 242\n | AND ChangeLog.chEntityPk = CourseGroupSet.cgsUid\n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | UserSession.usClientNodeId AS cgsDestination\n | FROM ChangeLog\n | JOIN CourseGroupSet\n | ON ChangeLog.chTableId = 242\n | AND ChangeLog.chEntityPk = CourseGroupSet.cgsUid\n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupSetDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_77(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda; Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.cgsName); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.cgsTotalGroups); this.local$_stmt.setBoolean_fzusl$(3, this.local$closure$entity.cgsActive); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.cgsClazzUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.cgsLct); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.cgsUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_6xk07w$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_6xk07w$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6xk07w$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6xk07w$.prototype.constructor = Coroutine$updateAsync_6xk07w$; Coroutine$updateAsync_6xk07w$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CourseGroupSet SET cgsName = ?, cgsTotalGroups = ?, cgsActive = ?, cgsClazzUid = ?, cgsLct = ? WHERE cgsUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseGroupSetDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.updateAsync_6xk07w$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6xk07w$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral(this$CourseGroupSetDao_JdbcKt, closure$clazzUid) { this.this$CourseGroupSetDao_JdbcKt = this$CourseGroupSetDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; DoorDataSourceFactory.call(this); } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cgsUid = _resultSet.getLong_61zpoe$('cgsUid'); var tmp_cgsName = _resultSet.getString_61zpoe$('cgsName'); var tmp_cgsTotalGroups = _resultSet.getInt_61zpoe$('cgsTotalGroups'); var tmp_cgsActive = _resultSet.getBoolean_61zpoe$('cgsActive'); var tmp_cgsClazzUid = _resultSet.getLong_61zpoe$('cgsClazzUid'); var tmp_cgsLct = _resultSet.getLong_61zpoe$('cgsLct'); var _entity = new CourseGroupSet(); _entity.cgsUid = tmp_cgsUid; _entity.cgsName = tmp_cgsName; _entity.cgsTotalGroups = tmp_cgsTotalGroups; _entity.cgsActive = tmp_cgsActive; _entity.cgsClazzUid = tmp_cgsClazzUid; _entity.cgsLct = tmp_cgsLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseGroupSetDao_JdbcKt = this$CourseGroupSetDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseGroupSetDao_JdbcKt._db, _stmtConfig, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CourseGroupSetDao_JdbcKt._db, listOf_0('CourseGroupSet'), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this.this$CourseGroupSetDao_JdbcKt, this.closure$clazzUid, _limit, _offset)); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseGroupSetDao_JdbcKt = this$CourseGroupSetDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_liveResult = void 0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseGroupSetDao_JdbcKt._db, _stmtConfig, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CourseGroupSetDao_JdbcKt._db, listOf_0('CourseGroupSet'), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this.this$CourseGroupSetDao_JdbcKt, this.closure$clazzUid)); }; CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CourseGroupSetDao_JdbcKt.prototype.findAllCourseGroupSetForClazz_s8cxhz$ = function (clazzUid) { var _result = new CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral(this, clazzUid); return _result; }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_cgsUid = _resultSet.getLong_61zpoe$('cgsUid'); var tmp_cgsName = _resultSet.getString_61zpoe$('cgsName'); var tmp_cgsTotalGroups = _resultSet.getInt_61zpoe$('cgsTotalGroups'); var tmp_cgsActive = _resultSet.getBoolean_61zpoe$('cgsActive'); var tmp_cgsClazzUid = _resultSet.getLong_61zpoe$('cgsClazzUid'); var tmp_cgsLct = _resultSet.getLong_61zpoe$('cgsLct'); var _entity = new CourseGroupSet(); _entity.cgsUid = tmp_cgsUid; _entity.cgsName = tmp_cgsName; _entity.cgsTotalGroups = tmp_cgsTotalGroups; _entity.cgsActive = tmp_cgsActive; _entity.cgsClazzUid = tmp_cgsClazzUid; _entity.cgsLct = tmp_cgsLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda(closure$clazzUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$clazzUid); useResults(_stmt.executeQuery(), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda$lambda(closure$_result)); return Unit; }; } CourseGroupSetDao_JdbcKt.prototype.findAllCourseGroupSetForClazzList_s8cxhz$ = function (clazzUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda(clazzUid, _result)); return _result.v; }; function CourseGroupSetDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_cgsUid = _resultSet.getLong_61zpoe$('cgsUid'); var tmp_cgsName = _resultSet.getString_61zpoe$('cgsName'); var tmp_cgsTotalGroups = _resultSet.getInt_61zpoe$('cgsTotalGroups'); var tmp_cgsActive = _resultSet.getBoolean_61zpoe$('cgsActive'); var tmp_cgsClazzUid = _resultSet.getLong_61zpoe$('cgsClazzUid'); var tmp_cgsLct = _resultSet.getLong_61zpoe$('cgsLct'); var _entity = new CourseGroupSet(); _entity.cgsUid = tmp_cgsUid; _entity.cgsName = tmp_cgsName; _entity.cgsTotalGroups = tmp_cgsTotalGroups; _entity.cgsActive = tmp_cgsActive; _entity.cgsClazzUid = tmp_cgsClazzUid; _entity.cgsLct = tmp_cgsLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupSetDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_1($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_1.prototype.constructor = Coroutine$findByUid_1; Coroutine$findByUid_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseGroupSet) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseGroupSet \n | WHERE cgsUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseGroupSet \n | WHERE cgsUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_1(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseGroupSet_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_83($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_83.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_83.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_83.prototype.constructor = Coroutine$insertAsync_83; Coroutine$insertAsync_83.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseGroupSet_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_83(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseGroupSet_.insertList_4ezy5m$(entityList); }; function CourseGroupSetDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.cgsName); _stmt.setInt_vux9f0$(2, _entity.cgsTotalGroups); _stmt.setBoolean_fzusl$(3, _entity.cgsActive); _stmt.setLong_6svq3l$(4, _entity.cgsClazzUid); _stmt.setLong_6svq3l$(5, _entity.cgsLct); _stmt.setLong_6svq3l$(6, _entity.cgsUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseGroupSetDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseGroupSet SET cgsName = ?, cgsTotalGroups = ?, cgsActive = ?, cgsClazzUid = ?, cgsLct = ? WHERE cgsUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseGroupSetDao_JdbcKt$updateList$lambda(entityList)); }; function CourseGroupSetDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.cgsName); _stmt.setInt_vux9f0$(2, closure$entity.cgsTotalGroups); _stmt.setBoolean_fzusl$(3, closure$entity.cgsActive); _stmt.setLong_6svq3l$(4, closure$entity.cgsClazzUid); _stmt.setLong_6svq3l$(5, closure$entity.cgsLct); _stmt.setLong_6svq3l$(6, closure$entity.cgsUid); return _stmt.executeUpdate(); }; } CourseGroupSetDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseGroupSet SET cgsName = ?, cgsTotalGroups = ?, cgsActive = ?, cgsClazzUid = ?, cgsLct = ? WHERE cgsUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseGroupSetDao_JdbcKt$update$lambda(entity)); }; function CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseGroupSet (cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING cgsUid'; } else tmp$ = ''; return "INSERT INTO CourseGroupSet (cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES(COALESCE(?,nextval('CourseGroupSet_cgsUid_seq')), ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cgsUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cgsUid); } stmt.setString_vqvrqt$(2, entity.cgsName); stmt.setInt_vux9f0$(3, entity.cgsTotalGroups); stmt.setBoolean_fzusl$(4, entity.cgsActive); stmt.setLong_6svq3l$(5, entity.cgsClazzUid); stmt.setLong_6svq3l$(6, entity.cgsLct); }; CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseGroupSetDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao_JdbcKt', interfaces: [CourseGroupSetDao]}; function CourseGroupSetDao_ReplicateWrapper(_db, _dao) { CourseGroupSetDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_81($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_81.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_81.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_81.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_81; Coroutine$replicateOnNewNode_s8cxhz$_81.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_81(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_78($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_78.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_78.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_78.prototype.constructor = Coroutine$replicateOnChange_78; Coroutine$replicateOnChange_78.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_78(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_ReplicateWrapper.prototype.updateAsync_6xk07w$ = function (entity, continuation) { entity.cgsLct = systemTimeInMillis(); return this._dao_0.updateAsync_6xk07w$(entity, continuation); }; CourseGroupSetDao_ReplicateWrapper.prototype.findAllCourseGroupSetForClazz_s8cxhz$ = function (clazzUid) { return this._dao_0.findAllCourseGroupSetForClazz_s8cxhz$(clazzUid); }; CourseGroupSetDao_ReplicateWrapper.prototype.findAllCourseGroupSetForClazzList_s8cxhz$ = function (clazzUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.prototype.findByUid = function (uid, continuation) { return this._dao_0.findByUid(uid, continuation); }; CourseGroupSetDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_84($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_84.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_84.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_84.prototype.constructor = Coroutine$insertAsync_84; Coroutine$insertAsync_84.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cgsUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(242, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cgsUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cgsLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cgsUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_84(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao_ReplicateWrapper', interfaces: [CourseGroupSetDao]}; function CourseGroupSetDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseGroupSetDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_82($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_82.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_82.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_82.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_82; Coroutine$replicateOnNewNode_s8cxhz$_82.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_82(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_79($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_79.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_79.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_79.prototype.constructor = Coroutine$replicateOnChange_79; Coroutine$replicateOnChange_79.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_79(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_6xk07w$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_6xk07w$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6xk07w$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6xk07w$_0.prototype.constructor = Coroutine$updateAsync_6xk07w$_0; Coroutine$updateAsync_6xk07w$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_6xk07w$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.updateAsync_6xk07w$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6xk07w$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_Repo.prototype.findAllCourseGroupSetForClazz_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllCourseGroupSetForClazz_s8cxhz$(clazzUid); return _result; }; CourseGroupSetDao_Repo.prototype.findAllCourseGroupSetForClazzList_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllCourseGroupSetForClazzList_s8cxhz$(clazzUid); return _result; }; function Coroutine$findByUid_2($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_2.prototype.constructor = Coroutine$findByUid_2; Coroutine$findByUid_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_2(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_85($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_85.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_85.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_85.prototype.constructor = Coroutine$insertAsync_85; Coroutine$insertAsync_85.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_85(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseGroupSetDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseGroupSetDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseGroupSetDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao_Repo', interfaces: [CourseGroupSetDao]}; function CoursePictureDao_JdbcKt(_db) { CoursePictureDao.call(this); this._db = _db; this._insertAdapterCoursePicture_ = new CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral(this._db); } function Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_83($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_83.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_83.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_83.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_83; Coroutine$replicateOnNewNode_s8cxhz$_83.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpPk,\n | ? AS cpDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CoursePicture\n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = ?), 0) \n | /*psql ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpPk,\n | ? AS cpDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CoursePicture\n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = ?), 0) \n | ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_83(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda; Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_80($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_80.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_80.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_80.prototype.constructor = Coroutine$replicateOnChange_80; Coroutine$replicateOnChange_80.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpUid,\n | UserSession.usClientNodeId AS cpDestination\n | FROM ChangeLog\n | JOIN CoursePicture\n | ON ChangeLog.chTableId = 125\n | AND ChangeLog.chEntityPk = CoursePicture.coursePictureUid\n | JOIN Clazz \n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | \n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpUid,\n | UserSession.usClientNodeId AS cpDestination\n | FROM ChangeLog\n | JOIN CoursePicture\n | ON ChangeLog.chTableId = 125\n | AND ChangeLog.chEntityPk = CoursePicture.coursePictureUid\n | JOIN Clazz \n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | \n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CoursePictureDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_80(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_coursePictureUid = _resultSet.getLong_61zpoe$('coursePictureUid'); var tmp_coursePictureClazzUid = _resultSet.getLong_61zpoe$('coursePictureClazzUid'); var tmp_coursePictureMasterCsn = _resultSet.getLong_61zpoe$('coursePictureMasterCsn'); var tmp_coursePictureLocalCsn = _resultSet.getLong_61zpoe$('coursePictureLocalCsn'); var tmp_coursePictureLastChangedBy = _resultSet.getInt_61zpoe$('coursePictureLastChangedBy'); var tmp_coursePictureLct = _resultSet.getLong_61zpoe$('coursePictureLct'); var tmp_coursePictureUri = _resultSet.getString_61zpoe$('coursePictureUri'); var tmp_coursePictureMd5 = _resultSet.getString_61zpoe$('coursePictureMd5'); var tmp_coursePictureFileSize = _resultSet.getInt_61zpoe$('coursePictureFileSize'); var tmp_coursePictureTimestamp = _resultSet.getLong_61zpoe$('coursePictureTimestamp'); var tmp_coursePictureMimeType = _resultSet.getString_61zpoe$('coursePictureMimeType'); var tmp_coursePictureActive = _resultSet.getBoolean_61zpoe$('coursePictureActive'); var _entity = new CoursePicture(); _entity.coursePictureUid = tmp_coursePictureUid; _entity.coursePictureClazzUid = tmp_coursePictureClazzUid; _entity.coursePictureMasterCsn = tmp_coursePictureMasterCsn; _entity.coursePictureLocalCsn = tmp_coursePictureLocalCsn; _entity.coursePictureLastChangedBy = tmp_coursePictureLastChangedBy; _entity.coursePictureLct = tmp_coursePictureLct; _entity.coursePictureUri = tmp_coursePictureUri; _entity.coursePictureMd5 = tmp_coursePictureMd5; _entity.coursePictureFileSize = tmp_coursePictureFileSize; _entity.coursePictureTimestamp = tmp_coursePictureTimestamp; _entity.coursePictureMimeType = tmp_coursePictureMimeType; _entity.coursePictureActive = tmp_coursePictureActive; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$findByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByClazzUidAsync_s8cxhz$; Coroutine$findByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CoursePicture) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM CoursePicture \n | WHERE coursePictureClazzUid = ?\n | AND CAST(coursePictureActive AS INTEGER) = 1\n | ORDER BY coursePictureTimestamp DESC LIMIT 1\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CoursePicture \n | WHERE coursePictureClazzUid = ?\n | AND CAST(coursePictureActive AS INTEGER) = 1\n | ORDER BY coursePictureTimestamp DESC LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.findByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_coursePictureUid = _resultSet.getLong_61zpoe$('coursePictureUid'); var tmp_coursePictureClazzUid = _resultSet.getLong_61zpoe$('coursePictureClazzUid'); var tmp_coursePictureMasterCsn = _resultSet.getLong_61zpoe$('coursePictureMasterCsn'); var tmp_coursePictureLocalCsn = _resultSet.getLong_61zpoe$('coursePictureLocalCsn'); var tmp_coursePictureLastChangedBy = _resultSet.getInt_61zpoe$('coursePictureLastChangedBy'); var tmp_coursePictureLct = _resultSet.getLong_61zpoe$('coursePictureLct'); var tmp_coursePictureUri = _resultSet.getString_61zpoe$('coursePictureUri'); var tmp_coursePictureMd5 = _resultSet.getString_61zpoe$('coursePictureMd5'); var tmp_coursePictureFileSize = _resultSet.getInt_61zpoe$('coursePictureFileSize'); var tmp_coursePictureTimestamp = _resultSet.getLong_61zpoe$('coursePictureTimestamp'); var tmp_coursePictureMimeType = _resultSet.getString_61zpoe$('coursePictureMimeType'); var tmp_coursePictureActive = _resultSet.getBoolean_61zpoe$('coursePictureActive'); var _entity = new CoursePicture(); _entity.coursePictureUid = tmp_coursePictureUid; _entity.coursePictureClazzUid = tmp_coursePictureClazzUid; _entity.coursePictureMasterCsn = tmp_coursePictureMasterCsn; _entity.coursePictureLocalCsn = tmp_coursePictureLocalCsn; _entity.coursePictureLastChangedBy = tmp_coursePictureLastChangedBy; _entity.coursePictureLct = tmp_coursePictureLct; _entity.coursePictureUri = tmp_coursePictureUri; _entity.coursePictureMd5 = tmp_coursePictureMd5; _entity.coursePictureFileSize = tmp_coursePictureFileSize; _entity.coursePictureTimestamp = tmp_coursePictureTimestamp; _entity.coursePictureMimeType = tmp_coursePictureMimeType; _entity.coursePictureActive = tmp_coursePictureActive; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this$CoursePictureDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CoursePictureDao_JdbcKt = this$CoursePictureDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_liveResult = void 0; } Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CoursePicture) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CoursePicture where coursePictureClazzUid = ? ORDER BY coursePictureTimestamp DESC LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CoursePicture where coursePictureClazzUid = ? ORDER BY coursePictureTimestamp DESC LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CoursePictureDao_JdbcKt._db, _stmtConfig, CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(this.local$closure$clazzUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this$CoursePictureDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this$CoursePictureDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CoursePictureDao_JdbcKt.prototype.findByClazzUidLive_s8cxhz$ = function (clazzUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('CoursePicture'), CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this, clazzUid)); return _result; }; function Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda(closure$coursePicture_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$coursePicture = closure$coursePicture_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda; Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$coursePicture.coursePictureClazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$coursePicture.coursePictureMasterCsn); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$coursePicture.coursePictureLocalCsn); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$coursePicture.coursePictureLastChangedBy); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$coursePicture.coursePictureLct); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$coursePicture.coursePictureUri); this.local$_stmt.setString_vqvrqt$(7, this.local$closure$coursePicture.coursePictureMd5); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$coursePicture.coursePictureFileSize); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$coursePicture.coursePictureTimestamp); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$coursePicture.coursePictureMimeType); this.local$_stmt.setBoolean_fzusl$(11, this.local$closure$coursePicture.coursePictureActive); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$coursePicture.coursePictureUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$updateAsync$lambda(closure$coursePicture_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda(closure$coursePicture_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_xhijq5$($this, coursePicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$coursePicture = coursePicture_0; } Coroutine$updateAsync_xhijq5$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_xhijq5$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_xhijq5$.prototype.constructor = Coroutine$updateAsync_xhijq5$; Coroutine$updateAsync_xhijq5$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CoursePicture SET coursePictureClazzUid = ?, coursePictureMasterCsn = ?, coursePictureLocalCsn = ?, coursePictureLastChangedBy = ?, coursePictureLct = ?, coursePictureUri = ?, coursePictureMd5 = ?, coursePictureFileSize = ?, coursePictureTimestamp = ?, coursePictureMimeType = ?, coursePictureActive = ? WHERE coursePictureUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CoursePictureDao_JdbcKt$updateAsync$lambda(this.local$coursePicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.updateAsync_xhijq5$ = function (coursePicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_xhijq5$(this, coursePicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCoursePicture_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_86($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_86.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_86.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_86.prototype.constructor = Coroutine$insertAsync_86; Coroutine$insertAsync_86.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCoursePicture_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_86(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCoursePicture_.insertList_4ezy5m$(entityList); }; function CoursePictureDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.coursePictureClazzUid); _stmt.setLong_6svq3l$(2, _entity.coursePictureMasterCsn); _stmt.setLong_6svq3l$(3, _entity.coursePictureLocalCsn); _stmt.setInt_vux9f0$(4, _entity.coursePictureLastChangedBy); _stmt.setLong_6svq3l$(5, _entity.coursePictureLct); _stmt.setString_vqvrqt$(6, _entity.coursePictureUri); _stmt.setString_vqvrqt$(7, _entity.coursePictureMd5); _stmt.setInt_vux9f0$(8, _entity.coursePictureFileSize); _stmt.setLong_6svq3l$(9, _entity.coursePictureTimestamp); _stmt.setString_vqvrqt$(10, _entity.coursePictureMimeType); _stmt.setBoolean_fzusl$(11, _entity.coursePictureActive); _stmt.setLong_6svq3l$(12, _entity.coursePictureUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CoursePictureDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CoursePicture SET coursePictureClazzUid = ?, coursePictureMasterCsn = ?, coursePictureLocalCsn = ?, coursePictureLastChangedBy = ?, coursePictureLct = ?, coursePictureUri = ?, coursePictureMd5 = ?, coursePictureFileSize = ?, coursePictureTimestamp = ?, coursePictureMimeType = ?, coursePictureActive = ? WHERE coursePictureUid = ?'; prepareAndUseStatement_0(this._db, _sql, CoursePictureDao_JdbcKt$updateList$lambda(entityList)); }; function CoursePictureDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.coursePictureClazzUid); _stmt.setLong_6svq3l$(2, closure$entity.coursePictureMasterCsn); _stmt.setLong_6svq3l$(3, closure$entity.coursePictureLocalCsn); _stmt.setInt_vux9f0$(4, closure$entity.coursePictureLastChangedBy); _stmt.setLong_6svq3l$(5, closure$entity.coursePictureLct); _stmt.setString_vqvrqt$(6, closure$entity.coursePictureUri); _stmt.setString_vqvrqt$(7, closure$entity.coursePictureMd5); _stmt.setInt_vux9f0$(8, closure$entity.coursePictureFileSize); _stmt.setLong_6svq3l$(9, closure$entity.coursePictureTimestamp); _stmt.setString_vqvrqt$(10, closure$entity.coursePictureMimeType); _stmt.setBoolean_fzusl$(11, closure$entity.coursePictureActive); _stmt.setLong_6svq3l$(12, closure$entity.coursePictureUid); return _stmt.executeUpdate(); }; } CoursePictureDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CoursePicture SET coursePictureClazzUid = ?, coursePictureMasterCsn = ?, coursePictureLocalCsn = ?, coursePictureLastChangedBy = ?, coursePictureLct = ?, coursePictureUri = ?, coursePictureMd5 = ?, coursePictureFileSize = ?, coursePictureTimestamp = ?, coursePictureMimeType = ?, coursePictureActive = ? WHERE coursePictureUid = ?'; prepareAndUseStatement_0(this._db, _sql, CoursePictureDao_JdbcKt$update$lambda(entity)); }; function CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CoursePicture (coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING coursePictureUid'; } else tmp$ = ''; return "INSERT INTO CoursePicture (coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES(COALESCE(?,nextval('CoursePicture_coursePictureUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.coursePictureUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.coursePictureUid); } stmt.setLong_6svq3l$(2, entity.coursePictureClazzUid); stmt.setLong_6svq3l$(3, entity.coursePictureMasterCsn); stmt.setLong_6svq3l$(4, entity.coursePictureLocalCsn); stmt.setInt_vux9f0$(5, entity.coursePictureLastChangedBy); stmt.setLong_6svq3l$(6, entity.coursePictureLct); stmt.setString_vqvrqt$(7, entity.coursePictureUri); stmt.setString_vqvrqt$(8, entity.coursePictureMd5); stmt.setInt_vux9f0$(9, entity.coursePictureFileSize); stmt.setLong_6svq3l$(10, entity.coursePictureTimestamp); stmt.setString_vqvrqt$(11, entity.coursePictureMimeType); stmt.setBoolean_fzusl$(12, entity.coursePictureActive); }; CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CoursePictureDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao_JdbcKt', interfaces: [CoursePictureDao]}; function CoursePictureDao_ReplicateWrapper(_db, _dao) { CoursePictureDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_84($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_84.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_84.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_84.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_84; Coroutine$replicateOnNewNode_s8cxhz$_84.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_84(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_81($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_81.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_81.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_81.prototype.constructor = Coroutine$replicateOnChange_81; Coroutine$replicateOnChange_81.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_81(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_ReplicateWrapper.prototype.findByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.findByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; CoursePictureDao_ReplicateWrapper.prototype.findByClazzUidLive_s8cxhz$ = function (clazzUid) { return this._dao_0.findByClazzUidLive_s8cxhz$(clazzUid); }; function Coroutine$updateAsync_xhijq5$_0($this, coursePicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$coursePicture = coursePicture_0; } Coroutine$updateAsync_xhijq5$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_xhijq5$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_xhijq5$_0.prototype.constructor = Coroutine$updateAsync_xhijq5$_0; Coroutine$updateAsync_xhijq5$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new CoursePicture_EwaAdapter(this.local$coursePicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.local$coursePicture.coursePictureLct = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.$this._dao_0.updateAsync_xhijq5$(this.local$coursePicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.updateAsync_xhijq5$ = function (coursePicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_xhijq5$_0(this, coursePicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_87($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_87.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_87.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_87.prototype.constructor = Coroutine$insertAsync_87; Coroutine$insertAsync_87.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new CoursePicture_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.coursePictureUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(125, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.coursePictureUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.coursePictureLct = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.coursePictureUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_87(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CoursePictureDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CoursePictureDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CoursePictureDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao_ReplicateWrapper', interfaces: [CoursePictureDao]}; function CoursePictureDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CoursePictureDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_85($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_85.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_85.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_85.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_85; Coroutine$replicateOnNewNode_s8cxhz$_85.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_85(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_82($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_82.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_82.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_82.prototype.constructor = Coroutine$replicateOnChange_82; Coroutine$replicateOnChange_82.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_82(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByClazzUidAsync_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$findByClazzUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByClazzUidAsync_s8cxhz$_0; Coroutine$findByClazzUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.findByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidAsync_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_Repo.prototype.findByClazzUidLive_s8cxhz$ = function (clazzUid) { var _result = this._dao.findByClazzUidLive_s8cxhz$(clazzUid); return _result; }; function Coroutine$updateAsync_xhijq5$_1($this, coursePicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$coursePicture = coursePicture_0; } Coroutine$updateAsync_xhijq5$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_xhijq5$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_xhijq5$_1.prototype.constructor = Coroutine$updateAsync_xhijq5$_1; Coroutine$updateAsync_xhijq5$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_xhijq5$(this.local$coursePicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.updateAsync_xhijq5$ = function (coursePicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_xhijq5$_1(this, coursePicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_88($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_88.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_88.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_88.prototype.constructor = Coroutine$insertAsync_88; Coroutine$insertAsync_88.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_88(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CoursePictureDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CoursePictureDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CoursePictureDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao_Repo', interfaces: [CoursePictureDao]}; function CourseTerminologyDao_JdbcKt(_db) { CourseTerminologyDao.call(this); this._db = _db; this._insertAdapterCourseTerminology_ = new CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral(this._db); } function Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_86($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_86.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_86.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_86.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_86; Coroutine$replicateOnNewNode_s8cxhz$_86.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctPk,\n | ? AS ctDestination\n | FROM CourseTerminology\n | WHERE CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = ?), 0) \n | /*psql ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctPk,\n | ? AS ctDestination\n | FROM CourseTerminology\n | WHERE CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = ?), 0) \n | ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_86(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_83($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_83.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_83.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_83.prototype.constructor = Coroutine$replicateOnChange_83; Coroutine$replicateOnChange_83.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctUid,\n | UserSession.usClientNodeId AS ctDestination\n | FROM ChangeLog\n | JOIN CourseTerminology\n | ON ChangeLog.chTableId = 450\n | AND ChangeLog.chEntityPk = CourseTerminology.ctUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctUid,\n | UserSession.usClientNodeId AS ctDestination\n | FROM ChangeLog\n | JOIN CourseTerminology\n | ON ChangeLog.chTableId = 450\n | AND ChangeLog.chEntityPk = CourseTerminology.ctUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseTerminologyDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_83(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral(this$CourseTerminologyDao_JdbcKt) { this.this$CourseTerminologyDao_JdbcKt = this$CourseTerminologyDao_JdbcKt; DoorDataSourceFactory.call(this); } function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); var _entity = new CourseTerminology(); _entity.ctUid = tmp_ctUid; _entity.ctTitle = tmp_ctTitle; _entity.ctTerminology = tmp_ctTerminology; _entity.ctLct = tmp_ctLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this$CourseTerminologyDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseTerminologyDao_JdbcKt = this$CourseTerminologyDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseTerminologyDao_JdbcKt._db, _stmtConfig, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this$CourseTerminologyDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this$CourseTerminologyDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$CourseTerminologyDao_JdbcKt._db, listOf_0('CourseTerminology'), CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this.this$CourseTerminologyDao_JdbcKt, _limit, _offset)); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this$CourseTerminologyDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseTerminologyDao_JdbcKt = this$CourseTerminologyDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseTerminologyDao_JdbcKt._db, _stmtConfig, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this$CourseTerminologyDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this$CourseTerminologyDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$CourseTerminologyDao_JdbcKt._db, listOf_0('CourseTerminology'), CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this.this$CourseTerminologyDao_JdbcKt)); }; CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; CourseTerminologyDao_JdbcKt.prototype.findAllCourseTerminology = function () { var _result = new CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral(this); return _result; }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); var _entity = new CourseTerminology(); _entity.ctUid = tmp_ctUid; _entity.ctTitle = tmp_ctTitle; _entity.ctTerminology = tmp_ctTerminology; _entity.ctLct = tmp_ctLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda$lambda(closure$_result)); return Unit; }; } CourseTerminologyDao_JdbcKt.prototype.findAllCourseTerminologyList = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda(_result)); return _result.v; }; function CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); var _entity = new CourseTerminology(); _entity.ctUid = tmp_ctUid; _entity.ctTitle = tmp_ctTitle; _entity.ctTerminology = tmp_ctTerminology; _entity.ctLct = tmp_ctLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda; Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getTerminologyForClazz_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$getTerminologyForClazz_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTerminologyForClazz_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTerminologyForClazz_s8cxhz$.prototype.constructor = Coroutine$getTerminologyForClazz_s8cxhz$; Coroutine$getTerminologyForClazz_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseTerminology) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM CourseTerminology\n | JOIN Clazz \n | ON Clazz.clazzTerminologyUid = CourseTerminology.ctUid\n | WHERE Clazz.clazzUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT *\n | FROM CourseTerminology\n | JOIN Clazz \n | ON Clazz.clazzTerminologyUid = CourseTerminology.ctUid\n | WHERE Clazz.clazzUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.getTerminologyForClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getTerminologyForClazz_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseTerminologyDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_ctUid = _resultSet.getLong_61zpoe$('ctUid'); var tmp_ctTitle = _resultSet.getString_61zpoe$('ctTitle'); var tmp_ctTerminology = _resultSet.getString_61zpoe$('ctTerminology'); var tmp_ctLct = _resultSet.getLong_61zpoe$('ctLct'); var _entity = new CourseTerminology(); _entity.ctUid = tmp_ctUid; _entity.ctTitle = tmp_ctTitle; _entity.ctTerminology = tmp_ctTerminology; _entity.ctLct = tmp_ctLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_3($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_3.prototype.constructor = Coroutine$findByUid_3; Coroutine$findByUid_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CourseTerminology) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseTerminology \n | WHERE ctUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM CourseTerminology \n | WHERE ctUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_3(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda; Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.ctTitle); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.ctTerminology); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.ctLct); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.ctUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_9k9ym$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_9k9ym$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_9k9ym$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_9k9ym$.prototype.constructor = Coroutine$updateAsync_9k9ym$; Coroutine$updateAsync_9k9ym$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CourseTerminology SET ctTitle = ?, ctTerminology = ?, ctLct = ? WHERE ctUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseTerminologyDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.updateAsync_9k9ym$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_9k9ym$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseTerminology_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_89($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_89.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_89.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_89.prototype.constructor = Coroutine$insertAsync_89; Coroutine$insertAsync_89.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseTerminology_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_89(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseTerminology_.insertList_4ezy5m$(entityList); }; function CourseTerminologyDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.ctTitle); _stmt.setString_vqvrqt$(2, _entity.ctTerminology); _stmt.setLong_6svq3l$(3, _entity.ctLct); _stmt.setLong_6svq3l$(4, _entity.ctUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseTerminologyDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseTerminology SET ctTitle = ?, ctTerminology = ?, ctLct = ? WHERE ctUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseTerminologyDao_JdbcKt$updateList$lambda(entityList)); }; function CourseTerminologyDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.ctTitle); _stmt.setString_vqvrqt$(2, closure$entity.ctTerminology); _stmt.setLong_6svq3l$(3, closure$entity.ctLct); _stmt.setLong_6svq3l$(4, closure$entity.ctUid); return _stmt.executeUpdate(); }; } CourseTerminologyDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseTerminology SET ctTitle = ?, ctTerminology = ?, ctLct = ? WHERE ctUid = ?'; prepareAndUseStatement_0(this._db, _sql, CourseTerminologyDao_JdbcKt$update$lambda(entity)); }; function CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CourseTerminology (ctUid, ctTitle, ctTerminology, ctLct) VALUES(?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING ctUid'; } else tmp$ = ''; return "INSERT INTO CourseTerminology (ctUid, ctTitle, ctTerminology, ctLct) VALUES(COALESCE(?,nextval('CourseTerminology_ctUid_seq')), ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ctUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ctUid); } stmt.setString_vqvrqt$(2, entity.ctTitle); stmt.setString_vqvrqt$(3, entity.ctTerminology); stmt.setLong_6svq3l$(4, entity.ctLct); }; CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseTerminologyDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao_JdbcKt', interfaces: [CourseTerminologyDao]}; function CourseTerminologyDao_ReplicateWrapper(_db, _dao) { CourseTerminologyDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_87($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_87.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_87.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_87.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_87; Coroutine$replicateOnNewNode_s8cxhz$_87.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_87(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_84($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_84.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_84.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_84.prototype.constructor = Coroutine$replicateOnChange_84; Coroutine$replicateOnChange_84.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_84(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_ReplicateWrapper.prototype.findAllCourseTerminology = function () { return this._dao_0.findAllCourseTerminology(); }; CourseTerminologyDao_ReplicateWrapper.prototype.findAllCourseTerminologyList = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.prototype.getTerminologyForClazz_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getTerminologyForClazz_s8cxhz$(clazzUid, continuation); }; CourseTerminologyDao_ReplicateWrapper.prototype.findByUid = function (uid, continuation) { return this._dao_0.findByUid(uid, continuation); }; CourseTerminologyDao_ReplicateWrapper.prototype.updateAsync_9k9ym$ = function (entity, continuation) { entity.ctLct = systemTimeInMillis(); return this._dao_0.updateAsync_9k9ym$(entity, continuation); }; CourseTerminologyDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_90($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_90.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_90.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_90.prototype.constructor = Coroutine$insertAsync_90; Coroutine$insertAsync_90.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ctUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(450, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ctUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ctLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ctUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_90(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao_ReplicateWrapper', interfaces: [CourseTerminologyDao]}; function CourseTerminologyDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseTerminologyDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_88($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_88.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_88.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_88.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_88; Coroutine$replicateOnNewNode_s8cxhz$_88.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_88(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_85($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_85.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_85.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_85.prototype.constructor = Coroutine$replicateOnChange_85; Coroutine$replicateOnChange_85.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_85(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_Repo.prototype.findAllCourseTerminology = function () { var _result = this._dao.findAllCourseTerminology(); return _result; }; CourseTerminologyDao_Repo.prototype.findAllCourseTerminologyList = function () { var _result = this._dao.findAllCourseTerminologyList(); return _result; }; function Coroutine$getTerminologyForClazz_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getTerminologyForClazz_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTerminologyForClazz_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTerminologyForClazz_s8cxhz$_0.prototype.constructor = Coroutine$getTerminologyForClazz_s8cxhz$_0; Coroutine$getTerminologyForClazz_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getTerminologyForClazz_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.getTerminologyForClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getTerminologyForClazz_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_4($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_4.prototype.constructor = Coroutine$findByUid_4; Coroutine$findByUid_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_4(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_9k9ym$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_9k9ym$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_9k9ym$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_9k9ym$_0.prototype.constructor = Coroutine$updateAsync_9k9ym$_0; Coroutine$updateAsync_9k9ym$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_9k9ym$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.updateAsync_9k9ym$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_9k9ym$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_91($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_91.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_91.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_91.prototype.constructor = Coroutine$insertAsync_91; Coroutine$insertAsync_91.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_91(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseTerminologyDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseTerminologyDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseTerminologyDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao_Repo', interfaces: [CourseTerminologyDao]}; function CustomFieldDao_JdbcKt(_db) { CustomFieldDao.call(this); this._db = _db; this._insertAdapterCustomField_ = new CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral(this._db); } function CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_customFieldUid = _resultSet.getLong_61zpoe$('customFieldUid'); var tmp_customFieldName = _resultSet.getString_61zpoe$('customFieldName'); var tmp_customFieldNameAlt = _resultSet.getString_61zpoe$('customFieldNameAlt'); var tmp_customFieldLabelMessageID = _resultSet.getInt_61zpoe$('customFieldLabelMessageID'); var tmp_customFieldIcon = _resultSet.getString_61zpoe$('customFieldIcon'); var tmp_customFieldIconId = _resultSet.getInt_61zpoe$('customFieldIconId'); var tmp_actionOnClick = _resultSet.getString_61zpoe$('actionOnClick'); var tmp_customFieldType = _resultSet.getInt_61zpoe$('customFieldType'); var tmp_customFieldEntityType = _resultSet.getInt_61zpoe$('customFieldEntityType'); var tmp_customFieldActive = _resultSet.getBoolean_61zpoe$('customFieldActive'); var tmp_customFieldDefaultValue = _resultSet.getString_61zpoe$('customFieldDefaultValue'); var tmp_customFieldMCSN = _resultSet.getLong_61zpoe$('customFieldMCSN'); var tmp_customFieldLCSN = _resultSet.getLong_61zpoe$('customFieldLCSN'); var tmp_customFieldLCB = _resultSet.getInt_61zpoe$('customFieldLCB'); var tmp_customFieldLct = _resultSet.getLong_61zpoe$('customFieldLct'); var tmp_customFieldInputType = _resultSet.getInt_61zpoe$('customFieldInputType'); var _entity = new CustomField(); _entity.customFieldUid = tmp_customFieldUid; _entity.customFieldName = tmp_customFieldName; _entity.customFieldNameAlt = tmp_customFieldNameAlt; _entity.customFieldLabelMessageID = tmp_customFieldLabelMessageID; _entity.customFieldIcon = tmp_customFieldIcon; _entity.customFieldIconId = tmp_customFieldIconId; _entity.actionOnClick = tmp_actionOnClick; _entity.customFieldType = tmp_customFieldType; _entity.customFieldEntityType = tmp_customFieldEntityType; _entity.customFieldActive = tmp_customFieldActive; _entity.customFieldDefaultValue = tmp_customFieldDefaultValue; _entity.customFieldMCSN = tmp_customFieldMCSN; _entity.customFieldLCSN = tmp_customFieldLCSN; _entity.customFieldLCB = tmp_customFieldLCB; _entity.customFieldLct = tmp_customFieldLct; _entity.customFieldInputType = tmp_customFieldInputType; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda(this$CustomFieldDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CustomFieldDao_JdbcKt = this$CustomFieldDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda; Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CustomField) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CustomField WHERE customFieldUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CustomField WHERE customFieldUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CustomFieldDao_JdbcKt._db, _stmtConfig, CustomFieldDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldDao_JdbcKt$findByUidLive$lambda(this$CustomFieldDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CustomFieldDao_JdbcKt$findByUidLive$lambda(this$CustomFieldDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CustomFieldDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('CustomField'), CustomFieldDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function CustomFieldDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_customFieldUid = _resultSet.getLong_61zpoe$('customFieldUid'); var tmp_customFieldName = _resultSet.getString_61zpoe$('customFieldName'); var tmp_customFieldNameAlt = _resultSet.getString_61zpoe$('customFieldNameAlt'); var tmp_customFieldLabelMessageID = _resultSet.getInt_61zpoe$('customFieldLabelMessageID'); var tmp_customFieldIcon = _resultSet.getString_61zpoe$('customFieldIcon'); var tmp_customFieldIconId = _resultSet.getInt_61zpoe$('customFieldIconId'); var tmp_actionOnClick = _resultSet.getString_61zpoe$('actionOnClick'); var tmp_customFieldType = _resultSet.getInt_61zpoe$('customFieldType'); var tmp_customFieldEntityType = _resultSet.getInt_61zpoe$('customFieldEntityType'); var tmp_customFieldActive = _resultSet.getBoolean_61zpoe$('customFieldActive'); var tmp_customFieldDefaultValue = _resultSet.getString_61zpoe$('customFieldDefaultValue'); var tmp_customFieldMCSN = _resultSet.getLong_61zpoe$('customFieldMCSN'); var tmp_customFieldLCSN = _resultSet.getLong_61zpoe$('customFieldLCSN'); var tmp_customFieldLCB = _resultSet.getInt_61zpoe$('customFieldLCB'); var tmp_customFieldLct = _resultSet.getLong_61zpoe$('customFieldLct'); var tmp_customFieldInputType = _resultSet.getInt_61zpoe$('customFieldInputType'); var _entity = new CustomField(); _entity.customFieldUid = tmp_customFieldUid; _entity.customFieldName = tmp_customFieldName; _entity.customFieldNameAlt = tmp_customFieldNameAlt; _entity.customFieldLabelMessageID = tmp_customFieldLabelMessageID; _entity.customFieldIcon = tmp_customFieldIcon; _entity.customFieldIconId = tmp_customFieldIconId; _entity.actionOnClick = tmp_actionOnClick; _entity.customFieldType = tmp_customFieldType; _entity.customFieldEntityType = tmp_customFieldEntityType; _entity.customFieldActive = tmp_customFieldActive; _entity.customFieldDefaultValue = tmp_customFieldDefaultValue; _entity.customFieldMCSN = tmp_customFieldMCSN; _entity.customFieldLCSN = tmp_customFieldLCSN; _entity.customFieldLCB = tmp_customFieldLCB; _entity.customFieldLct = tmp_customFieldLct; _entity.customFieldInputType = tmp_customFieldInputType; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda; Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CustomFieldDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_13($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_13.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_13; Coroutine$findByUidAsync_s8cxhz$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CustomField) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CustomField WHERE customFieldUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CustomField WHERE customFieldUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CustomFieldDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_13(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda; Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.customFieldName); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.customFieldNameAlt); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.customFieldLabelMessageID); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.customFieldIcon); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.customFieldIconId); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$entity.actionOnClick); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$entity.customFieldType); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$entity.customFieldEntityType); this.local$_stmt.setBoolean_fzusl$(9, this.local$closure$entity.customFieldActive); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$entity.customFieldDefaultValue); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.customFieldMCSN); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$entity.customFieldLCSN); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$entity.customFieldLCB); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.customFieldLct); this.local$_stmt.setInt_vux9f0$(15, this.local$closure$entity.customFieldInputType); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$entity.customFieldUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_tidy0z$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_tidy0z$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_tidy0z$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_tidy0z$.prototype.constructor = Coroutine$updateAsync_tidy0z$; Coroutine$updateAsync_tidy0z$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CustomField SET customFieldName = ?, customFieldNameAlt = ?, customFieldLabelMessageID = ?, customFieldIcon = ?, customFieldIconId = ?, actionOnClick = ?, customFieldType = ?, customFieldEntityType = ?, customFieldActive = ?, customFieldDefaultValue = ?, customFieldMCSN = ?, customFieldLCSN = ?, customFieldLCB = ?, customFieldLct = ?, customFieldInputType = ? WHERE customFieldUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CustomFieldDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldDao_JdbcKt.prototype.updateAsync_tidy0z$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_tidy0z$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CustomFieldDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCustomField_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_92($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_92.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_92.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_92.prototype.constructor = Coroutine$insertAsync_92; Coroutine$insertAsync_92.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCustomField_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_92(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CustomFieldDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCustomField_.insertList_4ezy5m$(entityList); }; function CustomFieldDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.customFieldName); _stmt.setString_vqvrqt$(2, _entity.customFieldNameAlt); _stmt.setInt_vux9f0$(3, _entity.customFieldLabelMessageID); _stmt.setString_vqvrqt$(4, _entity.customFieldIcon); _stmt.setInt_vux9f0$(5, _entity.customFieldIconId); _stmt.setString_vqvrqt$(6, _entity.actionOnClick); _stmt.setInt_vux9f0$(7, _entity.customFieldType); _stmt.setInt_vux9f0$(8, _entity.customFieldEntityType); _stmt.setBoolean_fzusl$(9, _entity.customFieldActive); _stmt.setString_vqvrqt$(10, _entity.customFieldDefaultValue); _stmt.setLong_6svq3l$(11, _entity.customFieldMCSN); _stmt.setLong_6svq3l$(12, _entity.customFieldLCSN); _stmt.setInt_vux9f0$(13, _entity.customFieldLCB); _stmt.setLong_6svq3l$(14, _entity.customFieldLct); _stmt.setInt_vux9f0$(15, _entity.customFieldInputType); _stmt.setLong_6svq3l$(16, _entity.customFieldUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CustomFieldDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CustomField SET customFieldName = ?, customFieldNameAlt = ?, customFieldLabelMessageID = ?, customFieldIcon = ?, customFieldIconId = ?, actionOnClick = ?, customFieldType = ?, customFieldEntityType = ?, customFieldActive = ?, customFieldDefaultValue = ?, customFieldMCSN = ?, customFieldLCSN = ?, customFieldLCB = ?, customFieldLct = ?, customFieldInputType = ? WHERE customFieldUid = ?'; prepareAndUseStatement_0(this._db, _sql, CustomFieldDao_JdbcKt$updateList$lambda(entityList)); }; function CustomFieldDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.customFieldName); _stmt.setString_vqvrqt$(2, closure$entity.customFieldNameAlt); _stmt.setInt_vux9f0$(3, closure$entity.customFieldLabelMessageID); _stmt.setString_vqvrqt$(4, closure$entity.customFieldIcon); _stmt.setInt_vux9f0$(5, closure$entity.customFieldIconId); _stmt.setString_vqvrqt$(6, closure$entity.actionOnClick); _stmt.setInt_vux9f0$(7, closure$entity.customFieldType); _stmt.setInt_vux9f0$(8, closure$entity.customFieldEntityType); _stmt.setBoolean_fzusl$(9, closure$entity.customFieldActive); _stmt.setString_vqvrqt$(10, closure$entity.customFieldDefaultValue); _stmt.setLong_6svq3l$(11, closure$entity.customFieldMCSN); _stmt.setLong_6svq3l$(12, closure$entity.customFieldLCSN); _stmt.setInt_vux9f0$(13, closure$entity.customFieldLCB); _stmt.setLong_6svq3l$(14, closure$entity.customFieldLct); _stmt.setInt_vux9f0$(15, closure$entity.customFieldInputType); _stmt.setLong_6svq3l$(16, closure$entity.customFieldUid); return _stmt.executeUpdate(); }; } CustomFieldDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CustomField SET customFieldName = ?, customFieldNameAlt = ?, customFieldLabelMessageID = ?, customFieldIcon = ?, customFieldIconId = ?, actionOnClick = ?, customFieldType = ?, customFieldEntityType = ?, customFieldActive = ?, customFieldDefaultValue = ?, customFieldMCSN = ?, customFieldLCSN = ?, customFieldLCB = ?, customFieldLct = ?, customFieldInputType = ? WHERE customFieldUid = ?'; prepareAndUseStatement_0(this._db, _sql, CustomFieldDao_JdbcKt$update$lambda(entity)); }; function CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CustomField (customFieldUid, customFieldName, customFieldNameAlt, customFieldLabelMessageID, customFieldIcon, customFieldIconId, actionOnClick, customFieldType, customFieldEntityType, customFieldActive, customFieldDefaultValue, customFieldMCSN, customFieldLCSN, customFieldLCB, customFieldLct, customFieldInputType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING customFieldUid'; } else tmp$ = ''; return "INSERT INTO CustomField (customFieldUid, customFieldName, customFieldNameAlt, customFieldLabelMessageID, customFieldIcon, customFieldIconId, actionOnClick, customFieldType, customFieldEntityType, customFieldActive, customFieldDefaultValue, customFieldMCSN, customFieldLCSN, customFieldLCB, customFieldLct, customFieldInputType) VALUES(COALESCE(?,nextval('CustomField_customFieldUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.customFieldUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.customFieldUid); } stmt.setString_vqvrqt$(2, entity.customFieldName); stmt.setString_vqvrqt$(3, entity.customFieldNameAlt); stmt.setInt_vux9f0$(4, entity.customFieldLabelMessageID); stmt.setString_vqvrqt$(5, entity.customFieldIcon); stmt.setInt_vux9f0$(6, entity.customFieldIconId); stmt.setString_vqvrqt$(7, entity.actionOnClick); stmt.setInt_vux9f0$(8, entity.customFieldType); stmt.setInt_vux9f0$(9, entity.customFieldEntityType); stmt.setBoolean_fzusl$(10, entity.customFieldActive); stmt.setString_vqvrqt$(11, entity.customFieldDefaultValue); stmt.setLong_6svq3l$(12, entity.customFieldMCSN); stmt.setLong_6svq3l$(13, entity.customFieldLCSN); stmt.setInt_vux9f0$(14, entity.customFieldLCB); stmt.setLong_6svq3l$(15, entity.customFieldLct); stmt.setInt_vux9f0$(16, entity.customFieldInputType); }; CustomFieldDao_JdbcKt$_insertAdapterCustomField_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CustomFieldDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CustomFieldDao_JdbcKt', interfaces: [CustomFieldDao]}; function CustomFieldValueDao_JdbcKt(_db) { CustomFieldValueDao.call(this); this._db = _db; this._insertAdapterCustomFieldValue_ = new CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral(this._db); } function CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_customFieldValueUid = _resultSet.getLong_61zpoe$('customFieldValueUid'); var tmp_customFieldValueFieldUid = _resultSet.getLong_61zpoe$('customFieldValueFieldUid'); var tmp_customFieldValueEntityUid = _resultSet.getLong_61zpoe$('customFieldValueEntityUid'); var tmp_customFieldValueValue = _resultSet.getString_61zpoe$('customFieldValueValue'); var tmp_customFieldValueCustomFieldValueOptionUid = _resultSet.getLong_61zpoe$('customFieldValueCustomFieldValueOptionUid'); var tmp_customFieldValueMCSN = _resultSet.getLong_61zpoe$('customFieldValueMCSN'); var tmp_customFieldValueLCSN = _resultSet.getLong_61zpoe$('customFieldValueLCSN'); var tmp_customFieldValueLCB = _resultSet.getInt_61zpoe$('customFieldValueLCB'); var tmp_customFieldLct = _resultSet.getLong_61zpoe$('customFieldLct'); var _entity = new CustomFieldValue(); _entity.customFieldValueUid = tmp_customFieldValueUid; _entity.customFieldValueFieldUid = tmp_customFieldValueFieldUid; _entity.customFieldValueEntityUid = tmp_customFieldValueEntityUid; _entity.customFieldValueValue = tmp_customFieldValueValue; _entity.customFieldValueCustomFieldValueOptionUid = tmp_customFieldValueCustomFieldValueOptionUid; _entity.customFieldValueMCSN = tmp_customFieldValueMCSN; _entity.customFieldValueLCSN = tmp_customFieldValueLCSN; _entity.customFieldValueLCB = tmp_customFieldValueLCB; _entity.customFieldLct = tmp_customFieldLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda(closure$fieldUid_0, closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$fieldUid = closure$fieldUid_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda.prototype.constructor = Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda; Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$fieldUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda(closure$fieldUid_0, closure$entityUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda(closure$fieldUid_0, closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$($this, fieldUid_0, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$fieldUid = fieldUid_0; this.local$entityUid = entityUid_0; } Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$.prototype.constructor = Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$; Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CustomFieldValue) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CustomFieldValue WHERE customFieldValueFieldUid = ? AND customFieldValueEntityUid = ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CustomFieldValue WHERE customFieldValueFieldUid = ? AND customFieldValueEntityUid = ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUid$lambda(this.local$fieldUid, this.local$entityUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueDao_JdbcKt.prototype.findValueByCustomFieldUidAndEntityUid_3pjtqy$ = function (fieldUid_0, entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findValueByCustomFieldUidAndEntityUid_3pjtqy$(this, fieldUid_0, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUidSync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_customFieldValueUid = _resultSet.getLong_61zpoe$('customFieldValueUid'); var tmp_customFieldValueFieldUid = _resultSet.getLong_61zpoe$('customFieldValueFieldUid'); var tmp_customFieldValueEntityUid = _resultSet.getLong_61zpoe$('customFieldValueEntityUid'); var tmp_customFieldValueValue = _resultSet.getString_61zpoe$('customFieldValueValue'); var tmp_customFieldValueCustomFieldValueOptionUid = _resultSet.getLong_61zpoe$('customFieldValueCustomFieldValueOptionUid'); var tmp_customFieldValueMCSN = _resultSet.getLong_61zpoe$('customFieldValueMCSN'); var tmp_customFieldValueLCSN = _resultSet.getLong_61zpoe$('customFieldValueLCSN'); var tmp_customFieldValueLCB = _resultSet.getInt_61zpoe$('customFieldValueLCB'); var tmp_customFieldLct = _resultSet.getLong_61zpoe$('customFieldLct'); var _entity = new CustomFieldValue(); _entity.customFieldValueUid = tmp_customFieldValueUid; _entity.customFieldValueFieldUid = tmp_customFieldValueFieldUid; _entity.customFieldValueEntityUid = tmp_customFieldValueEntityUid; _entity.customFieldValueValue = tmp_customFieldValueValue; _entity.customFieldValueCustomFieldValueOptionUid = tmp_customFieldValueCustomFieldValueOptionUid; _entity.customFieldValueMCSN = tmp_customFieldValueMCSN; _entity.customFieldValueLCSN = tmp_customFieldValueLCSN; _entity.customFieldValueLCB = tmp_customFieldValueLCB; _entity.customFieldLct = tmp_customFieldLct; closure$_result.v = _entity; }return Unit; }; } function CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUidSync$lambda(closure$fieldUid, closure$entityUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$fieldUid); _stmt.setLong_6svq3l$(2, closure$entityUid); useResults(_stmt.executeQuery(), CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUidSync$lambda$lambda(closure$_result)); return Unit; }; } CustomFieldValueDao_JdbcKt.prototype.findValueByCustomFieldUidAndEntityUidSync_3pjtqy$ = function (fieldUid, entityUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CustomFieldValue) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CustomFieldValue WHERE customFieldValueFieldUid = ? AND customFieldValueEntityUid = ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CustomFieldValue WHERE customFieldValueFieldUid = ? AND customFieldValueEntityUid = ? \n |')); prepareAndUseStatement(this._db, _stmtConfig, CustomFieldValueDao_JdbcKt$findValueByCustomFieldUidAndEntityUidSync$lambda(fieldUid, entityUid, _result)); return _result.v; }; function Coroutine$insertListAsync_edcepv$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_edcepv$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_edcepv$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_edcepv$.prototype.constructor = Coroutine$insertListAsync_edcepv$; Coroutine$insertListAsync_edcepv$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCustomFieldValue_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueDao_JdbcKt.prototype.insertListAsync_edcepv$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_edcepv$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda; Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.customFieldValueFieldUid); this.local$_stmt.setLong_6svq3l$(2, _entity.customFieldValueEntityUid); this.local$_stmt.setString_vqvrqt$(3, _entity.customFieldValueValue); this.local$_stmt.setLong_6svq3l$(4, _entity.customFieldValueCustomFieldValueOptionUid); this.local$_stmt.setLong_6svq3l$(5, _entity.customFieldValueMCSN); this.local$_stmt.setLong_6svq3l$(6, _entity.customFieldValueLCSN); this.local$_stmt.setInt_vux9f0$(7, _entity.customFieldValueLCB); this.local$_stmt.setLong_6svq3l$(8, _entity.customFieldLct); this.local$_stmt.setLong_6svq3l$(9, _entity.customFieldValueUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldValueDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldValueDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_edcepv$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_edcepv$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_edcepv$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_edcepv$.prototype.constructor = Coroutine$updateListAsync_edcepv$; Coroutine$updateListAsync_edcepv$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CustomFieldValue SET customFieldValueFieldUid = ?, customFieldValueEntityUid = ?, customFieldValueValue = ?, customFieldValueCustomFieldValueOptionUid = ?, customFieldValueMCSN = ?, customFieldValueLCSN = ?, customFieldValueLCB = ?, customFieldLct = ? WHERE customFieldValueUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CustomFieldValueDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueDao_JdbcKt.prototype.updateListAsync_edcepv$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_edcepv$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CustomFieldValueDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCustomFieldValue_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_93($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_93.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_93.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_93.prototype.constructor = Coroutine$insertAsync_93; Coroutine$insertAsync_93.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCustomFieldValue_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_93(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CustomFieldValueDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCustomFieldValue_.insertList_4ezy5m$(entityList); }; function CustomFieldValueDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.customFieldValueFieldUid); _stmt.setLong_6svq3l$(2, _entity.customFieldValueEntityUid); _stmt.setString_vqvrqt$(3, _entity.customFieldValueValue); _stmt.setLong_6svq3l$(4, _entity.customFieldValueCustomFieldValueOptionUid); _stmt.setLong_6svq3l$(5, _entity.customFieldValueMCSN); _stmt.setLong_6svq3l$(6, _entity.customFieldValueLCSN); _stmt.setInt_vux9f0$(7, _entity.customFieldValueLCB); _stmt.setLong_6svq3l$(8, _entity.customFieldLct); _stmt.setLong_6svq3l$(9, _entity.customFieldValueUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CustomFieldValueDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CustomFieldValue SET customFieldValueFieldUid = ?, customFieldValueEntityUid = ?, customFieldValueValue = ?, customFieldValueCustomFieldValueOptionUid = ?, customFieldValueMCSN = ?, customFieldValueLCSN = ?, customFieldValueLCB = ?, customFieldLct = ? WHERE customFieldValueUid = ?'; prepareAndUseStatement_0(this._db, _sql, CustomFieldValueDao_JdbcKt$updateList$lambda(entityList)); }; function CustomFieldValueDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.customFieldValueFieldUid); _stmt.setLong_6svq3l$(2, closure$entity.customFieldValueEntityUid); _stmt.setString_vqvrqt$(3, closure$entity.customFieldValueValue); _stmt.setLong_6svq3l$(4, closure$entity.customFieldValueCustomFieldValueOptionUid); _stmt.setLong_6svq3l$(5, closure$entity.customFieldValueMCSN); _stmt.setLong_6svq3l$(6, closure$entity.customFieldValueLCSN); _stmt.setInt_vux9f0$(7, closure$entity.customFieldValueLCB); _stmt.setLong_6svq3l$(8, closure$entity.customFieldLct); _stmt.setLong_6svq3l$(9, closure$entity.customFieldValueUid); return _stmt.executeUpdate(); }; } CustomFieldValueDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CustomFieldValue SET customFieldValueFieldUid = ?, customFieldValueEntityUid = ?, customFieldValueValue = ?, customFieldValueCustomFieldValueOptionUid = ?, customFieldValueMCSN = ?, customFieldValueLCSN = ?, customFieldValueLCB = ?, customFieldLct = ? WHERE customFieldValueUid = ?'; prepareAndUseStatement_0(this._db, _sql, CustomFieldValueDao_JdbcKt$update$lambda(entity)); }; function CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CustomFieldValue (customFieldValueUid, customFieldValueFieldUid, customFieldValueEntityUid, customFieldValueValue, customFieldValueCustomFieldValueOptionUid, customFieldValueMCSN, customFieldValueLCSN, customFieldValueLCB, customFieldLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING customFieldValueUid'; } else tmp$ = ''; return "INSERT INTO CustomFieldValue (customFieldValueUid, customFieldValueFieldUid, customFieldValueEntityUid, customFieldValueValue, customFieldValueCustomFieldValueOptionUid, customFieldValueMCSN, customFieldValueLCSN, customFieldValueLCB, customFieldLct) VALUES(COALESCE(?,nextval('CustomFieldValue_customFieldValueUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.customFieldValueUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.customFieldValueUid); } stmt.setLong_6svq3l$(2, entity.customFieldValueFieldUid); stmt.setLong_6svq3l$(3, entity.customFieldValueEntityUid); stmt.setString_vqvrqt$(4, entity.customFieldValueValue); stmt.setLong_6svq3l$(5, entity.customFieldValueCustomFieldValueOptionUid); stmt.setLong_6svq3l$(6, entity.customFieldValueMCSN); stmt.setLong_6svq3l$(7, entity.customFieldValueLCSN); stmt.setInt_vux9f0$(8, entity.customFieldValueLCB); stmt.setLong_6svq3l$(9, entity.customFieldLct); }; CustomFieldValueDao_JdbcKt$_insertAdapterCustomFieldValue_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CustomFieldValueDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CustomFieldValueDao_JdbcKt', interfaces: [CustomFieldValueDao]}; function CustomFieldValueOptionDao_JdbcKt(_db) { CustomFieldValueOptionDao.call(this); this._db = _db; this._insertAdapterCustomFieldValueOption_ = new CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral(this._db); } function Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda; Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.customFieldValueOptionName); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.customFieldValueOptionFieldUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.customFieldValueOptionIcon); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$entity.customFieldValueOptionMessageId); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$entity.customFieldValueOptionActive); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.customFieldValueOptionMCSN); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.customFieldValueOptionLCSN); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$entity.customFieldValueOptionLCB); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.customFieldValueLct); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.customFieldValueOptionUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_z48i7x$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_z48i7x$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_z48i7x$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_z48i7x$.prototype.constructor = Coroutine$updateAsync_z48i7x$; Coroutine$updateAsync_z48i7x$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CustomFieldValueOption SET customFieldValueOptionName = ?, customFieldValueOptionFieldUid = ?, customFieldValueOptionIcon = ?, customFieldValueOptionMessageId = ?, customFieldValueOptionActive = ?, customFieldValueOptionMCSN = ?, customFieldValueOptionLCSN = ?, customFieldValueOptionLCB = ?, customFieldValueLct = ? WHERE customFieldValueOptionUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CustomFieldValueOptionDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueOptionDao_JdbcKt.prototype.updateAsync_z48i7x$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_z48i7x$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_customFieldValueOptionUid = _resultSet.getLong_61zpoe$('customFieldValueOptionUid'); var tmp_customFieldValueOptionName = _resultSet.getString_61zpoe$('customFieldValueOptionName'); var tmp_customFieldValueOptionFieldUid = _resultSet.getLong_61zpoe$('customFieldValueOptionFieldUid'); var tmp_customFieldValueOptionIcon = _resultSet.getString_61zpoe$('customFieldValueOptionIcon'); var tmp_customFieldValueOptionMessageId = _resultSet.getInt_61zpoe$('customFieldValueOptionMessageId'); var tmp_customFieldValueOptionActive = _resultSet.getBoolean_61zpoe$('customFieldValueOptionActive'); var tmp_customFieldValueOptionMCSN = _resultSet.getLong_61zpoe$('customFieldValueOptionMCSN'); var tmp_customFieldValueOptionLCSN = _resultSet.getLong_61zpoe$('customFieldValueOptionLCSN'); var tmp_customFieldValueOptionLCB = _resultSet.getInt_61zpoe$('customFieldValueOptionLCB'); var tmp_customFieldValueLct = _resultSet.getLong_61zpoe$('customFieldValueLct'); var _entity = new CustomFieldValueOption(); _entity.customFieldValueOptionUid = tmp_customFieldValueOptionUid; _entity.customFieldValueOptionName = tmp_customFieldValueOptionName; _entity.customFieldValueOptionFieldUid = tmp_customFieldValueOptionFieldUid; _entity.customFieldValueOptionIcon = tmp_customFieldValueOptionIcon; _entity.customFieldValueOptionMessageId = tmp_customFieldValueOptionMessageId; _entity.customFieldValueOptionActive = tmp_customFieldValueOptionActive; _entity.customFieldValueOptionMCSN = tmp_customFieldValueOptionMCSN; _entity.customFieldValueOptionLCSN = tmp_customFieldValueOptionLCSN; _entity.customFieldValueOptionLCB = tmp_customFieldValueOptionLCB; _entity.customFieldValueLct = tmp_customFieldValueLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda; Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_14($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_14.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_14; Coroutine$findByUidAsync_s8cxhz$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, CustomFieldValueOption) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM CustomFieldValueOption WHERE customFieldValueOptionUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM CustomFieldValueOption WHERE customFieldValueOptionUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, CustomFieldValueOptionDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueOptionDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_14(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CustomFieldValueOptionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCustomFieldValueOption_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_94($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_94.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_94.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_94.prototype.constructor = Coroutine$insertAsync_94; Coroutine$insertAsync_94.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCustomFieldValueOption_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CustomFieldValueOptionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_94(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CustomFieldValueOptionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCustomFieldValueOption_.insertList_4ezy5m$(entityList); }; function CustomFieldValueOptionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.customFieldValueOptionName); _stmt.setLong_6svq3l$(2, _entity.customFieldValueOptionFieldUid); _stmt.setString_vqvrqt$(3, _entity.customFieldValueOptionIcon); _stmt.setInt_vux9f0$(4, _entity.customFieldValueOptionMessageId); _stmt.setBoolean_fzusl$(5, _entity.customFieldValueOptionActive); _stmt.setLong_6svq3l$(6, _entity.customFieldValueOptionMCSN); _stmt.setLong_6svq3l$(7, _entity.customFieldValueOptionLCSN); _stmt.setInt_vux9f0$(8, _entity.customFieldValueOptionLCB); _stmt.setLong_6svq3l$(9, _entity.customFieldValueLct); _stmt.setLong_6svq3l$(10, _entity.customFieldValueOptionUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CustomFieldValueOptionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CustomFieldValueOption SET customFieldValueOptionName = ?, customFieldValueOptionFieldUid = ?, customFieldValueOptionIcon = ?, customFieldValueOptionMessageId = ?, customFieldValueOptionActive = ?, customFieldValueOptionMCSN = ?, customFieldValueOptionLCSN = ?, customFieldValueOptionLCB = ?, customFieldValueLct = ? WHERE customFieldValueOptionUid = ?'; prepareAndUseStatement_0(this._db, _sql, CustomFieldValueOptionDao_JdbcKt$updateList$lambda(entityList)); }; function CustomFieldValueOptionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.customFieldValueOptionName); _stmt.setLong_6svq3l$(2, closure$entity.customFieldValueOptionFieldUid); _stmt.setString_vqvrqt$(3, closure$entity.customFieldValueOptionIcon); _stmt.setInt_vux9f0$(4, closure$entity.customFieldValueOptionMessageId); _stmt.setBoolean_fzusl$(5, closure$entity.customFieldValueOptionActive); _stmt.setLong_6svq3l$(6, closure$entity.customFieldValueOptionMCSN); _stmt.setLong_6svq3l$(7, closure$entity.customFieldValueOptionLCSN); _stmt.setInt_vux9f0$(8, closure$entity.customFieldValueOptionLCB); _stmt.setLong_6svq3l$(9, closure$entity.customFieldValueLct); _stmt.setLong_6svq3l$(10, closure$entity.customFieldValueOptionUid); return _stmt.executeUpdate(); }; } CustomFieldValueOptionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CustomFieldValueOption SET customFieldValueOptionName = ?, customFieldValueOptionFieldUid = ?, customFieldValueOptionIcon = ?, customFieldValueOptionMessageId = ?, customFieldValueOptionActive = ?, customFieldValueOptionMCSN = ?, customFieldValueOptionLCSN = ?, customFieldValueOptionLCB = ?, customFieldValueLct = ? WHERE customFieldValueOptionUid = ?'; prepareAndUseStatement_0(this._db, _sql, CustomFieldValueOptionDao_JdbcKt$update$lambda(entity)); }; function CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO CustomFieldValueOption (customFieldValueOptionUid, customFieldValueOptionName, customFieldValueOptionFieldUid, customFieldValueOptionIcon, customFieldValueOptionMessageId, customFieldValueOptionActive, customFieldValueOptionMCSN, customFieldValueOptionLCSN, customFieldValueOptionLCB, customFieldValueLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING customFieldValueOptionUid'; } else tmp$ = ''; return "INSERT INTO CustomFieldValueOption (customFieldValueOptionUid, customFieldValueOptionName, customFieldValueOptionFieldUid, customFieldValueOptionIcon, customFieldValueOptionMessageId, customFieldValueOptionActive, customFieldValueOptionMCSN, customFieldValueOptionLCSN, customFieldValueOptionLCB, customFieldValueLct) VALUES(COALESCE(?,nextval('CustomFieldValueOption_customFieldValueOptionUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.customFieldValueOptionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.customFieldValueOptionUid); } stmt.setString_vqvrqt$(2, entity.customFieldValueOptionName); stmt.setLong_6svq3l$(3, entity.customFieldValueOptionFieldUid); stmt.setString_vqvrqt$(4, entity.customFieldValueOptionIcon); stmt.setInt_vux9f0$(5, entity.customFieldValueOptionMessageId); stmt.setBoolean_fzusl$(6, entity.customFieldValueOptionActive); stmt.setLong_6svq3l$(7, entity.customFieldValueOptionMCSN); stmt.setLong_6svq3l$(8, entity.customFieldValueOptionLCSN); stmt.setInt_vux9f0$(9, entity.customFieldValueOptionLCB); stmt.setLong_6svq3l$(10, entity.customFieldValueLct); }; CustomFieldValueOptionDao_JdbcKt$_insertAdapterCustomFieldValueOption_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CustomFieldValueOptionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CustomFieldValueOptionDao_JdbcKt', interfaces: [CustomFieldValueOptionDao]}; function DiscussionPostDao_JdbcKt(_db) { DiscussionPostDao.call(this); this._db = _db; this._insertAdapterDiscussionPost_ = new DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral(this._db); } function Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_89($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_89.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_89.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_89.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_89; Coroutine$replicateOnNewNode_s8cxhz$_89.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostPk,\n | ? AS discussionPostDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionPost \n | ON DiscussionPost.discussionPostClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND discussionPostDestination = ?), 0) \n | /*psql ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostPk,\n | ? AS discussionPostDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionPost \n | ON DiscussionPost.discussionPostClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND discussionPostDestination = ?), 0) \n | ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_89(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda; Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_86($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_86.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_86.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_86.prototype.constructor = Coroutine$replicateOnChange_86; Coroutine$replicateOnChange_86.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostUid,\n | UserSession.usClientNodeId AS discussionPostDestination\n | FROM ChangeLog\n | JOIN DiscussionPost\n | ON ChangeLog.chTableId = 132\n | AND ChangeLog.chEntityPk = DiscussionPost.discussionPostUid\n | \n | \n | JOIN Clazz \n | ON Clazz.clazzUid = DiscussionPost.discussionPostClazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND DiscussionPostDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostUid,\n | UserSession.usClientNodeId AS discussionPostDestination\n | FROM ChangeLog\n | JOIN DiscussionPost\n | ON ChangeLog.chTableId = 132\n | AND ChangeLog.chEntityPk = DiscussionPost.discussionPostUid\n | \n | \n | JOIN Clazz \n | ON Clazz.clazzUid = DiscussionPost.discussionPostClazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND DiscussionPostDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionPostDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_86(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral(this$DiscussionPostDao_JdbcKt, closure$discussionTopicUid) { this.this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt; this.closure$discussionTopicUid = closure$discussionTopicUid; DoorDataSourceFactory.call(this); } function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_authorPersonFirstNames = _resultSet.getString_61zpoe$('authorPersonFirstNames'); var tmp_authorPersonLastName = _resultSet.getString_61zpoe$('authorPersonLastName'); var tmp_postLatestMessage = _resultSet.getString_61zpoe$('postLatestMessage'); var tmp_postRepliesCount = _resultSet.getInt_61zpoe$('postRepliesCount'); var tmp_postLatestMessageTimestamp = _resultSet.getLong_61zpoe$('postLatestMessageTimestamp'); var tmp_discussionPostUid = _resultSet.getLong_61zpoe$('discussionPostUid'); var tmp_discussionPostTitle = _resultSet.getString_61zpoe$('discussionPostTitle'); var tmp_discussionPostMessage = _resultSet.getString_61zpoe$('discussionPostMessage'); var tmp_discussionPostStartDate = _resultSet.getLong_61zpoe$('discussionPostStartDate'); var tmp_discussionPostDiscussionTopicUid = _resultSet.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var tmp_discussionPostVisible = _resultSet.getBoolean_61zpoe$('discussionPostVisible'); var tmp_discussionPostArchive = _resultSet.getBoolean_61zpoe$('discussionPostArchive'); var tmp_discussionPostStartedPersonUid = _resultSet.getLong_61zpoe$('discussionPostStartedPersonUid'); var tmp_discussionPostClazzUid = _resultSet.getLong_61zpoe$('discussionPostClazzUid'); var tmp_discussionPostLct = _resultSet.getLong_61zpoe$('discussionPostLct'); var _entity = new DiscussionPostWithDetails(); _entity.authorPersonFirstNames = tmp_authorPersonFirstNames; _entity.authorPersonLastName = tmp_authorPersonLastName; _entity.postLatestMessage = tmp_postLatestMessage; _entity.postRepliesCount = tmp_postRepliesCount; _entity.postLatestMessageTimestamp = tmp_postLatestMessageTimestamp; _entity.discussionPostUid = tmp_discussionPostUid; _entity.discussionPostTitle = tmp_discussionPostTitle; _entity.discussionPostMessage = tmp_discussionPostMessage; _entity.discussionPostStartDate = tmp_discussionPostStartDate; _entity.discussionPostDiscussionTopicUid = tmp_discussionPostDiscussionTopicUid; _entity.discussionPostVisible = tmp_discussionPostVisible; _entity.discussionPostArchive = tmp_discussionPostArchive; _entity.discussionPostStartedPersonUid = tmp_discussionPostStartedPersonUid; _entity.discussionPostClazzUid = tmp_discussionPostClazzUid; _entity.discussionPostLct = tmp_discussionPostLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionTopicUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt_0; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | (\n | SELECT Message.messageText \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessage,\n | (\n | SELECT COUNT(*) \n | FROM Message\n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | \n | ) AS postRepliesCount, \n | \n | (\n | SELECT Message.messageTimestamp \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = ?\n | AND CAST(DiscussionPost.discussionPostVisible AS INTEGER) = 1\n | AND CAST(DiscussionPost.discussionPostArchive AS INTEGER) = 0\n | ORDER BY DiscussionPost.discussionPostStartDate DESC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | (\n | SELECT Message.messageText \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessage,\n | (\n | SELECT COUNT(*) \n | FROM Message\n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | \n | ) AS postRepliesCount, \n | \n | (\n | SELECT Message.messageTimestamp \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = ?\n | AND CAST(DiscussionPost.discussionPostVisible AS INTEGER) = 1\n | AND CAST(DiscussionPost.discussionPostArchive AS INTEGER) = 0\n | ORDER BY DiscussionPost.discussionPostStartDate DESC\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionPostDao_JdbcKt._db, _stmtConfig, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(this.local$closure$discussionTopicUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$DiscussionPostDao_JdbcKt._db, listOf(['Message', 'DiscussionPost', 'Person']), DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this.this$DiscussionPostDao_JdbcKt, this.closure$discussionTopicUid, _limit, _offset)); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(closure$discussionTopicUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionTopicUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(closure$discussionTopicUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(closure$discussionTopicUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt_0; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$_liveResult = void 0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | (\n | SELECT Message.messageText \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessage,\n | (\n | SELECT COUNT(*) \n | FROM Message\n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | \n | ) AS postRepliesCount, \n | \n | (\n | SELECT Message.messageTimestamp \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = ?\n | AND CAST(DiscussionPost.discussionPostVisible AS INTEGER) = 1\n | AND CAST(DiscussionPost.discussionPostArchive AS INTEGER) = 0\n | ORDER BY DiscussionPost.discussionPostStartDate DESC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | (\n | SELECT Message.messageText \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessage,\n | (\n | SELECT COUNT(*) \n | FROM Message\n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | \n | ) AS postRepliesCount, \n | \n | (\n | SELECT Message.messageTimestamp \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = ?\n | AND CAST(DiscussionPost.discussionPostVisible AS INTEGER) = 1\n | AND CAST(DiscussionPost.discussionPostArchive AS INTEGER) = 0\n | ORDER BY DiscussionPost.discussionPostStartDate DESC\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionPostDao_JdbcKt._db, _stmtConfig, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(this.local$closure$discussionTopicUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$DiscussionPostDao_JdbcKt._db, listOf(['Message', 'DiscussionPost', 'Person']), DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this.this$DiscussionPostDao_JdbcKt, this.closure$discussionTopicUid)); }; DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; DiscussionPostDao_JdbcKt.prototype.getPostsByDiscussionTopic_s8cxhz$ = function (discussionTopicUid) { var _result = new DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral(this, discussionTopicUid); return _result; }; function DiscussionPostDao_JdbcKt$getPostTitle$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda(closure$postUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$postUid = closure$postUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$postUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$getPostTitle$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostTitle$lambda(closure$postUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda(closure$postUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getPostTitle_s8cxhz$($this, postUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$postUid = postUid_0; } Coroutine$getPostTitle_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getPostTitle_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getPostTitle_s8cxhz$.prototype.constructor = Coroutine$getPostTitle_s8cxhz$; Coroutine$getPostTitle_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT DiscussionPost.discussionPostTitle \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT DiscussionPost.discussionPostTitle \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionPostDao_JdbcKt$getPostTitle$lambda(this.local$postUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.getPostTitle_s8cxhz$ = function (postUid_0, continuation_0, suspended) { var instance = new Coroutine$getPostTitle_s8cxhz$(this, postUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionPostDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_discussionPostUid = _resultSet.getLong_61zpoe$('discussionPostUid'); var tmp_discussionPostTitle = _resultSet.getString_61zpoe$('discussionPostTitle'); var tmp_discussionPostMessage = _resultSet.getString_61zpoe$('discussionPostMessage'); var tmp_discussionPostStartDate = _resultSet.getLong_61zpoe$('discussionPostStartDate'); var tmp_discussionPostDiscussionTopicUid = _resultSet.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var tmp_discussionPostVisible = _resultSet.getBoolean_61zpoe$('discussionPostVisible'); var tmp_discussionPostArchive = _resultSet.getBoolean_61zpoe$('discussionPostArchive'); var tmp_discussionPostStartedPersonUid = _resultSet.getLong_61zpoe$('discussionPostStartedPersonUid'); var tmp_discussionPostClazzUid = _resultSet.getLong_61zpoe$('discussionPostClazzUid'); var tmp_discussionPostLct = _resultSet.getLong_61zpoe$('discussionPostLct'); var _entity = new DiscussionPost(); _entity.discussionPostUid = tmp_discussionPostUid; _entity.discussionPostTitle = tmp_discussionPostTitle; _entity.discussionPostMessage = tmp_discussionPostMessage; _entity.discussionPostStartDate = tmp_discussionPostStartDate; _entity.discussionPostDiscussionTopicUid = tmp_discussionPostDiscussionTopicUid; _entity.discussionPostVisible = tmp_discussionPostVisible; _entity.discussionPostArchive = tmp_discussionPostArchive; _entity.discussionPostStartedPersonUid = tmp_discussionPostStartedPersonUid; _entity.discussionPostClazzUid = tmp_discussionPostClazzUid; _entity.discussionPostLct = tmp_discussionPostLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda; Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$findByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_s8cxhz$_1($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_1.prototype.constructor = Coroutine$findByUid_s8cxhz$_1; Coroutine$findByUid_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, DiscussionPost) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM DiscussionPost\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM DiscussionPost\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionPostDao_JdbcKt$findByUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_1(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_authorPersonFirstNames = _resultSet.getString_61zpoe$('authorPersonFirstNames'); var tmp_authorPersonLastName = _resultSet.getString_61zpoe$('authorPersonLastName'); var tmp_postLatestMessage = _resultSet.getString_61zpoe$('postLatestMessage'); var tmp_postRepliesCount = _resultSet.getInt_61zpoe$('postRepliesCount'); var tmp_postLatestMessageTimestamp = _resultSet.getLong_61zpoe$('postLatestMessageTimestamp'); var tmp_discussionPostUid = _resultSet.getLong_61zpoe$('discussionPostUid'); var tmp_discussionPostTitle = _resultSet.getString_61zpoe$('discussionPostTitle'); var tmp_discussionPostMessage = _resultSet.getString_61zpoe$('discussionPostMessage'); var tmp_discussionPostStartDate = _resultSet.getLong_61zpoe$('discussionPostStartDate'); var tmp_discussionPostDiscussionTopicUid = _resultSet.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var tmp_discussionPostVisible = _resultSet.getBoolean_61zpoe$('discussionPostVisible'); var tmp_discussionPostArchive = _resultSet.getBoolean_61zpoe$('discussionPostArchive'); var tmp_discussionPostStartedPersonUid = _resultSet.getLong_61zpoe$('discussionPostStartedPersonUid'); var tmp_discussionPostClazzUid = _resultSet.getLong_61zpoe$('discussionPostClazzUid'); var tmp_discussionPostLct = _resultSet.getLong_61zpoe$('discussionPostLct'); var _entity = new DiscussionPostWithDetails(); _entity.authorPersonFirstNames = tmp_authorPersonFirstNames; _entity.authorPersonLastName = tmp_authorPersonLastName; _entity.postLatestMessage = tmp_postLatestMessage; _entity.postRepliesCount = tmp_postRepliesCount; _entity.postLatestMessageTimestamp = tmp_postLatestMessageTimestamp; _entity.discussionPostUid = tmp_discussionPostUid; _entity.discussionPostTitle = tmp_discussionPostTitle; _entity.discussionPostMessage = tmp_discussionPostMessage; _entity.discussionPostStartDate = tmp_discussionPostStartDate; _entity.discussionPostDiscussionTopicUid = tmp_discussionPostDiscussionTopicUid; _entity.discussionPostVisible = tmp_discussionPostVisible; _entity.discussionPostArchive = tmp_discussionPostArchive; _entity.discussionPostStartedPersonUid = tmp_discussionPostStartedPersonUid; _entity.discussionPostClazzUid = tmp_discussionPostClazzUid; _entity.discussionPostLct = tmp_discussionPostLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findWithDetailsByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findWithDetailsByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findWithDetailsByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findWithDetailsByUid_s8cxhz$.prototype.constructor = Coroutine$findWithDetailsByUid_s8cxhz$; Coroutine$findWithDetailsByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, DiscussionPostWithDetails) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | '' AS postLatestMessage,\n | 0 AS postRepliesCount, \n | DiscussionPost.discussionPostLct AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | '' AS postLatestMessage,\n | 0 AS postRepliesCount, \n | DiscussionPost.discussionPostLct AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.findWithDetailsByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findWithDetailsByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_authorPersonFirstNames = _resultSet.getString_61zpoe$('authorPersonFirstNames'); var tmp_authorPersonLastName = _resultSet.getString_61zpoe$('authorPersonLastName'); var tmp_postLatestMessage = _resultSet.getString_61zpoe$('postLatestMessage'); var tmp_postRepliesCount = _resultSet.getInt_61zpoe$('postRepliesCount'); var tmp_postLatestMessageTimestamp = _resultSet.getLong_61zpoe$('postLatestMessageTimestamp'); var tmp_discussionPostUid = _resultSet.getLong_61zpoe$('discussionPostUid'); var tmp_discussionPostTitle = _resultSet.getString_61zpoe$('discussionPostTitle'); var tmp_discussionPostMessage = _resultSet.getString_61zpoe$('discussionPostMessage'); var tmp_discussionPostStartDate = _resultSet.getLong_61zpoe$('discussionPostStartDate'); var tmp_discussionPostDiscussionTopicUid = _resultSet.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var tmp_discussionPostVisible = _resultSet.getBoolean_61zpoe$('discussionPostVisible'); var tmp_discussionPostArchive = _resultSet.getBoolean_61zpoe$('discussionPostArchive'); var tmp_discussionPostStartedPersonUid = _resultSet.getLong_61zpoe$('discussionPostStartedPersonUid'); var tmp_discussionPostClazzUid = _resultSet.getLong_61zpoe$('discussionPostClazzUid'); var tmp_discussionPostLct = _resultSet.getLong_61zpoe$('discussionPostLct'); var _entity = new DiscussionPostWithDetails(); _entity.authorPersonFirstNames = tmp_authorPersonFirstNames; _entity.authorPersonLastName = tmp_authorPersonLastName; _entity.postLatestMessage = tmp_postLatestMessage; _entity.postRepliesCount = tmp_postRepliesCount; _entity.postLatestMessageTimestamp = tmp_postLatestMessageTimestamp; _entity.discussionPostUid = tmp_discussionPostUid; _entity.discussionPostTitle = tmp_discussionPostTitle; _entity.discussionPostMessage = tmp_discussionPostMessage; _entity.discussionPostStartDate = tmp_discussionPostStartDate; _entity.discussionPostDiscussionTopicUid = tmp_discussionPostDiscussionTopicUid; _entity.discussionPostVisible = tmp_discussionPostVisible; _entity.discussionPostArchive = tmp_discussionPostArchive; _entity.discussionPostStartedPersonUid = tmp_discussionPostStartedPersonUid; _entity.discussionPostClazzUid = tmp_discussionPostClazzUid; _entity.discussionPostLct = tmp_discussionPostLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this$DiscussionPostDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, DiscussionPostWithDetails) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | '' AS postLatestMessage,\n | 0 AS postRepliesCount, \n | DiscussionPost.discussionPostLct AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | '' AS postLatestMessage,\n | 0 AS postRepliesCount, \n | DiscussionPost.discussionPostLct AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionPostDao_JdbcKt._db, _stmtConfig, DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this$DiscussionPostDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this$DiscussionPostDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt.prototype.findWithDetailsByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf(['DiscussionPost', 'Person']), DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this, uid)); return _result; }; function Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda; Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.discussionPostTitle); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.discussionPostMessage); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.discussionPostStartDate); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.discussionPostDiscussionTopicUid); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$entity.discussionPostVisible); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.discussionPostArchive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.discussionPostStartedPersonUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.discussionPostClazzUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.discussionPostLct); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.discussionPostUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_ttuxpq$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_ttuxpq$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ttuxpq$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ttuxpq$.prototype.constructor = Coroutine$updateAsync_ttuxpq$; Coroutine$updateAsync_ttuxpq$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE DiscussionPost SET discussionPostTitle = ?, discussionPostMessage = ?, discussionPostStartDate = ?, discussionPostDiscussionTopicUid = ?, discussionPostVisible = ?, discussionPostArchive = ?, discussionPostStartedPersonUid = ?, discussionPostClazzUid = ?, discussionPostLct = ? WHERE discussionPostUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, DiscussionPostDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.updateAsync_ttuxpq$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ttuxpq$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterDiscussionPost_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_95($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_95.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_95.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_95.prototype.constructor = Coroutine$insertAsync_95; Coroutine$insertAsync_95.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionPost_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_95(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterDiscussionPost_.insertList_4ezy5m$(entityList); }; function DiscussionPostDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.discussionPostTitle); _stmt.setString_vqvrqt$(2, _entity.discussionPostMessage); _stmt.setLong_6svq3l$(3, _entity.discussionPostStartDate); _stmt.setLong_6svq3l$(4, _entity.discussionPostDiscussionTopicUid); _stmt.setBoolean_fzusl$(5, _entity.discussionPostVisible); _stmt.setBoolean_fzusl$(6, _entity.discussionPostArchive); _stmt.setLong_6svq3l$(7, _entity.discussionPostStartedPersonUid); _stmt.setLong_6svq3l$(8, _entity.discussionPostClazzUid); _stmt.setLong_6svq3l$(9, _entity.discussionPostLct); _stmt.setLong_6svq3l$(10, _entity.discussionPostUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } DiscussionPostDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE DiscussionPost SET discussionPostTitle = ?, discussionPostMessage = ?, discussionPostStartDate = ?, discussionPostDiscussionTopicUid = ?, discussionPostVisible = ?, discussionPostArchive = ?, discussionPostStartedPersonUid = ?, discussionPostClazzUid = ?, discussionPostLct = ? WHERE discussionPostUid = ?'; prepareAndUseStatement_0(this._db, _sql, DiscussionPostDao_JdbcKt$updateList$lambda(entityList)); }; function DiscussionPostDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.discussionPostTitle); _stmt.setString_vqvrqt$(2, closure$entity.discussionPostMessage); _stmt.setLong_6svq3l$(3, closure$entity.discussionPostStartDate); _stmt.setLong_6svq3l$(4, closure$entity.discussionPostDiscussionTopicUid); _stmt.setBoolean_fzusl$(5, closure$entity.discussionPostVisible); _stmt.setBoolean_fzusl$(6, closure$entity.discussionPostArchive); _stmt.setLong_6svq3l$(7, closure$entity.discussionPostStartedPersonUid); _stmt.setLong_6svq3l$(8, closure$entity.discussionPostClazzUid); _stmt.setLong_6svq3l$(9, closure$entity.discussionPostLct); _stmt.setLong_6svq3l$(10, closure$entity.discussionPostUid); return _stmt.executeUpdate(); }; } DiscussionPostDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE DiscussionPost SET discussionPostTitle = ?, discussionPostMessage = ?, discussionPostStartDate = ?, discussionPostDiscussionTopicUid = ?, discussionPostVisible = ?, discussionPostArchive = ?, discussionPostStartedPersonUid = ?, discussionPostClazzUid = ?, discussionPostLct = ? WHERE discussionPostUid = ?'; prepareAndUseStatement_0(this._db, _sql, DiscussionPostDao_JdbcKt$update$lambda(entity)); }; function DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO DiscussionPost (discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING discussionPostUid'; } else tmp$ = ''; return "INSERT INTO DiscussionPost (discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(COALESCE(?,nextval('DiscussionPost_discussionPostUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.discussionPostUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.discussionPostUid); } stmt.setString_vqvrqt$(2, entity.discussionPostTitle); stmt.setString_vqvrqt$(3, entity.discussionPostMessage); stmt.setLong_6svq3l$(4, entity.discussionPostStartDate); stmt.setLong_6svq3l$(5, entity.discussionPostDiscussionTopicUid); stmt.setBoolean_fzusl$(6, entity.discussionPostVisible); stmt.setBoolean_fzusl$(7, entity.discussionPostArchive); stmt.setLong_6svq3l$(8, entity.discussionPostStartedPersonUid); stmt.setLong_6svq3l$(9, entity.discussionPostClazzUid); stmt.setLong_6svq3l$(10, entity.discussionPostLct); }; DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; DiscussionPostDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao_JdbcKt', interfaces: [DiscussionPostDao]}; function DiscussionPostDao_ReplicateWrapper(_db, _dao) { DiscussionPostDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_90($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_90.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_90.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_90.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_90; Coroutine$replicateOnNewNode_s8cxhz$_90.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_90(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_87($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_87.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_87.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_87.prototype.constructor = Coroutine$replicateOnChange_87; Coroutine$replicateOnChange_87.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_87(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_ReplicateWrapper.prototype.getPostsByDiscussionTopic_s8cxhz$ = function (discussionTopicUid) { return this._dao_0.getPostsByDiscussionTopic_s8cxhz$(discussionTopicUid); }; DiscussionPostDao_ReplicateWrapper.prototype.getPostTitle_s8cxhz$ = function (postUid, continuation) { return this._dao_0.getPostTitle_s8cxhz$(postUid, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUid_s8cxhz$(uid, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.findWithDetailsByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findWithDetailsByUid_s8cxhz$(uid, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.findWithDetailsByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findWithDetailsByUidLive_s8cxhz$(uid); }; DiscussionPostDao_ReplicateWrapper.prototype.updateAsync_ttuxpq$ = function (entity, continuation) { entity.discussionPostLct = systemTimeInMillis(); return this._dao_0.updateAsync_ttuxpq$(entity, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_96($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_96.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_96.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_96.prototype.constructor = Coroutine$insertAsync_96; Coroutine$insertAsync_96.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.discussionPostUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(132, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.discussionPostUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.discussionPostLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.discussionPostUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_96(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionPostDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionPostDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionPostDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao_ReplicateWrapper', interfaces: [DiscussionPostDao]}; function DiscussionPostDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { DiscussionPostDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_91($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_91.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_91.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_91.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_91; Coroutine$replicateOnNewNode_s8cxhz$_91.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_91(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_88($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_88.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_88.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_88.prototype.constructor = Coroutine$replicateOnChange_88; Coroutine$replicateOnChange_88.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_88(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.getPostsByDiscussionTopic_s8cxhz$ = function (discussionTopicUid) { var _result = this._dao.getPostsByDiscussionTopic_s8cxhz$(discussionTopicUid); return _result; }; function Coroutine$getPostTitle_s8cxhz$_0($this, postUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$postUid = postUid_0; } Coroutine$getPostTitle_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getPostTitle_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getPostTitle_s8cxhz$_0.prototype.constructor = Coroutine$getPostTitle_s8cxhz$_0; Coroutine$getPostTitle_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getPostTitle_s8cxhz$(this.local$postUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.getPostTitle_s8cxhz$ = function (postUid_0, continuation_0, suspended) { var instance = new Coroutine$getPostTitle_s8cxhz$_0(this, postUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_s8cxhz$_2($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_2.prototype.constructor = Coroutine$findByUid_s8cxhz$_2; Coroutine$findByUid_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_2(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findWithDetailsByUid_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findWithDetailsByUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findWithDetailsByUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findWithDetailsByUid_s8cxhz$_0.prototype.constructor = Coroutine$findWithDetailsByUid_s8cxhz$_0; Coroutine$findWithDetailsByUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findWithDetailsByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.findWithDetailsByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findWithDetailsByUid_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.findWithDetailsByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findWithDetailsByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_ttuxpq$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_ttuxpq$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ttuxpq$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ttuxpq$_0.prototype.constructor = Coroutine$updateAsync_ttuxpq$_0; Coroutine$updateAsync_ttuxpq$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_ttuxpq$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.updateAsync_ttuxpq$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ttuxpq$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_97($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_97.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_97.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_97.prototype.constructor = Coroutine$insertAsync_97; Coroutine$insertAsync_97.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_97(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; DiscussionPostDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; DiscussionPostDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; DiscussionPostDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao_Repo', interfaces: [DiscussionPostDao]}; function DiscussionTopicDao_JdbcKt(_db) { DiscussionTopicDao.call(this); this._db = _db; this._insertAdapterDiscussionTopic_upsert = new DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral(this._db); this._insertAdapterDiscussionTopic_ = new DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral(this._db); } function Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_92($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_92.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_92.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_92.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_92; Coroutine$replicateOnNewNode_s8cxhz$_92.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicPk,\n | ? AS discussionTopicDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionTopic \n | ON DiscussionTopic.discussionTopicClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND discussionTopicDestination = ?), 0) \n | /*psql ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicPk,\n | ? AS discussionTopicDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionTopic \n | ON DiscussionTopic.discussionTopicClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND discussionTopicDestination = ?), 0) \n | ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_92(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_89($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_89.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_89.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_89.prototype.constructor = Coroutine$replicateOnChange_89; Coroutine$replicateOnChange_89.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicUid,\n | UserSession.usClientNodeId AS discussionTopicDestination\n | FROM ChangeLog\n | JOIN DiscussionTopic\n | ON ChangeLog.chTableId = 131\n | AND ChangeLog.chEntityPk = DiscussionTopic.discussionTopicUid\n | \n | \n | JOIN Clazz\n | ON Clazz.clazzUid = DiscussionTopic.discussionTopicClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND DiscussionTopicDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicUid,\n | UserSession.usClientNodeId AS discussionTopicDestination\n | FROM ChangeLog\n | JOIN DiscussionTopic\n | ON ChangeLog.chTableId = 131\n | AND ChangeLog.chEntityPk = DiscussionTopic.discussionTopicUid\n | \n | \n | JOIN Clazz\n | ON Clazz.clazzUid = DiscussionTopic.discussionTopicClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND DiscussionTopicDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionTopicDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_89(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral(this$DiscussionTopicDao_JdbcKt, closure$discussionUid) { this.this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt; this.closure$discussionUid = closure$discussionUid; DoorDataSourceFactory.call(this); } function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_numPosts = _resultSet.getInt_61zpoe$('numPosts'); var tmp_lastActiveTimestamp = _resultSet.getLong_61zpoe$('lastActiveTimestamp'); var tmp_discussionTopicUid = _resultSet.getLong_61zpoe$('discussionTopicUid'); var tmp_discussionTopicTitle = _resultSet.getString_61zpoe$('discussionTopicTitle'); var tmp_discussionTopicDesc = _resultSet.getString_61zpoe$('discussionTopicDesc'); var tmp_discussionTopicStartDate = _resultSet.getLong_61zpoe$('discussionTopicStartDate'); var tmp_discussionTopicCourseDiscussionUid = _resultSet.getLong_61zpoe$('discussionTopicCourseDiscussionUid'); var tmp_discussionTopicVisible = _resultSet.getBoolean_61zpoe$('discussionTopicVisible'); var tmp_discussionTopicArchive = _resultSet.getBoolean_61zpoe$('discussionTopicArchive'); var tmp_discussionTopicIndex = _resultSet.getInt_61zpoe$('discussionTopicIndex'); var tmp_discussionTopicClazzUid = _resultSet.getLong_61zpoe$('discussionTopicClazzUid'); var tmp_discussionTopicLct = _resultSet.getLong_61zpoe$('discussionTopicLct'); var _entity = new DiscussionTopicListDetail(); _entity.numPosts = tmp_numPosts; _entity.lastActiveTimestamp = tmp_lastActiveTimestamp; _entity.discussionTopicUid = tmp_discussionTopicUid; _entity.discussionTopicTitle = tmp_discussionTopicTitle; _entity.discussionTopicDesc = tmp_discussionTopicDesc; _entity.discussionTopicStartDate = tmp_discussionTopicStartDate; _entity.discussionTopicCourseDiscussionUid = tmp_discussionTopicCourseDiscussionUid; _entity.discussionTopicVisible = tmp_discussionTopicVisible; _entity.discussionTopicArchive = tmp_discussionTopicArchive; _entity.discussionTopicIndex = tmp_discussionTopicIndex; _entity.discussionTopicClazzUid = tmp_discussionTopicClazzUid; _entity.discussionTopicLct = tmp_discussionTopicLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(closure$discussionUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionUid = closure$discussionUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(closure$discussionUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(closure$discussionUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt_0; this.local$closure$discussionUid = closure$discussionUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT DiscussionTopic.*,\n | ( \n | SELECT COUNT(*) \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = DiscussionTopic.discussionTopicUid\n | ) as numPosts,\n | (\n | 0\n | )as lastActiveTimestamp\n | FROM DiscussionTopic \n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid = ? \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | ORDER BY DiscussionTopic.discussionTopicIndex\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT DiscussionTopic.*,\n | ( \n | SELECT COUNT(*) \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = DiscussionTopic.discussionTopicUid\n | ) as numPosts,\n | (\n | 0\n | )as lastActiveTimestamp\n | FROM DiscussionTopic \n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid = ? \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | ORDER BY DiscussionTopic.discussionTopicIndex\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionTopicDao_JdbcKt._db, _stmtConfig, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(this.local$closure$discussionUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$DiscussionTopicDao_JdbcKt._db, listOf(['DiscussionPost', 'DiscussionTopic']), DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this.this$DiscussionTopicDao_JdbcKt, this.closure$discussionUid, _limit, _offset)); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(closure$discussionUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionUid = closure$discussionUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(closure$discussionUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(closure$discussionUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt_0; this.local$closure$discussionUid = closure$discussionUid_0; this.local$_liveResult = void 0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT DiscussionTopic.*,\n | ( \n | SELECT COUNT(*) \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = DiscussionTopic.discussionTopicUid\n | ) as numPosts,\n | (\n | 0\n | )as lastActiveTimestamp\n | FROM DiscussionTopic \n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid = ? \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | ORDER BY DiscussionTopic.discussionTopicIndex\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT DiscussionTopic.*,\n | ( \n | SELECT COUNT(*) \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = DiscussionTopic.discussionTopicUid\n | ) as numPosts,\n | (\n | 0\n | )as lastActiveTimestamp\n | FROM DiscussionTopic \n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid = ? \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | ORDER BY DiscussionTopic.discussionTopicIndex\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionTopicDao_JdbcKt._db, _stmtConfig, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(this.local$closure$discussionUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$DiscussionTopicDao_JdbcKt._db, listOf(['DiscussionPost', 'DiscussionTopic']), DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this.this$DiscussionTopicDao_JdbcKt, this.closure$discussionUid)); }; DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; DiscussionTopicDao_JdbcKt.prototype.getListOfTopicsByDiscussion_s8cxhz$ = function (discussionUid) { var _result = new DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral(this, discussionUid); return _result; }; function DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_discussionTopicUid = _resultSet.getLong_61zpoe$('discussionTopicUid'); var tmp_discussionTopicTitle = _resultSet.getString_61zpoe$('discussionTopicTitle'); var tmp_discussionTopicDesc = _resultSet.getString_61zpoe$('discussionTopicDesc'); var tmp_discussionTopicStartDate = _resultSet.getLong_61zpoe$('discussionTopicStartDate'); var tmp_discussionTopicCourseDiscussionUid = _resultSet.getLong_61zpoe$('discussionTopicCourseDiscussionUid'); var tmp_discussionTopicVisible = _resultSet.getBoolean_61zpoe$('discussionTopicVisible'); var tmp_discussionTopicArchive = _resultSet.getBoolean_61zpoe$('discussionTopicArchive'); var tmp_discussionTopicIndex = _resultSet.getInt_61zpoe$('discussionTopicIndex'); var tmp_discussionTopicClazzUid = _resultSet.getLong_61zpoe$('discussionTopicClazzUid'); var tmp_discussionTopicLct = _resultSet.getLong_61zpoe$('discussionTopicLct'); var _entity = new DiscussionTopic(); _entity.discussionTopicUid = tmp_discussionTopicUid; _entity.discussionTopicTitle = tmp_discussionTopicTitle; _entity.discussionTopicDesc = tmp_discussionTopicDesc; _entity.discussionTopicStartDate = tmp_discussionTopicStartDate; _entity.discussionTopicCourseDiscussionUid = tmp_discussionTopicCourseDiscussionUid; _entity.discussionTopicVisible = tmp_discussionTopicVisible; _entity.discussionTopicArchive = tmp_discussionTopicArchive; _entity.discussionTopicIndex = tmp_discussionTopicIndex; _entity.discussionTopicClazzUid = tmp_discussionTopicClazzUid; _entity.discussionTopicLct = tmp_discussionTopicLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getTopicsByClazz_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$getTopicsByClazz_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTopicsByClazz_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTopicsByClazz_s8cxhz$.prototype.constructor = Coroutine$getTopicsByClazz_s8cxhz$; Coroutine$getTopicsByClazz_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT DiscussionTopic.*\n | FROM DiscussionTopic\n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid IN \n | (SELECT CourseDiscussion.courseDiscussionUid \n | FROM CourseDiscussion\n | WHERE CourseDiscussion.courseDiscussionClazzUid = ? ) \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT DiscussionTopic.*\n | FROM DiscussionTopic\n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid IN \n | (SELECT CourseDiscussion.courseDiscussionUid \n | FROM CourseDiscussion\n | WHERE CourseDiscussion.courseDiscussionClazzUid = ? ) \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.getTopicsByClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getTopicsByClazz_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_discussionTopicUid = _resultSet.getLong_61zpoe$('discussionTopicUid'); var tmp_discussionTopicTitle = _resultSet.getString_61zpoe$('discussionTopicTitle'); var tmp_discussionTopicDesc = _resultSet.getString_61zpoe$('discussionTopicDesc'); var tmp_discussionTopicStartDate = _resultSet.getLong_61zpoe$('discussionTopicStartDate'); var tmp_discussionTopicCourseDiscussionUid = _resultSet.getLong_61zpoe$('discussionTopicCourseDiscussionUid'); var tmp_discussionTopicVisible = _resultSet.getBoolean_61zpoe$('discussionTopicVisible'); var tmp_discussionTopicArchive = _resultSet.getBoolean_61zpoe$('discussionTopicArchive'); var tmp_discussionTopicIndex = _resultSet.getInt_61zpoe$('discussionTopicIndex'); var tmp_discussionTopicClazzUid = _resultSet.getLong_61zpoe$('discussionTopicClazzUid'); var tmp_discussionTopicLct = _resultSet.getLong_61zpoe$('discussionTopicLct'); var _entity = new DiscussionTopic(); _entity.discussionTopicUid = tmp_discussionTopicUid; _entity.discussionTopicTitle = tmp_discussionTopicTitle; _entity.discussionTopicDesc = tmp_discussionTopicDesc; _entity.discussionTopicStartDate = tmp_discussionTopicStartDate; _entity.discussionTopicCourseDiscussionUid = tmp_discussionTopicCourseDiscussionUid; _entity.discussionTopicVisible = tmp_discussionTopicVisible; _entity.discussionTopicArchive = tmp_discussionTopicArchive; _entity.discussionTopicIndex = tmp_discussionTopicIndex; _entity.discussionTopicClazzUid = tmp_discussionTopicClazzUid; _entity.discussionTopicLct = tmp_discussionTopicLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(closure$discussionTopicUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionTopicUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(closure$discussionTopicUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(closure$discussionTopicUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt_0; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$_liveResult = void 0; } Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, DiscussionTopic) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT DiscussionTopic.*\n | FROM DiscussionTopic\n | WHERE DiscussionTopic.discussionTopicUid = ?\n | \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT DiscussionTopic.*\n | FROM DiscussionTopic\n | WHERE DiscussionTopic.discussionTopicUid = ?\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionTopicDao_JdbcKt._db, _stmtConfig, DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(this.local$closure$discussionTopicUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionTopicUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt.prototype.getDiscussionTopicByUid_s8cxhz$ = function (discussionTopicUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('DiscussionTopic'), DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this, discussionTopicUid)); return _result; }; function Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda; Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_11($this, uid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_11.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_11; Coroutine$updateActiveByUid_zaz62j$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE DiscussionTopic \n | SET discussionTopicVisible = ?, \n | discussionTopicLct = ?\n | WHERE discussionTopicUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE DiscussionTopic \n | SET discussionTopicVisible = ?, \n | discussionTopicLct = ?\n | WHERE discussionTopicUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (uid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_11(this, uid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_twfw7k$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_twfw7k$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_twfw7k$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_twfw7k$.prototype.constructor = Coroutine$replaceListAsync_twfw7k$; Coroutine$replaceListAsync_twfw7k$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionTopic_upsert.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.replaceListAsync_twfw7k$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_twfw7k$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterDiscussionTopic_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_98($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_98.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_98.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_98.prototype.constructor = Coroutine$insertAsync_98; Coroutine$insertAsync_98.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionTopic_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_98(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterDiscussionTopic_.insertList_4ezy5m$(entityList); }; function DiscussionTopicDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.discussionTopicTitle); _stmt.setString_vqvrqt$(2, _entity.discussionTopicDesc); _stmt.setLong_6svq3l$(3, _entity.discussionTopicStartDate); _stmt.setLong_6svq3l$(4, _entity.discussionTopicCourseDiscussionUid); _stmt.setBoolean_fzusl$(5, _entity.discussionTopicVisible); _stmt.setBoolean_fzusl$(6, _entity.discussionTopicArchive); _stmt.setInt_vux9f0$(7, _entity.discussionTopicIndex); _stmt.setLong_6svq3l$(8, _entity.discussionTopicClazzUid); _stmt.setLong_6svq3l$(9, _entity.discussionTopicLct); _stmt.setLong_6svq3l$(10, _entity.discussionTopicUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } DiscussionTopicDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE DiscussionTopic SET discussionTopicTitle = ?, discussionTopicDesc = ?, discussionTopicStartDate = ?, discussionTopicCourseDiscussionUid = ?, discussionTopicVisible = ?, discussionTopicArchive = ?, discussionTopicIndex = ?, discussionTopicClazzUid = ?, discussionTopicLct = ? WHERE discussionTopicUid = ?'; prepareAndUseStatement_0(this._db, _sql, DiscussionTopicDao_JdbcKt$updateList$lambda(entityList)); }; function DiscussionTopicDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.discussionTopicTitle); _stmt.setString_vqvrqt$(2, closure$entity.discussionTopicDesc); _stmt.setLong_6svq3l$(3, closure$entity.discussionTopicStartDate); _stmt.setLong_6svq3l$(4, closure$entity.discussionTopicCourseDiscussionUid); _stmt.setBoolean_fzusl$(5, closure$entity.discussionTopicVisible); _stmt.setBoolean_fzusl$(6, closure$entity.discussionTopicArchive); _stmt.setInt_vux9f0$(7, closure$entity.discussionTopicIndex); _stmt.setLong_6svq3l$(8, closure$entity.discussionTopicClazzUid); _stmt.setLong_6svq3l$(9, closure$entity.discussionTopicLct); _stmt.setLong_6svq3l$(10, closure$entity.discussionTopicUid); return _stmt.executeUpdate(); }; } DiscussionTopicDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE DiscussionTopic SET discussionTopicTitle = ?, discussionTopicDesc = ?, discussionTopicStartDate = ?, discussionTopicCourseDiscussionUid = ?, discussionTopicVisible = ?, discussionTopicArchive = ?, discussionTopicIndex = ?, discussionTopicClazzUid = ?, discussionTopicLct = ? WHERE discussionTopicUid = ?'; prepareAndUseStatement_0(this._db, _sql, DiscussionTopicDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_14($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_14.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_14; Coroutine$insertListAsync_4ezy5m$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionTopic_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_14(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda; Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.discussionTopicTitle); this.local$_stmt.setString_vqvrqt$(2, _entity.discussionTopicDesc); this.local$_stmt.setLong_6svq3l$(3, _entity.discussionTopicStartDate); this.local$_stmt.setLong_6svq3l$(4, _entity.discussionTopicCourseDiscussionUid); this.local$_stmt.setBoolean_fzusl$(5, _entity.discussionTopicVisible); this.local$_stmt.setBoolean_fzusl$(6, _entity.discussionTopicArchive); this.local$_stmt.setInt_vux9f0$(7, _entity.discussionTopicIndex); this.local$_stmt.setLong_6svq3l$(8, _entity.discussionTopicClazzUid); this.local$_stmt.setLong_6svq3l$(9, _entity.discussionTopicLct); this.local$_stmt.setLong_6svq3l$(10, _entity.discussionTopicUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_14($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_14.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_14; Coroutine$updateListAsync_4ezy5m$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE DiscussionTopic SET discussionTopicTitle = ?, discussionTopicDesc = ?, discussionTopicStartDate = ?, discussionTopicCourseDiscussionUid = ?, discussionTopicVisible = ?, discussionTopicArchive = ?, discussionTopicIndex = ?, discussionTopicClazzUid = ?, discussionTopicLct = ? WHERE discussionTopicUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, DiscussionTopicDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_14(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO DiscussionTopic (discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING discussionTopicUid'; } else tmp$ = ''; return "INSERT INTO DiscussionTopic (discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(COALESCE(?,nextval('DiscussionTopic_discussionTopicUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = excluded.discussionTopicTitle,discussionTopicDesc = excluded.discussionTopicDesc,discussionTopicStartDate = excluded.discussionTopicStartDate,discussionTopicCourseDiscussionUid = excluded.discussionTopicCourseDiscussionUid,discussionTopicVisible = excluded.discussionTopicVisible,discussionTopicArchive = excluded.discussionTopicArchive,discussionTopicIndex = excluded.discussionTopicIndex,discussionTopicClazzUid = excluded.discussionTopicClazzUid,discussionTopicLct = excluded.discussionTopicLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.discussionTopicUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.discussionTopicUid); } stmt.setString_vqvrqt$(2, entity.discussionTopicTitle); stmt.setString_vqvrqt$(3, entity.discussionTopicDesc); stmt.setLong_6svq3l$(4, entity.discussionTopicStartDate); stmt.setLong_6svq3l$(5, entity.discussionTopicCourseDiscussionUid); stmt.setBoolean_fzusl$(6, entity.discussionTopicVisible); stmt.setBoolean_fzusl$(7, entity.discussionTopicArchive); stmt.setInt_vux9f0$(8, entity.discussionTopicIndex); stmt.setLong_6svq3l$(9, entity.discussionTopicClazzUid); stmt.setLong_6svq3l$(10, entity.discussionTopicLct); }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO DiscussionTopic (discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING discussionTopicUid'; } else tmp$ = ''; return "INSERT INTO DiscussionTopic (discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(COALESCE(?,nextval('DiscussionTopic_discussionTopicUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.discussionTopicUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.discussionTopicUid); } stmt.setString_vqvrqt$(2, entity.discussionTopicTitle); stmt.setString_vqvrqt$(3, entity.discussionTopicDesc); stmt.setLong_6svq3l$(4, entity.discussionTopicStartDate); stmt.setLong_6svq3l$(5, entity.discussionTopicCourseDiscussionUid); stmt.setBoolean_fzusl$(6, entity.discussionTopicVisible); stmt.setBoolean_fzusl$(7, entity.discussionTopicArchive); stmt.setInt_vux9f0$(8, entity.discussionTopicIndex); stmt.setLong_6svq3l$(9, entity.discussionTopicClazzUid); stmt.setLong_6svq3l$(10, entity.discussionTopicLct); }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; DiscussionTopicDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao_JdbcKt', interfaces: [DiscussionTopicDao]}; function DiscussionTopicDao_ReplicateWrapper(_db, _dao) { DiscussionTopicDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_93($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_93.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_93.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_93.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_93; Coroutine$replicateOnNewNode_s8cxhz$_93.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_93(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_90($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_90.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_90.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_90.prototype.constructor = Coroutine$replicateOnChange_90; Coroutine$replicateOnChange_90.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_90(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.prototype.getListOfTopicsByDiscussion_s8cxhz$ = function (discussionUid) { return this._dao_0.getListOfTopicsByDiscussion_s8cxhz$(discussionUid); }; DiscussionTopicDao_ReplicateWrapper.prototype.getTopicsByClazz_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getTopicsByClazz_s8cxhz$(clazzUid, continuation); }; DiscussionTopicDao_ReplicateWrapper.prototype.getDiscussionTopicByUid_s8cxhz$ = function (discussionTopicUid) { return this._dao_0.getDiscussionTopicByUid_s8cxhz$(discussionTopicUid); }; function Coroutine$updateActiveByUid_zaz62j$_12($this, uid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_12.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_12; Coroutine$updateActiveByUid_zaz62j$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$uid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (uid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_12(this, uid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_twfw7k$_0($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$list = list_0; } Coroutine$replaceListAsync_twfw7k$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_twfw7k$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_twfw7k$_0.prototype.constructor = Coroutine$replaceListAsync_twfw7k$_0; Coroutine$replaceListAsync_twfw7k$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$list.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.discussionTopicUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.discussionTopicUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.discussionTopicLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceListAsync_twfw7k$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.replaceListAsync_twfw7k$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_twfw7k$_0(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_99($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_99.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_99.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_99.prototype.constructor = Coroutine$insertAsync_99; Coroutine$insertAsync_99.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.discussionTopicUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.discussionTopicUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.discussionTopicLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.discussionTopicUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_99(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionTopicDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionTopicDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_15($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_15.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_15; Coroutine$insertListAsync_4ezy5m$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.discussionTopicUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.discussionTopicUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.discussionTopicLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_15(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_15($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_15.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_15; Coroutine$updateListAsync_4ezy5m$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.discussionTopicLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_15(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao_ReplicateWrapper', interfaces: [DiscussionTopicDao]}; function DiscussionTopicDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { DiscussionTopicDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_94($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_94.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_94.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_94.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_94; Coroutine$replicateOnNewNode_s8cxhz$_94.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_94(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_91($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_91.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_91.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_91.prototype.constructor = Coroutine$replicateOnChange_91; Coroutine$replicateOnChange_91.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_91(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.getListOfTopicsByDiscussion_s8cxhz$ = function (discussionUid) { var _result = this._dao.getListOfTopicsByDiscussion_s8cxhz$(discussionUid); return _result; }; function Coroutine$getTopicsByClazz_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getTopicsByClazz_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTopicsByClazz_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTopicsByClazz_s8cxhz$_0.prototype.constructor = Coroutine$getTopicsByClazz_s8cxhz$_0; Coroutine$getTopicsByClazz_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getTopicsByClazz_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.getTopicsByClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getTopicsByClazz_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.getDiscussionTopicByUid_s8cxhz$ = function (discussionTopicUid) { var _result = this._dao.getDiscussionTopicByUid_s8cxhz$(discussionTopicUid); return _result; }; function Coroutine$updateActiveByUid_zaz62j$_13($this, uid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_13.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_13; Coroutine$updateActiveByUid_zaz62j$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$uid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (uid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_13(this, uid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_twfw7k$_1($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_twfw7k$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_twfw7k$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_twfw7k$_1.prototype.constructor = Coroutine$replaceListAsync_twfw7k$_1; Coroutine$replaceListAsync_twfw7k$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceListAsync_twfw7k$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.replaceListAsync_twfw7k$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_twfw7k$_1(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_100($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_100.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_100.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_100.prototype.constructor = Coroutine$insertAsync_100; Coroutine$insertAsync_100.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_100(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; DiscussionTopicDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; DiscussionTopicDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_16($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_16.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_16; Coroutine$insertListAsync_4ezy5m$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_16(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_16($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_16.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_16; Coroutine$updateListAsync_4ezy5m$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_16(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao_Repo', interfaces: [DiscussionTopicDao]}; function EntityRoleDao_JdbcKt(_db) { EntityRoleDao.call(this); this._db = _db; this._insertAdapterEntityRole_upsert = new EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral(this._db); } function EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(closure$accountPersonUid_0, closure$permission_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$permission = closure$permission_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda; Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(closure$accountPersonUid_0, closure$permission_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(closure$accountPersonUid_0, closure$permission_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$userHasTableLevelPermission_3pjtqy$($this, accountPersonUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$permission = permission_0; } Coroutine$userHasTableLevelPermission_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$userHasTableLevelPermission_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$userHasTableLevelPermission_3pjtqy$.prototype.constructor = Coroutine$userHasTableLevelPermission_3pjtqy$; Coroutine$userHasTableLevelPermission_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT admin \n | FROM Person \n | WHERE personUid = ?), 0)\n | OR EXISTS(SELECT EntityRole.erUid FROM EntityRole \n | JOIN Role \n | ON EntityRole.erRoleUid = Role.roleUid \n | JOIN PersonGroupMember \n | ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND (Role.rolePermissions & ?) > 0) AS hasPermission\n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT admin \n | FROM Person \n | WHERE personUid = ?), false)\n | OR EXISTS(SELECT EntityRole.erUid FROM EntityRole \n | JOIN Role \n | ON EntityRole.erRoleUid = Role.roleUid \n | JOIN PersonGroupMember \n | ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND (Role.rolePermissions & ?) > 0) AS hasPermission\n | \n ')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(this.local$accountPersonUid, this.local$permission, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.userHasTableLevelPermission_3pjtqy$ = function (accountPersonUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$userHasTableLevelPermission_3pjtqy$(this, accountPersonUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_erUid = _resultSet.getLong_61zpoe$('erUid'); var tmp_erMasterCsn = _resultSet.getLong_61zpoe$('erMasterCsn'); var tmp_erLocalCsn = _resultSet.getLong_61zpoe$('erLocalCsn'); var tmp_erLastChangedBy = _resultSet.getInt_61zpoe$('erLastChangedBy'); var tmp_erLct = _resultSet.getLong_61zpoe$('erLct'); var tmp_erTableId = _resultSet.getInt_61zpoe$('erTableId'); var tmp_erEntityUid = _resultSet.getLong_61zpoe$('erEntityUid'); var tmp_erGroupUid = _resultSet.getLong_61zpoe$('erGroupUid'); var tmp_erRoleUid = _resultSet.getLong_61zpoe$('erRoleUid'); var tmp_erActive = _resultSet.getBoolean_61zpoe$('erActive'); var _entity = new EntityRole(); _entity.erUid = tmp_erUid; _entity.erMasterCsn = tmp_erMasterCsn; _entity.erLocalCsn = tmp_erLocalCsn; _entity.erLastChangedBy = tmp_erLastChangedBy; _entity.erLct = tmp_erLct; _entity.erTableId = tmp_erTableId; _entity.erEntityUid = tmp_erEntityUid; _entity.erGroupUid = tmp_erGroupUid; _entity.erRoleUid = tmp_erRoleUid; _entity.erActive = tmp_erActive; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(closure$tableId_0, closure$entityUid_0, closure$groupUid_0, closure$roleUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$groupUid = closure$groupUid_0; this.local$closure$roleUid = closure$roleUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda; Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$groupUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$roleUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(closure$tableId_0, closure$entityUid_0, closure$groupUid_0, closure$roleUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(closure$tableId_0, closure$entityUid_0, closure$groupUid_0, closure$roleUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$($this, tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$tableId = tableId_0; this.local$entityUid = entityUid_0; this.local$groupUid = groupUid_0; this.local$roleUid = roleUid_0; } Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.prototype.constructor = Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$; Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM EntityRole WHERE erTableId = ? AND erEntityUid = ? AND erGroupUid = ? AND erRoleUid = ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM EntityRole WHERE erTableId = ? AND erEntityUid = ? AND erGroupUid = ? AND erRoleUid = ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(this.local$tableId, this.local$entityUid, this.local$groupUid, this.local$roleUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.findByEntitiyAndPersonGroupAndRole_tmkdev$ = function (tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0, suspended) { var instance = new Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$(this, tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral(this$EntityRoleDao_JdbcKt, closure$personGroupUid) { this.this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt; this.closure$personGroupUid = closure$personGroupUid; DoorDataSourceFactory.call(this); } function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_entityRoleScopeName = _resultSet.getString_61zpoe$('entityRoleScopeName'); var tmp_erUid = _resultSet.getLong_61zpoe$('erUid'); var tmp_erMasterCsn = _resultSet.getLong_61zpoe$('erMasterCsn'); var tmp_erLocalCsn = _resultSet.getLong_61zpoe$('erLocalCsn'); var tmp_erLastChangedBy = _resultSet.getInt_61zpoe$('erLastChangedBy'); var tmp_erLct = _resultSet.getLong_61zpoe$('erLct'); var tmp_erTableId = _resultSet.getInt_61zpoe$('erTableId'); var tmp_erEntityUid = _resultSet.getLong_61zpoe$('erEntityUid'); var tmp_erGroupUid = _resultSet.getLong_61zpoe$('erGroupUid'); var tmp_erRoleUid = _resultSet.getLong_61zpoe$('erRoleUid'); var tmp_erActive = _resultSet.getBoolean_61zpoe$('erActive'); var _entity = new EntityRoleWithNameAndRole(); _entity.entityRoleScopeName = tmp_entityRoleScopeName; _entity.erUid = tmp_erUid; _entity.erMasterCsn = tmp_erMasterCsn; _entity.erLocalCsn = tmp_erLocalCsn; _entity.erLastChangedBy = tmp_erLastChangedBy; _entity.erLct = tmp_erLct; _entity.erTableId = tmp_erTableId; _entity.erEntityUid = tmp_erEntityUid; _entity.erGroupUid = tmp_erGroupUid; _entity.erRoleUid = tmp_erRoleUid; _entity.erActive = tmp_erActive; var _entityRoleRole_nullFieldCount = 0; var tmp_roleUid = _resultSet.getLong_61zpoe$('roleUid'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleName = _resultSet.getString_61zpoe$('roleName'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleActive = _resultSet.getBoolean_61zpoe$('roleActive'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleMasterCsn = _resultSet.getLong_61zpoe$('roleMasterCsn'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleLocalCsn = _resultSet.getLong_61zpoe$('roleLocalCsn'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleLastChangedBy = _resultSet.getInt_61zpoe$('roleLastChangedBy'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleLct = _resultSet.getLong_61zpoe$('roleLct'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_rolePermissions = _resultSet.getLong_61zpoe$('rolePermissions'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }if (_entityRoleRole_nullFieldCount < 8) { if (_entity.entityRoleRole == null) { _entity.entityRoleRole = new Role(); }ensureNotNull(_entity.entityRoleRole).roleUid = tmp_roleUid; ensureNotNull(_entity.entityRoleRole).roleName = tmp_roleName; ensureNotNull(_entity.entityRoleRole).roleActive = tmp_roleActive; ensureNotNull(_entity.entityRoleRole).roleMasterCsn = tmp_roleMasterCsn; ensureNotNull(_entity.entityRoleRole).roleLocalCsn = tmp_roleLocalCsn; ensureNotNull(_entity.entityRoleRole).roleLastChangedBy = tmp_roleLastChangedBy; ensureNotNull(_entity.entityRoleRole).roleLct = tmp_roleLct; ensureNotNull(_entity.entityRoleRole).rolePermissions = tmp_rolePermissions; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personGroupUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt_0; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$EntityRoleDao_JdbcKt._db, _stmtConfig, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(this.local$closure$personGroupUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$EntityRoleDao_JdbcKt._db, listOf(['Clazz', 'Person', 'School', 'EntityRole', 'Role']), EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this.this$EntityRoleDao_JdbcKt, this.closure$personGroupUid, _limit, _offset)); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(closure$personGroupUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personGroupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(closure$personGroupUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(closure$personGroupUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt_0; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$_liveResult = void 0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$EntityRoleDao_JdbcKt._db, _stmtConfig, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personGroupUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$EntityRoleDao_JdbcKt._db, listOf(['Clazz', 'Person', 'School', 'EntityRole', 'Role']), EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this.this$EntityRoleDao_JdbcKt, this.closure$personGroupUid)); }; EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; EntityRoleDao_JdbcKt.prototype.filterByPersonWithExtra_s8cxhz$ = function (personGroupUid) { var _result = new EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral(this, personGroupUid); return _result; }; function EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_entityRoleScopeName = _resultSet.getString_61zpoe$('entityRoleScopeName'); var tmp_erUid = _resultSet.getLong_61zpoe$('erUid'); var tmp_erMasterCsn = _resultSet.getLong_61zpoe$('erMasterCsn'); var tmp_erLocalCsn = _resultSet.getLong_61zpoe$('erLocalCsn'); var tmp_erLastChangedBy = _resultSet.getInt_61zpoe$('erLastChangedBy'); var tmp_erLct = _resultSet.getLong_61zpoe$('erLct'); var tmp_erTableId = _resultSet.getInt_61zpoe$('erTableId'); var tmp_erEntityUid = _resultSet.getLong_61zpoe$('erEntityUid'); var tmp_erGroupUid = _resultSet.getLong_61zpoe$('erGroupUid'); var tmp_erRoleUid = _resultSet.getLong_61zpoe$('erRoleUid'); var tmp_erActive = _resultSet.getBoolean_61zpoe$('erActive'); var _entity = new EntityRoleWithNameAndRole(); _entity.entityRoleScopeName = tmp_entityRoleScopeName; _entity.erUid = tmp_erUid; _entity.erMasterCsn = tmp_erMasterCsn; _entity.erLocalCsn = tmp_erLocalCsn; _entity.erLastChangedBy = tmp_erLastChangedBy; _entity.erLct = tmp_erLct; _entity.erTableId = tmp_erTableId; _entity.erEntityUid = tmp_erEntityUid; _entity.erGroupUid = tmp_erGroupUid; _entity.erRoleUid = tmp_erRoleUid; _entity.erActive = tmp_erActive; var _entityRoleRole_nullFieldCount = 0; var tmp_roleUid = _resultSet.getLong_61zpoe$('roleUid'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleName = _resultSet.getString_61zpoe$('roleName'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleActive = _resultSet.getBoolean_61zpoe$('roleActive'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleMasterCsn = _resultSet.getLong_61zpoe$('roleMasterCsn'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleLocalCsn = _resultSet.getLong_61zpoe$('roleLocalCsn'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleLastChangedBy = _resultSet.getInt_61zpoe$('roleLastChangedBy'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_roleLct = _resultSet.getLong_61zpoe$('roleLct'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }var tmp_rolePermissions = _resultSet.getLong_61zpoe$('rolePermissions'); if (_resultSet.wasNull()) { _entityRoleRole_nullFieldCount = _entityRoleRole_nullFieldCount + 1 | 0; }if (_entityRoleRole_nullFieldCount < 8) { if (_entity.entityRoleRole == null) { _entity.entityRoleRole = new Role(); }ensureNotNull(_entity.entityRoleRole).roleUid = tmp_roleUid; ensureNotNull(_entity.entityRoleRole).roleName = tmp_roleName; ensureNotNull(_entity.entityRoleRole).roleActive = tmp_roleActive; ensureNotNull(_entity.entityRoleRole).roleMasterCsn = tmp_roleMasterCsn; ensureNotNull(_entity.entityRoleRole).roleLocalCsn = tmp_roleLocalCsn; ensureNotNull(_entity.entityRoleRole).roleLastChangedBy = tmp_roleLastChangedBy; ensureNotNull(_entity.entityRoleRole).roleLct = tmp_roleLct; ensureNotNull(_entity.entityRoleRole).rolePermissions = tmp_rolePermissions; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(closure$personGroupUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personGroupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(closure$personGroupUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(closure$personGroupUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$filterByPersonWithExtraAsList_s8cxhz$($this, personGroupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personGroupUid = personGroupUid_0; } Coroutine$filterByPersonWithExtraAsList_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$filterByPersonWithExtraAsList_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$filterByPersonWithExtraAsList_s8cxhz$.prototype.constructor = Coroutine$filterByPersonWithExtraAsList_s8cxhz$; Coroutine$filterByPersonWithExtraAsList_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(this.local$personGroupUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.filterByPersonWithExtraAsList_s8cxhz$ = function (personGroupUid_0, continuation_0, suspended) { var instance = new Coroutine$filterByPersonWithExtraAsList_s8cxhz$(this, personGroupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function EntityRoleDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_erUid = _resultSet.getLong_61zpoe$('erUid'); var tmp_erMasterCsn = _resultSet.getLong_61zpoe$('erMasterCsn'); var tmp_erLocalCsn = _resultSet.getLong_61zpoe$('erLocalCsn'); var tmp_erLastChangedBy = _resultSet.getInt_61zpoe$('erLastChangedBy'); var tmp_erLct = _resultSet.getLong_61zpoe$('erLct'); var tmp_erTableId = _resultSet.getInt_61zpoe$('erTableId'); var tmp_erEntityUid = _resultSet.getLong_61zpoe$('erEntityUid'); var tmp_erGroupUid = _resultSet.getLong_61zpoe$('erGroupUid'); var tmp_erRoleUid = _resultSet.getLong_61zpoe$('erRoleUid'); var tmp_erActive = _resultSet.getBoolean_61zpoe$('erActive'); var _entity = new EntityRole(); _entity.erUid = tmp_erUid; _entity.erMasterCsn = tmp_erMasterCsn; _entity.erLocalCsn = tmp_erLocalCsn; _entity.erLastChangedBy = tmp_erLastChangedBy; _entity.erLct = tmp_erLct; _entity.erTableId = tmp_erTableId; _entity.erEntityUid = tmp_erEntityUid; _entity.erGroupUid = tmp_erGroupUid; _entity.erRoleUid = tmp_erRoleUid; _entity.erActive = tmp_erActive; closure$_result.v = _entity; }return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda; Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_15($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_15.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_15; Coroutine$findByUidAsync_s8cxhz$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, EntityRole) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM EntityRole WHERE erUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM EntityRole WHERE erUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, EntityRoleDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_15(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_erUid = _resultSet.getLong_61zpoe$('erUid'); var tmp_erMasterCsn = _resultSet.getLong_61zpoe$('erMasterCsn'); var tmp_erLocalCsn = _resultSet.getLong_61zpoe$('erLocalCsn'); var tmp_erLastChangedBy = _resultSet.getInt_61zpoe$('erLastChangedBy'); var tmp_erLct = _resultSet.getLong_61zpoe$('erLct'); var tmp_erTableId = _resultSet.getInt_61zpoe$('erTableId'); var tmp_erEntityUid = _resultSet.getLong_61zpoe$('erEntityUid'); var tmp_erGroupUid = _resultSet.getLong_61zpoe$('erGroupUid'); var tmp_erRoleUid = _resultSet.getLong_61zpoe$('erRoleUid'); var tmp_erActive = _resultSet.getBoolean_61zpoe$('erActive'); var _entity = new EntityRole(); _entity.erUid = tmp_erUid; _entity.erMasterCsn = tmp_erMasterCsn; _entity.erLocalCsn = tmp_erLocalCsn; _entity.erLastChangedBy = tmp_erLastChangedBy; _entity.erLct = tmp_erLct; _entity.erTableId = tmp_erTableId; _entity.erEntityUid = tmp_erEntityUid; _entity.erGroupUid = tmp_erGroupUid; _entity.erRoleUid = tmp_erRoleUid; _entity.erActive = tmp_erActive; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda(this$EntityRoleDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, EntityRole) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM EntityRole WHERE erUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM EntityRole WHERE erUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$EntityRoleDao_JdbcKt._db, _stmtConfig, EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByUidLive$lambda(this$EntityRoleDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda(this$EntityRoleDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('EntityRole'), EntityRoleDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda; Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.erMasterCsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.erLocalCsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.erLastChangedBy); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.erLct); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.erTableId); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.erEntityUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.erGroupUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.erRoleUid); this.local$_stmt.setBoolean_fzusl$(9, this.local$closure$entity.erActive); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.erUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_fqnpoh$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_fqnpoh$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_fqnpoh$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_fqnpoh$.prototype.constructor = Coroutine$updateAsync_fqnpoh$; Coroutine$updateAsync_fqnpoh$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE EntityRole SET erMasterCsn = ?, erLocalCsn = ?, erLastChangedBy = ?, erLct = ?, erTableId = ?, erEntityUid = ?, erGroupUid = ?, erRoleUid = ?, erActive = ? WHERE erUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, EntityRoleDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.updateAsync_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_fqnpoh$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_fqnpoh$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertOrReplace_fqnpoh$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_fqnpoh$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_fqnpoh$.prototype.constructor = Coroutine$insertOrReplace_fqnpoh$; Coroutine$insertOrReplace_fqnpoh$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterEntityRole_upsert.insertAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.insertOrReplace_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_fqnpoh$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO EntityRole (erUid, erMasterCsn, erLocalCsn, erLastChangedBy, erLct, erTableId, erEntityUid, erGroupUid, erRoleUid, erActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING erUid'; } else tmp$ = ''; return "INSERT INTO EntityRole (erUid, erMasterCsn, erLocalCsn, erLastChangedBy, erLct, erTableId, erEntityUid, erGroupUid, erRoleUid, erActive) VALUES(COALESCE(?,nextval('EntityRole_erUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (erUid) DO UPDATE SET erMasterCsn = excluded.erMasterCsn,erLocalCsn = excluded.erLocalCsn,erLastChangedBy = excluded.erLastChangedBy,erLct = excluded.erLct,erTableId = excluded.erTableId,erEntityUid = excluded.erEntityUid,erGroupUid = excluded.erGroupUid,erRoleUid = excluded.erRoleUid,erActive = excluded.erActive" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.erUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.erUid); } stmt.setLong_6svq3l$(2, entity.erMasterCsn); stmt.setLong_6svq3l$(3, entity.erLocalCsn); stmt.setInt_vux9f0$(4, entity.erLastChangedBy); stmt.setLong_6svq3l$(5, entity.erLct); stmt.setInt_vux9f0$(6, entity.erTableId); stmt.setLong_6svq3l$(7, entity.erEntityUid); stmt.setLong_6svq3l$(8, entity.erGroupUid); stmt.setLong_6svq3l$(9, entity.erRoleUid); stmt.setBoolean_fzusl$(10, entity.erActive); }; EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; EntityRoleDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRoleDao_JdbcKt', interfaces: [EntityRoleDao]}; function EntityRoleDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { EntityRoleDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$userHasTableLevelPermission_3pjtqy$_0($this, accountPersonUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$permission = permission_0; } Coroutine$userHasTableLevelPermission_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$userHasTableLevelPermission_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$userHasTableLevelPermission_3pjtqy$_0.prototype.constructor = Coroutine$userHasTableLevelPermission_3pjtqy$_0; Coroutine$userHasTableLevelPermission_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.userHasTableLevelPermission_3pjtqy$(this.local$accountPersonUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.userHasTableLevelPermission_3pjtqy$ = function (accountPersonUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$userHasTableLevelPermission_3pjtqy$_0(this, accountPersonUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0($this, tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tableId = tableId_0; this.local$entityUid = entityUid_0; this.local$groupUid = groupUid_0; this.local$roleUid = roleUid_0; } Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0.prototype.constructor = Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0; Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByEntitiyAndPersonGroupAndRole_tmkdev$(this.local$tableId, this.local$entityUid, this.local$groupUid, this.local$roleUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.findByEntitiyAndPersonGroupAndRole_tmkdev$ = function (tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0, suspended) { var instance = new Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$_0(this, tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; EntityRoleDao_Repo.prototype.filterByPersonWithExtra_s8cxhz$ = function (personGroupUid) { var _result = this._dao.filterByPersonWithExtra_s8cxhz$(personGroupUid); return _result; }; function Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0($this, personGroupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupUid = personGroupUid_0; } Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0.prototype.constructor = Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0; Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.filterByPersonWithExtraAsList_s8cxhz$(this.local$personGroupUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.filterByPersonWithExtraAsList_s8cxhz$ = function (personGroupUid_0, continuation_0, suspended) { var instance = new Coroutine$filterByPersonWithExtraAsList_s8cxhz$_0(this, personGroupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_16($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_16.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_16; Coroutine$findByUidAsync_s8cxhz$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_16(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; EntityRoleDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_fqnpoh$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_fqnpoh$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_fqnpoh$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_fqnpoh$_0.prototype.constructor = Coroutine$updateAsync_fqnpoh$_0; Coroutine$updateAsync_fqnpoh$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_fqnpoh$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.updateAsync_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_fqnpoh$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_fqnpoh$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertOrReplace_fqnpoh$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_fqnpoh$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_fqnpoh$_0.prototype.constructor = Coroutine$insertOrReplace_fqnpoh$_0; Coroutine$insertOrReplace_fqnpoh$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertOrReplace_fqnpoh$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.insertOrReplace_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_fqnpoh$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; EntityRoleDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRoleDao_Repo', interfaces: [EntityRoleDao]}; function ErrorReportDao_JdbcKt(_db) { ErrorReportDao.call(this); this._db = _db; this._insertAdapterErrorReport_ = new ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral(this._db); } function Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda; Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ErrorReportDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_92($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_92.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_92.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_92.prototype.constructor = Coroutine$replicateOnChange_92; Coroutine$replicateOnChange_92.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ErrorReportReplicate(erPk, erDestination)\n | SELECT DISTINCT ErrorReport.errUid AS erUid,\n | UserSession.usClientNodeId AS erDestination\n | FROM ChangeLog\n | JOIN ErrorReport\n | ON ChangeLog.chTableId = 419\n | AND ChangeLog.chEntityPk = ErrorReport.errUid\n | JOIN UserSession ON UserSession.usSessionType = 2\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ErrorReport.errLct != COALESCE(\n | (SELECT erVersionId\n | FROM ErrorReportReplicate\n | WHERE erPk = ErrorReport.errUid\n | AND erDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(erPk, erDestination) DO UPDATE\n | SET erPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ErrorReportReplicate(erPk, erDestination)\n | SELECT DISTINCT ErrorReport.errUid AS erUid,\n | UserSession.usClientNodeId AS erDestination\n | FROM ChangeLog\n | JOIN ErrorReport\n | ON ChangeLog.chTableId = 419\n | AND ChangeLog.chEntityPk = ErrorReport.errUid\n | JOIN UserSession ON UserSession.usSessionType = 2\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ErrorReport.errLct != COALESCE(\n | (SELECT erVersionId\n | FROM ErrorReportReplicate\n | WHERE erPk = ErrorReport.errUid\n | AND erDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(erPk, erDestination) DO UPDATE\n | SET erPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ErrorReportDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_92(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_vn2wbu$($this, errorReport_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errorReport = errorReport_0; } Coroutine$insertAsync_vn2wbu$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_vn2wbu$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_vn2wbu$.prototype.constructor = Coroutine$insertAsync_vn2wbu$; Coroutine$insertAsync_vn2wbu$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterErrorReport_.insertAndReturnIdAsync_11rb$(this.local$errorReport, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_JdbcKt.prototype.insertAsync_vn2wbu$ = function (errorReport_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_vn2wbu$(this, errorReport_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ErrorReportDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_errUid = _resultSet.getLong_61zpoe$('errUid'); var tmp_errPcsn = _resultSet.getLong_61zpoe$('errPcsn'); var tmp_errLcsn = _resultSet.getLong_61zpoe$('errLcsn'); var tmp_errLcb = _resultSet.getInt_61zpoe$('errLcb'); var tmp_errLct = _resultSet.getLong_61zpoe$('errLct'); var tmp_severity = _resultSet.getInt_61zpoe$('severity'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_presenterUri = _resultSet.getString_61zpoe$('presenterUri'); var tmp_appVersion = _resultSet.getString_61zpoe$('appVersion'); var tmp_versionCode = _resultSet.getInt_61zpoe$('versionCode'); var tmp_errorCode = _resultSet.getInt_61zpoe$('errorCode'); var tmp_operatingSys = _resultSet.getString_61zpoe$('operatingSys'); var tmp_osVersion = _resultSet.getString_61zpoe$('osVersion'); var tmp_stackTrace = _resultSet.getString_61zpoe$('stackTrace'); var tmp_message = _resultSet.getString_61zpoe$('message'); var _entity = new ErrorReport(); _entity.errUid = tmp_errUid; _entity.errPcsn = tmp_errPcsn; _entity.errLcsn = tmp_errLcsn; _entity.errLcb = tmp_errLcb; _entity.errLct = tmp_errLct; _entity.severity = tmp_severity; _entity.timestamp = tmp_timestamp; _entity.presenterUri = tmp_presenterUri; _entity.appVersion = tmp_appVersion; _entity.versionCode = tmp_versionCode; _entity.errorCode = tmp_errorCode; _entity.operatingSys = tmp_operatingSys; _entity.osVersion = tmp_osVersion; _entity.stackTrace = tmp_stackTrace; _entity.message = tmp_message; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda(closure$errUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$errUid = closure$errUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda; Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$errUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ErrorReportDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ErrorReportDao_JdbcKt$findByUidAsync$lambda(closure$errUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda(closure$errUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_17($this, errUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$errUid = errUid_0; } Coroutine$findByUidAsync_s8cxhz$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_17.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_17; Coroutine$findByUidAsync_s8cxhz$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ErrorReport) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ErrorReport.* \n | FROM ErrorReport\n | WHERE errUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ErrorReport.* \n | FROM ErrorReport\n | WHERE errUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ErrorReportDao_JdbcKt$findByUidAsync$lambda(this.local$errUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (errUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_17(this, errUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ErrorReportDao_JdbcKt$findByErrorCode$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_errUid = _resultSet.getLong_61zpoe$('errUid'); var tmp_errPcsn = _resultSet.getLong_61zpoe$('errPcsn'); var tmp_errLcsn = _resultSet.getLong_61zpoe$('errLcsn'); var tmp_errLcb = _resultSet.getInt_61zpoe$('errLcb'); var tmp_errLct = _resultSet.getLong_61zpoe$('errLct'); var tmp_severity = _resultSet.getInt_61zpoe$('severity'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_presenterUri = _resultSet.getString_61zpoe$('presenterUri'); var tmp_appVersion = _resultSet.getString_61zpoe$('appVersion'); var tmp_versionCode = _resultSet.getInt_61zpoe$('versionCode'); var tmp_errorCode = _resultSet.getInt_61zpoe$('errorCode'); var tmp_operatingSys = _resultSet.getString_61zpoe$('operatingSys'); var tmp_osVersion = _resultSet.getString_61zpoe$('osVersion'); var tmp_stackTrace = _resultSet.getString_61zpoe$('stackTrace'); var tmp_message = _resultSet.getString_61zpoe$('message'); var _entity = new ErrorReport(); _entity.errUid = tmp_errUid; _entity.errPcsn = tmp_errPcsn; _entity.errLcsn = tmp_errLcsn; _entity.errLcb = tmp_errLcb; _entity.errLct = tmp_errLct; _entity.severity = tmp_severity; _entity.timestamp = tmp_timestamp; _entity.presenterUri = tmp_presenterUri; _entity.appVersion = tmp_appVersion; _entity.versionCode = tmp_versionCode; _entity.errorCode = tmp_errorCode; _entity.operatingSys = tmp_operatingSys; _entity.osVersion = tmp_osVersion; _entity.stackTrace = tmp_stackTrace; _entity.message = tmp_message; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda(closure$errCode_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$errCode = closure$errCode_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.prototype.constructor = Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda; Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$errCode); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ErrorReportDao_JdbcKt$findByErrorCode$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ErrorReportDao_JdbcKt$findByErrorCode$lambda(closure$errCode_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda(closure$errCode_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByErrorCode_za3lpa$($this, errCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$errCode = errCode_0; } Coroutine$findByErrorCode_za3lpa$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByErrorCode_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByErrorCode_za3lpa$.prototype.constructor = Coroutine$findByErrorCode_za3lpa$; Coroutine$findByErrorCode_za3lpa$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ErrorReport.*\n | FROM ErrorReport\n | WHERE errorCode = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ErrorReport.*\n | FROM ErrorReport\n | WHERE errorCode = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ErrorReportDao_JdbcKt$findByErrorCode$lambda(this.local$errCode, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_JdbcKt.prototype.findByErrorCode_za3lpa$ = function (errCode_0, continuation_0, suspended) { var instance = new Coroutine$findByErrorCode_za3lpa$(this, errCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ErrorReport (errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING errUid'; } else tmp$ = ''; return "INSERT INTO ErrorReport (errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES(COALESCE(?,nextval('ErrorReport_errUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.errUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.errUid); } stmt.setLong_6svq3l$(2, entity.errPcsn); stmt.setLong_6svq3l$(3, entity.errLcsn); stmt.setInt_vux9f0$(4, entity.errLcb); stmt.setLong_6svq3l$(5, entity.errLct); stmt.setInt_vux9f0$(6, entity.severity); stmt.setLong_6svq3l$(7, entity.timestamp); stmt.setString_vqvrqt$(8, entity.presenterUri); stmt.setString_vqvrqt$(9, entity.appVersion); stmt.setInt_vux9f0$(10, entity.versionCode); stmt.setInt_vux9f0$(11, entity.errorCode); stmt.setString_vqvrqt$(12, entity.operatingSys); stmt.setString_vqvrqt$(13, entity.osVersion); stmt.setString_vqvrqt$(14, entity.stackTrace); stmt.setString_vqvrqt$(15, entity.message); }; ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ErrorReportDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao_JdbcKt', interfaces: [ErrorReportDao]}; function ErrorReportDao_ReplicateWrapper(_db, _dao) { ErrorReportDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnChange_93($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_93.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_93.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_93.prototype.constructor = Coroutine$replicateOnChange_93; Coroutine$replicateOnChange_93.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_93(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_vn2wbu$_0($this, errorReport_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errorReport = errorReport_0; } Coroutine$insertAsync_vn2wbu$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_vn2wbu$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_vn2wbu$_0.prototype.constructor = Coroutine$insertAsync_vn2wbu$_0; Coroutine$insertAsync_vn2wbu$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$errorReport.errUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(419, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$errorReport.errUid = _newPk; this.state_0 = 3; continue; case 3: this.local$errorReport.errLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_vn2wbu$(this.local$errorReport, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$errorReport.errUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_ReplicateWrapper.prototype.insertAsync_vn2wbu$ = function (errorReport_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_vn2wbu$_0(this, errorReport_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ErrorReportDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (errUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(errUid, continuation); }; ErrorReportDao_ReplicateWrapper.prototype.findByErrorCode_za3lpa$ = function (errCode, continuation) { return this._dao_0.findByErrorCode_za3lpa$(errCode, continuation); }; ErrorReportDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao_ReplicateWrapper', interfaces: [ErrorReportDao]}; function ErrorReportDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ErrorReportDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnChange_94($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_94.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_94.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_94.prototype.constructor = Coroutine$replicateOnChange_94; Coroutine$replicateOnChange_94.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_94(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_vn2wbu$_1($this, errorReport_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errorReport = errorReport_0; } Coroutine$insertAsync_vn2wbu$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_vn2wbu$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_vn2wbu$_1.prototype.constructor = Coroutine$insertAsync_vn2wbu$_1; Coroutine$insertAsync_vn2wbu$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_vn2wbu$(this.local$errorReport, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.insertAsync_vn2wbu$ = function (errorReport_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_vn2wbu$_1(this, errorReport_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_18($this, errUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errUid = errUid_0; } Coroutine$findByUidAsync_s8cxhz$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_18.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_18; Coroutine$findByUidAsync_s8cxhz$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$errUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (errUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_18(this, errUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByErrorCode_za3lpa$_0($this, errCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errCode = errCode_0; } Coroutine$findByErrorCode_za3lpa$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByErrorCode_za3lpa$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByErrorCode_za3lpa$_0.prototype.constructor = Coroutine$findByErrorCode_za3lpa$_0; Coroutine$findByErrorCode_za3lpa$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByErrorCode_za3lpa$(this.local$errCode, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.findByErrorCode_za3lpa$ = function (errCode_0, continuation_0, suspended) { var instance = new Coroutine$findByErrorCode_za3lpa$_0(this, errCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ErrorReportDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao_Repo', interfaces: [ErrorReportDao]}; function GroupLearningSessionDao_JdbcKt(_db) { GroupLearningSessionDao.call(this); this._db = _db; this._insertAdapterGroupLearningSession_ = new GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral(this._db); } function Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_95($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_95.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_95.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_95.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_95; Coroutine$replicateOnNewNode_s8cxhz$_95.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsPk,\n | ? AS glsDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN GroupLearningSession\n | ON GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = ?), 0) \n | /*psql ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsPk,\n | ? AS glsDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN GroupLearningSession\n | ON GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = ?), 0) \n | ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_95(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_95($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_95.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_95.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_95.prototype.constructor = Coroutine$replicateOnChange_95; Coroutine$replicateOnChange_95.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsUid,\n | UserSession.usClientNodeId AS glsDestination\n | FROM ChangeLog\n | JOIN GroupLearningSession\n | ON ChangeLog.chTableId = 302\n | AND ChangeLog.chEntityPk = GroupLearningSession.groupLearningSessionUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = GroupLearningSession.groupLearningSessionLearnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsUid,\n | UserSession.usClientNodeId AS glsDestination\n | FROM ChangeLog\n | JOIN GroupLearningSession\n | ON ChangeLog.chTableId = 302\n | AND ChangeLog.chEntityPk = GroupLearningSession.groupLearningSessionUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = GroupLearningSession.groupLearningSessionLearnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_95(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterGroupLearningSession_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_101($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_101.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_101.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_101.prototype.constructor = Coroutine$insertAsync_101; Coroutine$insertAsync_101.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterGroupLearningSession_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_101(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterGroupLearningSession_.insertList_4ezy5m$(entityList); }; function GroupLearningSessionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.groupLearningSessionContentUid); _stmt.setLong_6svq3l$(2, _entity.groupLearningSessionLearnerGroupUid); _stmt.setBoolean_fzusl$(3, _entity.groupLearningSessionInactive); _stmt.setLong_6svq3l$(4, _entity.groupLearningSessionMCSN); _stmt.setLong_6svq3l$(5, _entity.groupLearningSessionCSN); _stmt.setInt_vux9f0$(6, _entity.groupLearningSessionLCB); _stmt.setLong_6svq3l$(7, _entity.groupLearningSessionLct); _stmt.setLong_6svq3l$(8, _entity.groupLearningSessionUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } GroupLearningSessionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE GroupLearningSession SET groupLearningSessionContentUid = ?, groupLearningSessionLearnerGroupUid = ?, groupLearningSessionInactive = ?, groupLearningSessionMCSN = ?, groupLearningSessionCSN = ?, groupLearningSessionLCB = ?, groupLearningSessionLct = ? WHERE groupLearningSessionUid = ?'; prepareAndUseStatement_0(this._db, _sql, GroupLearningSessionDao_JdbcKt$updateList$lambda(entityList)); }; function GroupLearningSessionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.groupLearningSessionContentUid); _stmt.setLong_6svq3l$(2, closure$entity.groupLearningSessionLearnerGroupUid); _stmt.setBoolean_fzusl$(3, closure$entity.groupLearningSessionInactive); _stmt.setLong_6svq3l$(4, closure$entity.groupLearningSessionMCSN); _stmt.setLong_6svq3l$(5, closure$entity.groupLearningSessionCSN); _stmt.setInt_vux9f0$(6, closure$entity.groupLearningSessionLCB); _stmt.setLong_6svq3l$(7, closure$entity.groupLearningSessionLct); _stmt.setLong_6svq3l$(8, closure$entity.groupLearningSessionUid); return _stmt.executeUpdate(); }; } GroupLearningSessionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE GroupLearningSession SET groupLearningSessionContentUid = ?, groupLearningSessionLearnerGroupUid = ?, groupLearningSessionInactive = ?, groupLearningSessionMCSN = ?, groupLearningSessionCSN = ?, groupLearningSessionLCB = ?, groupLearningSessionLct = ? WHERE groupLearningSessionUid = ?'; prepareAndUseStatement_0(this._db, _sql, GroupLearningSessionDao_JdbcKt$update$lambda(entity)); }; function GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO GroupLearningSession (groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING groupLearningSessionUid'; } else tmp$ = ''; return "INSERT INTO GroupLearningSession (groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES(COALESCE(?,nextval('GroupLearningSession_groupLearningSessionUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupLearningSessionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupLearningSessionUid); } stmt.setLong_6svq3l$(2, entity.groupLearningSessionContentUid); stmt.setLong_6svq3l$(3, entity.groupLearningSessionLearnerGroupUid); stmt.setBoolean_fzusl$(4, entity.groupLearningSessionInactive); stmt.setLong_6svq3l$(5, entity.groupLearningSessionMCSN); stmt.setLong_6svq3l$(6, entity.groupLearningSessionCSN); stmt.setInt_vux9f0$(7, entity.groupLearningSessionLCB); stmt.setLong_6svq3l$(8, entity.groupLearningSessionLct); }; GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; GroupLearningSessionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao_JdbcKt', interfaces: [GroupLearningSessionDao]}; function GroupLearningSessionDao_ReplicateWrapper(_db, _dao) { GroupLearningSessionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_96($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_96.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_96.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_96.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_96; Coroutine$replicateOnNewNode_s8cxhz$_96.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_96(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_96($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_96.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_96.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_96.prototype.constructor = Coroutine$replicateOnChange_96; Coroutine$replicateOnChange_96.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_96(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_102($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_102.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_102.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_102.prototype.constructor = Coroutine$insertAsync_102; Coroutine$insertAsync_102.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.groupLearningSessionUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(302, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.groupLearningSessionUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.groupLearningSessionLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.groupLearningSessionUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_102(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; GroupLearningSessionDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; GroupLearningSessionDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; GroupLearningSessionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao_ReplicateWrapper', interfaces: [GroupLearningSessionDao]}; function GroupLearningSessionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { GroupLearningSessionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_97($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_97.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_97.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_97.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_97; Coroutine$replicateOnNewNode_s8cxhz$_97.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_97(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_97($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_97.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_97.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_97.prototype.constructor = Coroutine$replicateOnChange_97; Coroutine$replicateOnChange_97.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_97(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_103($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_103.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_103.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_103.prototype.constructor = Coroutine$insertAsync_103; Coroutine$insertAsync_103.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_103(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; GroupLearningSessionDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; GroupLearningSessionDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; GroupLearningSessionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao_Repo', interfaces: [GroupLearningSessionDao]}; function HolidayCalendarDao_JdbcKt(_db) { HolidayCalendarDao.call(this); this._db = _db; this._insertAdapterHolidayCalendar_upsert = new HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral(this._db); this._insertAdapterHolidayCalendar_ = new HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral(this._db); } function Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_98($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_98.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_98.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_98.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_98; Coroutine$replicateOnNewNode_s8cxhz$_98.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcPk,\n | ? AS hcDestination\n | FROM HolidayCalendar\n | JOIN UserSession\n | ON UserSession.usClientNodeId = ?\n | --notpsql \n | WHERE HolidayCalendar.umCalendarLct != COALESCE(\n | (SELECT hcVersionId\n | FROM HolidayCalendarReplicate\n | WHERE hcPk = HolidayCalendar.umCalendarUid\n | AND hcDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcPk,\n | ? AS hcDestination\n | FROM HolidayCalendar\n | JOIN UserSession\n | ON UserSession.usClientNodeId = ?\n | ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_98(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_98($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_98.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_98.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_98.prototype.constructor = Coroutine$replicateOnChange_98; Coroutine$replicateOnChange_98.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcUid,\n | UserSession.usClientNodeId AS hcDestination\n | FROM ChangeLog\n | JOIN HolidayCalendar\n | ON ChangeLog.chTableId = 28\n | AND ChangeLog.chEntityPk = HolidayCalendar.umCalendarUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | --notpsql \n | AND HolidayCalendar.umCalendarLct != COALESCE(\n | (SELECT hcVersionId\n | FROM HolidayCalendarReplicate\n | WHERE hcPk = HolidayCalendar.umCalendarUid\n | AND hcDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk \n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcUid,\n | UserSession.usClientNodeId AS hcDestination\n | FROM ChangeLog\n | JOIN HolidayCalendar\n | ON ChangeLog.chTableId = 28\n | AND ChangeLog.chEntityPk = HolidayCalendar.umCalendarUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk \n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayCalendarDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_98(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral(this$HolidayCalendarDao_JdbcKt) { this.this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt; DoorDataSourceFactory.call(this); } function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_numEntries = _resultSet.getInt_61zpoe$('numEntries'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); var _entity = new HolidayCalendarWithNumEntries(); _entity.numEntries = tmp_numEntries; _entity.umCalendarUid = tmp_umCalendarUid; _entity.umCalendarName = tmp_umCalendarName; _entity.umCalendarCategory = tmp_umCalendarCategory; _entity.umCalendarActive = tmp_umCalendarActive; _entity.umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; _entity.umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; _entity.umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; _entity.umCalendarLct = tmp_umCalendarLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT HolidayCalendar.* ,\n | (SELECT COUNT(*) FROM Holiday \n | WHERE holHolidayCalendarUid = HolidayCalendar.umCalendarUid \n | AND CAST(holActive AS INTEGER) = 1) AS numEntries \n | FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND \n | umCalendarCategory = 1) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT HolidayCalendar.* ,\n | (SELECT COUNT(*) FROM Holiday \n | WHERE holHolidayCalendarUid = HolidayCalendar.umCalendarUid \n | AND CAST(holActive AS INTEGER) = 1) AS numEntries \n | FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND \n | umCalendarCategory = 1) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, _stmtConfig, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$HolidayCalendarDao_JdbcKt._db, listOf(['Holiday', 'HolidayCalendar']), HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this.this$HolidayCalendarDao_JdbcKt, _limit, _offset)); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT HolidayCalendar.* ,\n | (SELECT COUNT(*) FROM Holiday \n | WHERE holHolidayCalendarUid = HolidayCalendar.umCalendarUid \n | AND CAST(holActive AS INTEGER) = 1) AS numEntries \n | FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND \n | umCalendarCategory = 1) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT HolidayCalendar.* ,\n | (SELECT COUNT(*) FROM Holiday \n | WHERE holHolidayCalendarUid = HolidayCalendar.umCalendarUid \n | AND CAST(holActive AS INTEGER) = 1) AS numEntries \n | FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND \n | umCalendarCategory = 1) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, _stmtConfig, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this$HolidayCalendarDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$HolidayCalendarDao_JdbcKt._db, listOf(['Holiday', 'HolidayCalendar']), HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this.this$HolidayCalendarDao_JdbcKt)); }; HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; HolidayCalendarDao_JdbcKt.prototype.findAllHolidaysWithEntriesCount = function () { var _result = new HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral(this); return _result; }; HolidayCalendarDao_JdbcKt.prototype.replaceList_qyl16p$ = function (list) { this._insertAdapterHolidayCalendar_upsert.insertList_4ezy5m$(list); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); var _entity = new HolidayCalendar(); _entity.umCalendarUid = tmp_umCalendarUid; _entity.umCalendarName = tmp_umCalendarName; _entity.umCalendarCategory = tmp_umCalendarCategory; _entity.umCalendarActive = tmp_umCalendarActive; _entity.umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; _entity.umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; _entity.umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; _entity.umCalendarLct = tmp_umCalendarLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND umCalendarCategory = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND umCalendarCategory = 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, _stmtConfig, HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this$HolidayCalendarDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt.prototype.findAllHolidaysLiveData = function () { var _result = new DoorLiveDataImpl(this._db, listOf_0('HolidayCalendar'), HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this)); return _result; }; function HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); var _entity = new HolidayCalendar(); _entity.umCalendarUid = tmp_umCalendarUid; _entity.umCalendarName = tmp_umCalendarName; _entity.umCalendarCategory = tmp_umCalendarCategory; _entity.umCalendarActive = tmp_umCalendarActive; _entity.umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; _entity.umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; _entity.umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; _entity.umCalendarLct = tmp_umCalendarLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, HolidayCalendar) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE umCalendarUid = ? AND CAST(umCalendarActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM HolidayCalendar WHERE umCalendarUid = ? AND CAST(umCalendarActive AS INTEGER) = 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, _stmtConfig, HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('HolidayCalendar'), HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda; Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.umCalendarName); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.umCalendarCategory); this.local$_stmt.setBoolean_fzusl$(3, this.local$closure$entity.umCalendarActive); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.umCalendarMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.umCalendarLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.umCalendarLastChangedBy); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.umCalendarLct); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.umCalendarUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_wzqrsg$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_wzqrsg$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_wzqrsg$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_wzqrsg$.prototype.constructor = Coroutine$updateAsync_wzqrsg$; Coroutine$updateAsync_wzqrsg$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE HolidayCalendar SET umCalendarName = ?, umCalendarCategory = ?, umCalendarActive = ?, umCalendarMasterChangeSeqNum = ?, umCalendarLocalChangeSeqNum = ?, umCalendarLastChangedBy = ?, umCalendarLct = ? WHERE umCalendarUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, HolidayCalendarDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.updateAsync_wzqrsg$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_wzqrsg$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayCalendarDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); var _entity = new HolidayCalendar(); _entity.umCalendarUid = tmp_umCalendarUid; _entity.umCalendarName = tmp_umCalendarName; _entity.umCalendarCategory = tmp_umCalendarCategory; _entity.umCalendarActive = tmp_umCalendarActive; _entity.umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; _entity.umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; _entity.umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; _entity.umCalendarLct = tmp_umCalendarLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_s8cxhz$_3($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_3.prototype.constructor = Coroutine$findByUid_s8cxhz$_3; Coroutine$findByUid_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, HolidayCalendar) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE umCalendarUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM HolidayCalendar WHERE umCalendarUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayCalendarDao_JdbcKt$findByUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_3(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayCalendarDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); var _entity = new HolidayCalendar(); _entity.umCalendarUid = tmp_umCalendarUid; _entity.umCalendarName = tmp_umCalendarName; _entity.umCalendarCategory = tmp_umCalendarCategory; _entity.umCalendarActive = tmp_umCalendarActive; _entity.umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; _entity.umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; _entity.umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; _entity.umCalendarLct = tmp_umCalendarLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_19($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_19.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_19; Coroutine$findByUidAsync_s8cxhz$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, HolidayCalendar) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE umCalendarUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM HolidayCalendar WHERE umCalendarUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_19(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterHolidayCalendar_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_104($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_104.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_104.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_104.prototype.constructor = Coroutine$insertAsync_104; Coroutine$insertAsync_104.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHolidayCalendar_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_104(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterHolidayCalendar_.insertList_4ezy5m$(entityList); }; function HolidayCalendarDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.umCalendarName); _stmt.setInt_vux9f0$(2, _entity.umCalendarCategory); _stmt.setBoolean_fzusl$(3, _entity.umCalendarActive); _stmt.setLong_6svq3l$(4, _entity.umCalendarMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.umCalendarLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.umCalendarLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.umCalendarLct); _stmt.setLong_6svq3l$(8, _entity.umCalendarUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } HolidayCalendarDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE HolidayCalendar SET umCalendarName = ?, umCalendarCategory = ?, umCalendarActive = ?, umCalendarMasterChangeSeqNum = ?, umCalendarLocalChangeSeqNum = ?, umCalendarLastChangedBy = ?, umCalendarLct = ? WHERE umCalendarUid = ?'; prepareAndUseStatement_0(this._db, _sql, HolidayCalendarDao_JdbcKt$updateList$lambda(entityList)); }; function HolidayCalendarDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.umCalendarName); _stmt.setInt_vux9f0$(2, closure$entity.umCalendarCategory); _stmt.setBoolean_fzusl$(3, closure$entity.umCalendarActive); _stmt.setLong_6svq3l$(4, closure$entity.umCalendarMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.umCalendarLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.umCalendarLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.umCalendarLct); _stmt.setLong_6svq3l$(8, closure$entity.umCalendarUid); return _stmt.executeUpdate(); }; } HolidayCalendarDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE HolidayCalendar SET umCalendarName = ?, umCalendarCategory = ?, umCalendarActive = ?, umCalendarMasterChangeSeqNum = ?, umCalendarLocalChangeSeqNum = ?, umCalendarLastChangedBy = ?, umCalendarLct = ? WHERE umCalendarUid = ?'; prepareAndUseStatement_0(this._db, _sql, HolidayCalendarDao_JdbcKt$update$lambda(entity)); }; function HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO HolidayCalendar (umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING umCalendarUid'; } else tmp$ = ''; return "INSERT INTO HolidayCalendar (umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES(COALESCE(?,nextval('HolidayCalendar_umCalendarUid_seq')), ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = excluded.umCalendarName,umCalendarCategory = excluded.umCalendarCategory,umCalendarActive = excluded.umCalendarActive,umCalendarMasterChangeSeqNum = excluded.umCalendarMasterChangeSeqNum,umCalendarLocalChangeSeqNum = excluded.umCalendarLocalChangeSeqNum,umCalendarLastChangedBy = excluded.umCalendarLastChangedBy,umCalendarLct = excluded.umCalendarLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.umCalendarUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.umCalendarUid); } stmt.setString_vqvrqt$(2, entity.umCalendarName); stmt.setInt_vux9f0$(3, entity.umCalendarCategory); stmt.setBoolean_fzusl$(4, entity.umCalendarActive); stmt.setLong_6svq3l$(5, entity.umCalendarMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.umCalendarLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.umCalendarLastChangedBy); stmt.setLong_6svq3l$(8, entity.umCalendarLct); }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO HolidayCalendar (umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING umCalendarUid'; } else tmp$ = ''; return "INSERT INTO HolidayCalendar (umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES(COALESCE(?,nextval('HolidayCalendar_umCalendarUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.umCalendarUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.umCalendarUid); } stmt.setString_vqvrqt$(2, entity.umCalendarName); stmt.setInt_vux9f0$(3, entity.umCalendarCategory); stmt.setBoolean_fzusl$(4, entity.umCalendarActive); stmt.setLong_6svq3l$(5, entity.umCalendarMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.umCalendarLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.umCalendarLastChangedBy); stmt.setLong_6svq3l$(8, entity.umCalendarLct); }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; HolidayCalendarDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao_JdbcKt', interfaces: [HolidayCalendarDao]}; function HolidayCalendarDao_ReplicateWrapper(_db, _dao) { HolidayCalendarDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_99($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_99.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_99.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_99.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_99; Coroutine$replicateOnNewNode_s8cxhz$_99.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_99(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_99($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_99.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_99.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_99.prototype.constructor = Coroutine$replicateOnChange_99; Coroutine$replicateOnChange_99.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_99(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_ReplicateWrapper.prototype.findAllHolidaysWithEntriesCount = function () { return this._dao_0.findAllHolidaysWithEntriesCount(); }; HolidayCalendarDao_ReplicateWrapper.prototype.replaceList_qyl16p$ = function (list) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.prototype.findAllHolidaysLiveData = function () { return this._dao_0.findAllHolidaysLiveData(); }; HolidayCalendarDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; HolidayCalendarDao_ReplicateWrapper.prototype.updateAsync_wzqrsg$ = function (entity, continuation) { entity.umCalendarLct = systemTimeInMillis(); return this._dao_0.updateAsync_wzqrsg$(entity, continuation); }; HolidayCalendarDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUid_s8cxhz$(uid, continuation); }; HolidayCalendarDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; HolidayCalendarDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_105($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_105.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_105.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_105.prototype.constructor = Coroutine$insertAsync_105; Coroutine$insertAsync_105.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.umCalendarUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(28, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.umCalendarUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.umCalendarLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.umCalendarUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_105(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao_ReplicateWrapper', interfaces: [HolidayCalendarDao]}; function HolidayCalendarDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { HolidayCalendarDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_100($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_100.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_100.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_100.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_100; Coroutine$replicateOnNewNode_s8cxhz$_100.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_100(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_100($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_100.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_100.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_100.prototype.constructor = Coroutine$replicateOnChange_100; Coroutine$replicateOnChange_100.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_100(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_Repo.prototype.findAllHolidaysWithEntriesCount = function () { var _result = this._dao.findAllHolidaysWithEntriesCount(); return _result; }; HolidayCalendarDao_Repo.prototype.replaceList_qyl16p$ = function (list) { this._dao.replaceList_qyl16p$(list); }; HolidayCalendarDao_Repo.prototype.findAllHolidaysLiveData = function () { var _result = this._dao.findAllHolidaysLiveData(); return _result; }; HolidayCalendarDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_wzqrsg$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_wzqrsg$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_wzqrsg$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_wzqrsg$_0.prototype.constructor = Coroutine$updateAsync_wzqrsg$_0; Coroutine$updateAsync_wzqrsg$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_wzqrsg$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.updateAsync_wzqrsg$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_wzqrsg$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_s8cxhz$_4($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_4.prototype.constructor = Coroutine$findByUid_s8cxhz$_4; Coroutine$findByUid_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_4(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_20($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_20.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_20; Coroutine$findByUidAsync_s8cxhz$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_20(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_106($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_106.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_106.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_106.prototype.constructor = Coroutine$insertAsync_106; Coroutine$insertAsync_106.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_106(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; HolidayCalendarDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; HolidayCalendarDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; HolidayCalendarDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao_Repo', interfaces: [HolidayCalendarDao]}; function HolidayDao_JdbcKt(_db) { HolidayDao.call(this); this._db = _db; this._insertAdapterHoliday_ = new HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral(this._db); } function Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_101($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_101.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_101.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_101.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_101; Coroutine$replicateOnNewNode_s8cxhz$_101.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayPk,\n | ? AS holidayDestination\n | FROM Holiday\n | WHERE Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = ?), 0) \n | /*psql ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayPk,\n | ? AS holidayDestination\n | FROM Holiday\n | WHERE Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = ?), 0) \n | ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_101(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda; Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_101($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_101.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_101.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_101.prototype.constructor = Coroutine$replicateOnChange_101; Coroutine$replicateOnChange_101.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayUid,\n | UserSession.usClientNodeId AS holidayDestination\n | FROM ChangeLog\n | JOIN Holiday\n | ON ChangeLog.chTableId = 99\n | AND ChangeLog.chEntityPk = Holiday.holUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayUid,\n | UserSession.usClientNodeId AS holidayDestination\n | FROM ChangeLog\n | JOIN Holiday\n | ON ChangeLog.chTableId = 99\n | AND ChangeLog.chEntityPk = Holiday.holUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_101(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_holUid = _resultSet.getLong_61zpoe$('holUid'); var tmp_holMasterCsn = _resultSet.getLong_61zpoe$('holMasterCsn'); var tmp_holLocalCsn = _resultSet.getLong_61zpoe$('holLocalCsn'); var tmp_holLastModBy = _resultSet.getInt_61zpoe$('holLastModBy'); var tmp_holLct = _resultSet.getLong_61zpoe$('holLct'); var tmp_holActive = _resultSet.getBoolean_61zpoe$('holActive'); var tmp_holHolidayCalendarUid = _resultSet.getLong_61zpoe$('holHolidayCalendarUid'); var tmp_holStartTime = _resultSet.getLong_61zpoe$('holStartTime'); var tmp_holEndTime = _resultSet.getLong_61zpoe$('holEndTime'); var tmp_holName = _resultSet.getString_61zpoe$('holName'); var _entity = new Holiday(); _entity.holUid = tmp_holUid; _entity.holMasterCsn = tmp_holMasterCsn; _entity.holLocalCsn = tmp_holLocalCsn; _entity.holLastModBy = tmp_holLastModBy; _entity.holLct = tmp_holLct; _entity.holActive = tmp_holActive; _entity.holHolidayCalendarUid = tmp_holHolidayCalendarUid; _entity.holStartTime = tmp_holStartTime; _entity.holEndTime = tmp_holEndTime; _entity.holName = tmp_holName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda(closure$holidayCalendarUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$holidayCalendarUid); useResults(_stmt.executeQuery(), HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda$lambda(closure$_result)); return Unit; }; } HolidayDao_JdbcKt.prototype.findByHolidayCalendaUid_s8cxhz$ = function (holidayCalendarUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Holiday WHERE holHolidayCalendarUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Holiday WHERE holHolidayCalendarUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda(holidayCalendarUid, _result)); return _result.v; }; function HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_holUid = _resultSet.getLong_61zpoe$('holUid'); var tmp_holMasterCsn = _resultSet.getLong_61zpoe$('holMasterCsn'); var tmp_holLocalCsn = _resultSet.getLong_61zpoe$('holLocalCsn'); var tmp_holLastModBy = _resultSet.getInt_61zpoe$('holLastModBy'); var tmp_holLct = _resultSet.getLong_61zpoe$('holLct'); var tmp_holActive = _resultSet.getBoolean_61zpoe$('holActive'); var tmp_holHolidayCalendarUid = _resultSet.getLong_61zpoe$('holHolidayCalendarUid'); var tmp_holStartTime = _resultSet.getLong_61zpoe$('holStartTime'); var tmp_holEndTime = _resultSet.getLong_61zpoe$('holEndTime'); var tmp_holName = _resultSet.getString_61zpoe$('holName'); var _entity = new Holiday(); _entity.holUid = tmp_holUid; _entity.holMasterCsn = tmp_holMasterCsn; _entity.holLocalCsn = tmp_holLocalCsn; _entity.holLastModBy = tmp_holLastModBy; _entity.holLct = tmp_holLct; _entity.holActive = tmp_holActive; _entity.holHolidayCalendarUid = tmp_holHolidayCalendarUid; _entity.holStartTime = tmp_holStartTime; _entity.holEndTime = tmp_holEndTime; _entity.holName = tmp_holName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(closure$holidayCalendarUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$holidayCalendarUid = closure$holidayCalendarUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda; Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$holidayCalendarUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(closure$holidayCalendarUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(closure$holidayCalendarUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByHolidayCalendaUidAsync_s8cxhz$($this, holidayCalendarUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$holidayCalendarUid = holidayCalendarUid_0; } Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByHolidayCalendaUidAsync_s8cxhz$; Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Holiday WHERE holHolidayCalendarUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Holiday WHERE holHolidayCalendarUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(this.local$holidayCalendarUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.findByHolidayCalendaUidAsync_s8cxhz$ = function (holidayCalendarUid_0, continuation_0, suspended) { var instance = new Coroutine$findByHolidayCalendaUidAsync_s8cxhz$(this, holidayCalendarUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayDao_JdbcKt$updateActiveByUid$lambda(closure$active, closure$changeTime, closure$holidayUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$active); _stmt.setLong_6svq3l$(2, closure$changeTime); _stmt.setLong_6svq3l$(3, closure$holidayUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } HolidayDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (holidayUid, active, changeTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Holiday \n | SET holActive = ?, \n | holLct = ?\n | WHERE holUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Holiday \n | SET holActive = ?, \n | holLct = ?\n | WHERE holUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, HolidayDao_JdbcKt$updateActiveByUid$lambda(active, changeTime, holidayUid)); }; function Coroutine$updateAsync_cqv1si$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_cqv1si$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_cqv1si$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_cqv1si$.prototype.constructor = Coroutine$updateAsync_cqv1si$; Coroutine$updateAsync_cqv1si$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHoliday_.insertAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.updateAsync_cqv1si$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_cqv1si$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterHoliday_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_107($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_107.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_107.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_107.prototype.constructor = Coroutine$insertAsync_107; Coroutine$insertAsync_107.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHoliday_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_107(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterHoliday_.insertList_4ezy5m$(entityList); }; function HolidayDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.holMasterCsn); _stmt.setLong_6svq3l$(2, _entity.holLocalCsn); _stmt.setInt_vux9f0$(3, _entity.holLastModBy); _stmt.setLong_6svq3l$(4, _entity.holLct); _stmt.setBoolean_fzusl$(5, _entity.holActive); _stmt.setLong_6svq3l$(6, _entity.holHolidayCalendarUid); _stmt.setLong_6svq3l$(7, _entity.holStartTime); _stmt.setLong_6svq3l$(8, _entity.holEndTime); _stmt.setString_vqvrqt$(9, _entity.holName); _stmt.setLong_6svq3l$(10, _entity.holUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } HolidayDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Holiday SET holMasterCsn = ?, holLocalCsn = ?, holLastModBy = ?, holLct = ?, holActive = ?, holHolidayCalendarUid = ?, holStartTime = ?, holEndTime = ?, holName = ? WHERE holUid = ?'; prepareAndUseStatement_0(this._db, _sql, HolidayDao_JdbcKt$updateList$lambda(entityList)); }; function HolidayDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.holMasterCsn); _stmt.setLong_6svq3l$(2, closure$entity.holLocalCsn); _stmt.setInt_vux9f0$(3, closure$entity.holLastModBy); _stmt.setLong_6svq3l$(4, closure$entity.holLct); _stmt.setBoolean_fzusl$(5, closure$entity.holActive); _stmt.setLong_6svq3l$(6, closure$entity.holHolidayCalendarUid); _stmt.setLong_6svq3l$(7, closure$entity.holStartTime); _stmt.setLong_6svq3l$(8, closure$entity.holEndTime); _stmt.setString_vqvrqt$(9, closure$entity.holName); _stmt.setLong_6svq3l$(10, closure$entity.holUid); return _stmt.executeUpdate(); }; } HolidayDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Holiday SET holMasterCsn = ?, holLocalCsn = ?, holLastModBy = ?, holLct = ?, holActive = ?, holHolidayCalendarUid = ?, holStartTime = ?, holEndTime = ?, holName = ? WHERE holUid = ?'; prepareAndUseStatement_0(this._db, _sql, HolidayDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_17($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_17.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_17; Coroutine$insertListAsync_4ezy5m$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHoliday_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_17(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda; Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.holMasterCsn); this.local$_stmt.setLong_6svq3l$(2, _entity.holLocalCsn); this.local$_stmt.setInt_vux9f0$(3, _entity.holLastModBy); this.local$_stmt.setLong_6svq3l$(4, _entity.holLct); this.local$_stmt.setBoolean_fzusl$(5, _entity.holActive); this.local$_stmt.setLong_6svq3l$(6, _entity.holHolidayCalendarUid); this.local$_stmt.setLong_6svq3l$(7, _entity.holStartTime); this.local$_stmt.setLong_6svq3l$(8, _entity.holEndTime); this.local$_stmt.setString_vqvrqt$(9, _entity.holName); this.local$_stmt.setLong_6svq3l$(10, _entity.holUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_17($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_17.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_17; Coroutine$updateListAsync_4ezy5m$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Holiday SET holMasterCsn = ?, holLocalCsn = ?, holLastModBy = ?, holLct = ?, holActive = ?, holHolidayCalendarUid = ?, holStartTime = ?, holEndTime = ?, holName = ? WHERE holUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, HolidayDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_17(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Holiday (holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING holUid'; } else tmp$ = ''; return "INSERT INTO Holiday (holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES(COALESCE(?,nextval('Holiday_holUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.holUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.holUid); } stmt.setLong_6svq3l$(2, entity.holMasterCsn); stmt.setLong_6svq3l$(3, entity.holLocalCsn); stmt.setInt_vux9f0$(4, entity.holLastModBy); stmt.setLong_6svq3l$(5, entity.holLct); stmt.setBoolean_fzusl$(6, entity.holActive); stmt.setLong_6svq3l$(7, entity.holHolidayCalendarUid); stmt.setLong_6svq3l$(8, entity.holStartTime); stmt.setLong_6svq3l$(9, entity.holEndTime); stmt.setString_vqvrqt$(10, entity.holName); }; HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; HolidayDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao_JdbcKt', interfaces: [HolidayDao]}; function HolidayDao_ReplicateWrapper(_db, _dao) { HolidayDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_102($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_102.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_102.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_102.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_102; Coroutine$replicateOnNewNode_s8cxhz$_102.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_102(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_102($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_102.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_102.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_102.prototype.constructor = Coroutine$replicateOnChange_102; Coroutine$replicateOnChange_102.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_102(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.prototype.findByHolidayCalendaUid_s8cxhz$ = function (holidayCalendarUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayDao_ReplicateWrapper.prototype.findByHolidayCalendaUidAsync_s8cxhz$ = function (holidayCalendarUid, continuation) { return this._dao_0.findByHolidayCalendaUidAsync_s8cxhz$(holidayCalendarUid, continuation); }; HolidayDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (holidayUid, active, changeTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateAsync_cqv1si$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_cqv1si$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_cqv1si$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_cqv1si$_0.prototype.constructor = Coroutine$updateAsync_cqv1si$_0; Coroutine$updateAsync_cqv1si$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.holUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.holUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.holLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.updateAsync_cqv1si$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.updateAsync_cqv1si$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_cqv1si$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_108($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_108.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_108.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_108.prototype.constructor = Coroutine$insertAsync_108; Coroutine$insertAsync_108.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.holUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.holUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.holLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.holUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_108(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_18($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_18.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_18; Coroutine$insertListAsync_4ezy5m$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.holUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.holUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.holLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_18(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_18($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_18.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_18; Coroutine$updateListAsync_4ezy5m$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.holLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_18(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao_ReplicateWrapper', interfaces: [HolidayDao]}; function HolidayDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { HolidayDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_103($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_103.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_103.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_103.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_103; Coroutine$replicateOnNewNode_s8cxhz$_103.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_103(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_103($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_103.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_103.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_103.prototype.constructor = Coroutine$replicateOnChange_103; Coroutine$replicateOnChange_103.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_103(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.findByHolidayCalendaUid_s8cxhz$ = function (holidayCalendarUid) { var _result = this._dao.findByHolidayCalendaUid_s8cxhz$(holidayCalendarUid); return _result; }; function Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0($this, holidayCalendarUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$holidayCalendarUid = holidayCalendarUid_0; } Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0; Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByHolidayCalendaUidAsync_s8cxhz$(this.local$holidayCalendarUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.findByHolidayCalendaUidAsync_s8cxhz$ = function (holidayCalendarUid_0, continuation_0, suspended) { var instance = new Coroutine$findByHolidayCalendaUidAsync_s8cxhz$_0(this, holidayCalendarUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (holidayUid, active, changeTime) { this._dao.updateActiveByUid_zaz62j$(holidayUid, active, changeTime); }; function Coroutine$updateAsync_cqv1si$_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_cqv1si$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_cqv1si$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_cqv1si$_1.prototype.constructor = Coroutine$updateAsync_cqv1si$_1; Coroutine$updateAsync_cqv1si$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_cqv1si$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.updateAsync_cqv1si$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_cqv1si$_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_109($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_109.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_109.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_109.prototype.constructor = Coroutine$insertAsync_109; Coroutine$insertAsync_109.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_109(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; HolidayDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; HolidayDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_19($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_19.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_19; Coroutine$insertListAsync_4ezy5m$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_19(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_19($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_19.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_19; Coroutine$updateListAsync_4ezy5m$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_19(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao_Repo', interfaces: [HolidayDao]}; function LanguageDao_JdbcKt(_db) { LanguageDao.call(this); this._db = _db; this._insertAdapterLanguage_ = new LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral(this._db); this._insertAdapterLanguage_upsert = new LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral(this._db); } function Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_104($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_104.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_104.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_104.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_104; Coroutine$replicateOnNewNode_s8cxhz$_104.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languagePk,\n | ? AS languageDestination\n | FROM Language\n | WHERE Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = ?), 0) \n | /*psql ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languagePk,\n | ? AS languageDestination\n | FROM Language\n | WHERE Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = ?), 0) \n | ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_104(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda; Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_104($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_104.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_104.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_104.prototype.constructor = Coroutine$replicateOnChange_104; Coroutine$replicateOnChange_104.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languageUid,\n | UserSession.usClientNodeId AS languageDestination\n | FROM ChangeLog\n | JOIN Language\n | ON ChangeLog.chTableId = 13\n | AND ChangeLog.chEntityPk = Language.langUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languageUid,\n | UserSession.usClientNodeId AS languageDestination\n | FROM ChangeLog\n | JOIN Language\n | ON ChangeLog.chTableId = 13\n | AND ChangeLog.chEntityPk = Language.langUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_104(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_11($this, languageList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$languageList = languageList_0; } Coroutine$insertListAsync_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_11.prototype.constructor = Coroutine$insertListAsync_11; Coroutine$insertListAsync_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLanguage_.insertListAsync_4ezy5m$(this.local$languageList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.insertListAsync = function (languageList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_11(this, languageList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral(this$LanguageDao_JdbcKt, closure$searchText, closure$sortOrder) { this.this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Language.* \n | FROM Language\n | WHERE name LIKE ?\n | ORDER BY CASE(?)\n | WHEN 1 THEN Language.name \n | WHEN 3 THEN Language.iso_639_1_standard \n | WHEN 5 THEN Language.iso_639_2_standard \n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Language.name \n | WHEN 4 THEN Language.iso_639_1_standard \n | WHEN 6 THEN Language.iso_639_2_standard \n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT Language.* \n | FROM Language\n | WHERE name LIKE ?\n | ORDER BY CASE(?)\n | WHEN 1 THEN Language.name \n | WHEN 3 THEN Language.iso_639_1_standard \n | WHEN 5 THEN Language.iso_639_2_standard \n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Language.name \n | WHEN 4 THEN Language.iso_639_1_standard \n | WHEN 6 THEN Language.iso_639_2_standard \n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LanguageDao_JdbcKt._db, _stmtConfig, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$LanguageDao_JdbcKt._db, listOf_0('Language'), LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this.this$LanguageDao_JdbcKt, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Language.* \n | FROM Language\n | WHERE name LIKE ?\n | ORDER BY CASE(?)\n | WHEN 1 THEN Language.name \n | WHEN 3 THEN Language.iso_639_1_standard \n | WHEN 5 THEN Language.iso_639_2_standard \n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Language.name \n | WHEN 4 THEN Language.iso_639_1_standard \n | WHEN 6 THEN Language.iso_639_2_standard \n | ELSE ''\n | END DESC\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Language.* \n | FROM Language\n | WHERE name LIKE ?\n | ORDER BY CASE(?)\n | WHEN 1 THEN Language.name \n | WHEN 3 THEN Language.iso_639_1_standard \n | WHEN 5 THEN Language.iso_639_2_standard \n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Language.name \n | WHEN 4 THEN Language.iso_639_1_standard \n | WHEN 6 THEN Language.iso_639_2_standard \n | ELSE ''\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LanguageDao_JdbcKt._db, _stmtConfig, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(this.local$closure$searchText, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$LanguageDao_JdbcKt._db, listOf_0('Language'), LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this.this$LanguageDao_JdbcKt, this.closure$searchText, this.closure$sortOrder)); }; LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; LanguageDao_JdbcKt.prototype.findLanguagesAsSource_19mbxw$ = function (sortOrder, searchText) { var _result = new LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral(this, searchText, sortOrder); return _result; }; function LanguageDao_JdbcKt$findLanguagesList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function LanguageDao_JdbcKt$findLanguagesList$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findLanguagesList$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.findLanguagesList = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Language', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Language\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$findLanguagesList$lambda(_result)); return _result.v; }; function LanguageDao_JdbcKt$findByName$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v = _entity; }return Unit; }; } function LanguageDao_JdbcKt$findByName$lambda(closure$name, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$name); useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByName$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.findByName_61zpoe$ = function (name) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Language WHERE name = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Language WHERE name = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$findByName$lambda(name, _result)); return _result.v; }; function LanguageDao_JdbcKt$findByTwoCode$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v = _entity; }return Unit; }; } function LanguageDao_JdbcKt$findByTwoCode$lambda(closure$langCode, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$langCode); useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByTwoCode$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.findByTwoCode_61zpoe$ = function (langCode) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Language WHERE iso_639_1_standard = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Language WHERE iso_639_1_standard = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$findByTwoCode$lambda(langCode, _result)); return _result.v; }; function LanguageDao_JdbcKt$findByTwoCodeAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(closure$langCode_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$langCode = closure$langCode_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda; Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$langCode); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findByTwoCodeAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(closure$langCode_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(closure$langCode_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByTwoCodeAsync_61zpoe$($this, langCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$langCode = langCode_0; } Coroutine$findByTwoCodeAsync_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByTwoCodeAsync_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByTwoCodeAsync_61zpoe$.prototype.constructor = Coroutine$findByTwoCodeAsync_61zpoe$; Coroutine$findByTwoCodeAsync_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Language WHERE iso_639_1_standard = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Language WHERE iso_639_1_standard = ? LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(this.local$langCode, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.findByTwoCodeAsync_61zpoe$ = function (langCode_0, continuation_0, suspended) { var instance = new Coroutine$findByTwoCodeAsync_61zpoe$(this, langCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageDao_JdbcKt$findByThreeCode$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v = _entity; }return Unit; }; } function LanguageDao_JdbcKt$findByThreeCode$lambda(closure$langCode, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$langCode); _stmt.setString_vqvrqt$(2, closure$langCode); useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByThreeCode$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.findByThreeCode_61zpoe$ = function (langCode) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LANGUAGE WHERE iso_639_3_standard = ? OR iso_639_2_standard = ? LIMIT 1 ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LANGUAGE WHERE iso_639_3_standard = ? OR iso_639_2_standard = ? LIMIT 1 \n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$findByThreeCode$lambda(langCode, _result)); return _result.v; }; function LanguageDao_JdbcKt$totalLanguageCount$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function LanguageDao_JdbcKt$totalLanguageCount$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$totalLanguageCount$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.totalLanguageCount = function () { var _result = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM LANGUAGE', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM LANGUAGE\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$totalLanguageCount$lambda(_result)); return _result.v; }; function LanguageDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.name); _stmt.setString_vqvrqt$(2, closure$entity.iso_639_1_standard); _stmt.setString_vqvrqt$(3, closure$entity.iso_639_2_standard); _stmt.setString_vqvrqt$(4, closure$entity.iso_639_3_standard); _stmt.setString_vqvrqt$(5, closure$entity.Language_Type); _stmt.setBoolean_fzusl$(6, closure$entity.languageActive); _stmt.setLong_6svq3l$(7, closure$entity.langLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.langMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.langLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.langLct); _stmt.setLong_6svq3l$(11, closure$entity.langUid); return _stmt.executeUpdate(); }; } LanguageDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Language SET name = ?, iso_639_1_standard = ?, iso_639_2_standard = ?, iso_639_3_standard = ?, Language_Type = ?, languageActive = ?, langLocalChangeSeqNum = ?, langMasterChangeSeqNum = ?, langLastChangedBy = ?, langLct = ? WHERE langUid = ?'; prepareAndUseStatement_0(this._db, _sql, LanguageDao_JdbcKt$update$lambda(entity)); }; function LanguageDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v = _entity; }return Unit; }; } function LanguageDao_JdbcKt$findByUid$lambda(closure$primaryLanguageUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$primaryLanguageUid); useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (primaryLanguageUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LANGUAGE where langUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LANGUAGE where langUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$findByUid$lambda(primaryLanguageUid, _result)); return _result.v; }; function LanguageDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda(closure$primaryLanguageUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$primaryLanguageUid = closure$primaryLanguageUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda; Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$primaryLanguageUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findByUidAsync$lambda(closure$primaryLanguageUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda(closure$primaryLanguageUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_21($this, primaryLanguageUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$primaryLanguageUid = primaryLanguageUid_0; } Coroutine$findByUidAsync_s8cxhz$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_21.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_21; Coroutine$findByUidAsync_s8cxhz$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LANGUAGE where langUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LANGUAGE where langUid = ? LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageDao_JdbcKt$findByUidAsync$lambda(this.local$primaryLanguageUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (primaryLanguageUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_21(this, primaryLanguageUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LanguageDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$updateAsync$lambda; Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.name); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.iso_639_1_standard); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.iso_639_2_standard); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.iso_639_3_standard); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.Language_Type); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.languageActive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.langLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.langMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.langLastChangedBy); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.langLct); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.langUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_lqiqse$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_lqiqse$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_lqiqse$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_lqiqse$.prototype.constructor = Coroutine$updateAsync_lqiqse$; Coroutine$updateAsync_lqiqse$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Language SET name = ?, iso_639_1_standard = ?, iso_639_2_standard = ?, iso_639_3_standard = ?, Language_Type = ?, languageActive = ?, langLocalChangeSeqNum = ?, langMasterChangeSeqNum = ?, langLastChangedBy = ?, langLct = ? WHERE langUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, LanguageDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.updateAsync_lqiqse$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_lqiqse$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_iso_639_1_standard = _resultSet.getString_61zpoe$('iso_639_1_standard'); var tmp_iso_639_2_standard = _resultSet.getString_61zpoe$('iso_639_2_standard'); var tmp_iso_639_3_standard = _resultSet.getString_61zpoe$('iso_639_3_standard'); var tmp_Language_Type = _resultSet.getString_61zpoe$('Language_Type'); var tmp_languageActive = _resultSet.getBoolean_61zpoe$('languageActive'); var tmp_langLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langLocalChangeSeqNum'); var tmp_langMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langMasterChangeSeqNum'); var tmp_langLastChangedBy = _resultSet.getInt_61zpoe$('langLastChangedBy'); var tmp_langLct = _resultSet.getLong_61zpoe$('langLct'); var _entity = new Language(); _entity.langUid = tmp_langUid; _entity.name = tmp_name; _entity.iso_639_1_standard = tmp_iso_639_1_standard; _entity.iso_639_2_standard = tmp_iso_639_2_standard; _entity.iso_639_3_standard = tmp_iso_639_3_standard; _entity.Language_Type = tmp_Language_Type; _entity.languageActive = tmp_languageActive; _entity.langLocalChangeSeqNum = tmp_langLocalChangeSeqNum; _entity.langMasterChangeSeqNum = tmp_langMasterChangeSeqNum; _entity.langLastChangedBy = tmp_langLastChangedBy; _entity.langLct = tmp_langLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda(this$LanguageDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LANGUAGE', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LANGUAGE\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LanguageDao_JdbcKt._db, _stmtConfig, LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findAllLanguageLive$lambda(this$LanguageDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda(this$LanguageDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt.prototype.findAllLanguageLive = function () { var _result = new DoorLiveDataImpl(this._db, listOf_0('LANGUAGE'), LanguageDao_JdbcKt$findAllLanguageLive$lambda(this)); return _result; }; function LanguageDao_JdbcKt$findByUidList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function LanguageDao_JdbcKt$findByUidList$lambda(this$LanguageDao_JdbcKt, closure$uidList, closure$_result) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, this$LanguageDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByUidList$lambda$lambda(closure$_result)); return Unit; }; } LanguageDao_JdbcKt.prototype.findByUidList = function (uidList) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT langUid FROM LANGUAGE WHERE langUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT langUid FROM LANGUAGE WHERE langUid IN (?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageDao_JdbcKt$findByUidList$lambda(this, uidList, _result)); return _result.v; }; function Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(closure$toggleVisibility_0, closure$updateTime_0, this$LanguageDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$updateTime = closure$updateTime_0; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda; Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setArray_wqp8hw$(3, this.local$this$LanguageDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(closure$toggleVisibility_0, closure$updateTime_0, this$LanguageDao_JdbcKt_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(closure$toggleVisibility_0, closure$updateTime_0, this$LanguageDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityLanguage_cbj1f0$($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityLanguage_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityLanguage_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityLanguage_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityLanguage_cbj1f0$; Coroutine$toggleVisibilityLanguage_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Language \n | SET languageActive = ?, \n | langLct = ?\n | WHERE langUid IN (?)\n '), true, void 0, void 0, trimMargin('\n |\n | UPDATE Language \n | SET languageActive = ?, \n | langLct = ?\n | WHERE langUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(this.local$toggleVisibility, this.local$updateTime, this.$this, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.toggleVisibilityLanguage_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityLanguage_cbj1f0$(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_JdbcKt.prototype.replaceList = function (entityList) { this._insertAdapterLanguage_upsert.insertList_4ezy5m$(entityList); }; LanguageDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLanguage_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_110($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_110.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_110.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_110.prototype.constructor = Coroutine$insertAsync_110; Coroutine$insertAsync_110.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLanguage_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_110(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLanguage_.insertList_4ezy5m$(entityList); }; function LanguageDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.name); _stmt.setString_vqvrqt$(2, _entity.iso_639_1_standard); _stmt.setString_vqvrqt$(3, _entity.iso_639_2_standard); _stmt.setString_vqvrqt$(4, _entity.iso_639_3_standard); _stmt.setString_vqvrqt$(5, _entity.Language_Type); _stmt.setBoolean_fzusl$(6, _entity.languageActive); _stmt.setLong_6svq3l$(7, _entity.langLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.langMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.langLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.langLct); _stmt.setLong_6svq3l$(11, _entity.langUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LanguageDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Language SET name = ?, iso_639_1_standard = ?, iso_639_2_standard = ?, iso_639_3_standard = ?, Language_Type = ?, languageActive = ?, langLocalChangeSeqNum = ?, langMasterChangeSeqNum = ?, langLastChangedBy = ?, langLct = ? WHERE langUid = ?'; prepareAndUseStatement_0(this._db, _sql, LanguageDao_JdbcKt$updateList$lambda(entityList)); }; function LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Language (langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING langUid'; } else tmp$ = ''; return "INSERT INTO Language (langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES(COALESCE(?,nextval('Language_langUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.langUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.langUid); } stmt.setString_vqvrqt$(2, entity.name); stmt.setString_vqvrqt$(3, entity.iso_639_1_standard); stmt.setString_vqvrqt$(4, entity.iso_639_2_standard); stmt.setString_vqvrqt$(5, entity.iso_639_3_standard); stmt.setString_vqvrqt$(6, entity.Language_Type); stmt.setBoolean_fzusl$(7, entity.languageActive); stmt.setLong_6svq3l$(8, entity.langLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.langMasterChangeSeqNum); stmt.setInt_vux9f0$(10, entity.langLastChangedBy); stmt.setLong_6svq3l$(11, entity.langLct); }; LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO Language (langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING langUid'; } else tmp$ = ''; return "INSERT INTO Language (langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES(COALESCE(?,nextval('Language_langUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (langUid) DO UPDATE SET name = excluded.name,iso_639_1_standard = excluded.iso_639_1_standard,iso_639_2_standard = excluded.iso_639_2_standard,iso_639_3_standard = excluded.iso_639_3_standard,Language_Type = excluded.Language_Type,languageActive = excluded.languageActive,langLocalChangeSeqNum = excluded.langLocalChangeSeqNum,langMasterChangeSeqNum = excluded.langMasterChangeSeqNum,langLastChangedBy = excluded.langLastChangedBy,langLct = excluded.langLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.langUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.langUid); } stmt.setString_vqvrqt$(2, entity.name); stmt.setString_vqvrqt$(3, entity.iso_639_1_standard); stmt.setString_vqvrqt$(4, entity.iso_639_2_standard); stmt.setString_vqvrqt$(5, entity.iso_639_3_standard); stmt.setString_vqvrqt$(6, entity.Language_Type); stmt.setBoolean_fzusl$(7, entity.languageActive); stmt.setLong_6svq3l$(8, entity.langLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.langMasterChangeSeqNum); stmt.setInt_vux9f0$(10, entity.langLastChangedBy); stmt.setLong_6svq3l$(11, entity.langLct); }; LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LanguageDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao_JdbcKt', interfaces: [LanguageDao]}; function LanguageDao_ReplicateWrapper(_db, _dao) { LanguageDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_105($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_105.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_105.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_105.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_105; Coroutine$replicateOnNewNode_s8cxhz$_105.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_105(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_105($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_105.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_105.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_105.prototype.constructor = Coroutine$replicateOnChange_105; Coroutine$replicateOnChange_105.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_105(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_12($this, languageList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$languageList = languageList_0; } Coroutine$insertListAsync_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_12.prototype.constructor = Coroutine$insertListAsync_12; Coroutine$insertListAsync_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$languageList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.langUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(13, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.langUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.langLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync(this.local$languageList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.insertListAsync = function (languageList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_12(this, languageList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_ReplicateWrapper.prototype.findLanguagesAsSource_19mbxw$ = function (sortOrder, searchText) { return this._dao_0.findLanguagesAsSource_19mbxw$(sortOrder, searchText); }; LanguageDao_ReplicateWrapper.prototype.findLanguagesList = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByName_61zpoe$ = function (name) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByTwoCode_61zpoe$ = function (langCode) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByTwoCodeAsync_61zpoe$ = function (langCode, continuation) { return this._dao_0.findByTwoCodeAsync_61zpoe$(langCode, continuation); }; LanguageDao_ReplicateWrapper.prototype.findByThreeCode_61zpoe$ = function (langCode) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.totalLanguageCount = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (primaryLanguageUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (primaryLanguageUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(primaryLanguageUid, continuation); }; LanguageDao_ReplicateWrapper.prototype.updateAsync_lqiqse$ = function (entity, continuation) { entity.langLct = systemTimeInMillis(); return this._dao_0.updateAsync_lqiqse$(entity, continuation); }; LanguageDao_ReplicateWrapper.prototype.findAllLanguageLive = function () { return this._dao_0.findAllLanguageLive(); }; LanguageDao_ReplicateWrapper.prototype.findByUidList = function (uidList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$toggleVisibilityLanguage_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityLanguage_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityLanguage_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityLanguage_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityLanguage_cbj1f0$_0; Coroutine$toggleVisibilityLanguage_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityLanguage_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.toggleVisibilityLanguage_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityLanguage_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_ReplicateWrapper.prototype.replaceList = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_111($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_111.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_111.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_111.prototype.constructor = Coroutine$insertAsync_111; Coroutine$insertAsync_111.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.langUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(13, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.langUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.langLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.langUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_111(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao_ReplicateWrapper', interfaces: [LanguageDao]}; function LanguageDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LanguageDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_106($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_106.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_106.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_106.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_106; Coroutine$replicateOnNewNode_s8cxhz$_106.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_106(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_106($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_106.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_106.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_106.prototype.constructor = Coroutine$replicateOnChange_106; Coroutine$replicateOnChange_106.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_106(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_13($this, languageList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$languageList = languageList_0; } Coroutine$insertListAsync_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_13.prototype.constructor = Coroutine$insertListAsync_13; Coroutine$insertListAsync_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$languageList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.insertListAsync = function (languageList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_13(this, languageList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.findLanguagesAsSource_19mbxw$ = function (sortOrder, searchText) { var _result = this._dao.findLanguagesAsSource_19mbxw$(sortOrder, searchText); return _result; }; LanguageDao_Repo.prototype.findLanguagesList = function () { var _result = this._dao.findLanguagesList(); return _result; }; LanguageDao_Repo.prototype.findByName_61zpoe$ = function (name) { var _result = this._dao.findByName_61zpoe$(name); return _result; }; LanguageDao_Repo.prototype.findByTwoCode_61zpoe$ = function (langCode) { var _result = this._dao.findByTwoCode_61zpoe$(langCode); return _result; }; function Coroutine$findByTwoCodeAsync_61zpoe$_0($this, langCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$langCode = langCode_0; } Coroutine$findByTwoCodeAsync_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByTwoCodeAsync_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByTwoCodeAsync_61zpoe$_0.prototype.constructor = Coroutine$findByTwoCodeAsync_61zpoe$_0; Coroutine$findByTwoCodeAsync_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByTwoCodeAsync_61zpoe$(this.local$langCode, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.findByTwoCodeAsync_61zpoe$ = function (langCode_0, continuation_0, suspended) { var instance = new Coroutine$findByTwoCodeAsync_61zpoe$_0(this, langCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.findByThreeCode_61zpoe$ = function (langCode) { var _result = this._dao.findByThreeCode_61zpoe$(langCode); return _result; }; LanguageDao_Repo.prototype.totalLanguageCount = function () { var _result = this._dao.totalLanguageCount(); return _result; }; LanguageDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LanguageDao_Repo.prototype.findByUid_s8cxhz$ = function (primaryLanguageUid) { var _result = this._dao.findByUid_s8cxhz$(primaryLanguageUid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_22($this, primaryLanguageUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$primaryLanguageUid = primaryLanguageUid_0; } Coroutine$findByUidAsync_s8cxhz$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_22.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_22; Coroutine$findByUidAsync_s8cxhz$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$primaryLanguageUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (primaryLanguageUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_22(this, primaryLanguageUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_lqiqse$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_lqiqse$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_lqiqse$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_lqiqse$_0.prototype.constructor = Coroutine$updateAsync_lqiqse$_0; Coroutine$updateAsync_lqiqse$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_lqiqse$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.updateAsync_lqiqse$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_lqiqse$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.findAllLanguageLive = function () { var _result = this._dao.findAllLanguageLive(); return _result; }; LanguageDao_Repo.prototype.findByUidList = function (uidList) { var _result = this._dao.findByUidList(uidList); return _result; }; function Coroutine$toggleVisibilityLanguage_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityLanguage_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityLanguage_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityLanguage_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityLanguage_cbj1f0$_1; Coroutine$toggleVisibilityLanguage_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityLanguage_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.toggleVisibilityLanguage_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityLanguage_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.replaceList = function (entityList) { this._dao.replaceList(entityList); }; LanguageDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_112($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_112.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_112.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_112.prototype.constructor = Coroutine$insertAsync_112; Coroutine$insertAsync_112.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_112(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LanguageDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LanguageDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao_Repo', interfaces: [LanguageDao]}; function LanguageVariantDao_JdbcKt(_db) { LanguageVariantDao.call(this); this._db = _db; this._insertAdapterLanguageVariant_ = new LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral(this._db); } function Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_107($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_107.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_107.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_107.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_107; Coroutine$replicateOnNewNode_s8cxhz$_107.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvPk,\n | ? AS lvDestination\n | FROM LanguageVariant\n | WHERE LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = ?), 0) \n | /*psql ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvPk,\n | ? AS lvDestination\n | FROM LanguageVariant\n | WHERE LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = ?), 0) \n | ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_107(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda; Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageVariantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_107($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_107.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_107.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_107.prototype.constructor = Coroutine$replicateOnChange_107; Coroutine$replicateOnChange_107.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvUid,\n | UserSession.usClientNodeId AS lvDestination\n | FROM ChangeLog\n | JOIN LanguageVariant\n | ON ChangeLog.chTableId = 10\n | AND ChangeLog.chEntityPk = LanguageVariant.langVariantUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvUid,\n | UserSession.usClientNodeId AS lvDestination\n | FROM ChangeLog\n | JOIN LanguageVariant\n | ON ChangeLog.chTableId = 10\n | AND ChangeLog.chEntityPk = LanguageVariant.langVariantUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LanguageVariantDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_107(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageVariantDao_JdbcKt$findByCode$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_langVariantUid = _resultSet.getLong_61zpoe$('langVariantUid'); var tmp_langUid = _resultSet.getLong_61zpoe$('langUid'); var tmp_countryCode = _resultSet.getString_61zpoe$('countryCode'); var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_langVariantLocalChangeSeqNum = _resultSet.getLong_61zpoe$('langVariantLocalChangeSeqNum'); var tmp_langVariantMasterChangeSeqNum = _resultSet.getLong_61zpoe$('langVariantMasterChangeSeqNum'); var tmp_langVariantLastChangedBy = _resultSet.getInt_61zpoe$('langVariantLastChangedBy'); var tmp_langVariantLct = _resultSet.getLong_61zpoe$('langVariantLct'); var _entity = new LanguageVariant(); _entity.langVariantUid = tmp_langVariantUid; _entity.langUid = tmp_langUid; _entity.countryCode = tmp_countryCode; _entity.name = tmp_name; _entity.langVariantLocalChangeSeqNum = tmp_langVariantLocalChangeSeqNum; _entity.langVariantMasterChangeSeqNum = tmp_langVariantMasterChangeSeqNum; _entity.langVariantLastChangedBy = tmp_langVariantLastChangedBy; _entity.langVariantLct = tmp_langVariantLct; closure$_result.v = _entity; }return Unit; }; } function LanguageVariantDao_JdbcKt$findByCode$lambda(closure$countryCode, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$countryCode); useResults(_stmt.executeQuery(), LanguageVariantDao_JdbcKt$findByCode$lambda$lambda(closure$_result)); return Unit; }; } LanguageVariantDao_JdbcKt.prototype.findByCode_61zpoe$ = function (countryCode) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, LanguageVariant) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LanguageVariant WHERE countryCode = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LanguageVariant WHERE countryCode = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, LanguageVariantDao_JdbcKt$findByCode$lambda(countryCode, _result)); return _result.v; }; LanguageVariantDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLanguageVariant_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_113($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_113.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_113.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_113.prototype.constructor = Coroutine$insertAsync_113; Coroutine$insertAsync_113.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLanguageVariant_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_113(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLanguageVariant_.insertList_4ezy5m$(entityList); }; function LanguageVariantDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.langUid); _stmt.setString_vqvrqt$(2, _entity.countryCode); _stmt.setString_vqvrqt$(3, _entity.name); _stmt.setLong_6svq3l$(4, _entity.langVariantLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.langVariantMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.langVariantLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.langVariantLct); _stmt.setLong_6svq3l$(8, _entity.langVariantUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LanguageVariantDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LanguageVariant SET langUid = ?, countryCode = ?, name = ?, langVariantLocalChangeSeqNum = ?, langVariantMasterChangeSeqNum = ?, langVariantLastChangedBy = ?, langVariantLct = ? WHERE langVariantUid = ?'; prepareAndUseStatement_0(this._db, _sql, LanguageVariantDao_JdbcKt$updateList$lambda(entityList)); }; function LanguageVariantDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.langUid); _stmt.setString_vqvrqt$(2, closure$entity.countryCode); _stmt.setString_vqvrqt$(3, closure$entity.name); _stmt.setLong_6svq3l$(4, closure$entity.langVariantLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.langVariantMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.langVariantLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.langVariantLct); _stmt.setLong_6svq3l$(8, closure$entity.langVariantUid); return _stmt.executeUpdate(); }; } LanguageVariantDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LanguageVariant SET langUid = ?, countryCode = ?, name = ?, langVariantLocalChangeSeqNum = ?, langVariantMasterChangeSeqNum = ?, langVariantLastChangedBy = ?, langVariantLct = ? WHERE langVariantUid = ?'; prepareAndUseStatement_0(this._db, _sql, LanguageVariantDao_JdbcKt$update$lambda(entity)); }; function LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO LanguageVariant (langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING langVariantUid'; } else tmp$ = ''; return "INSERT INTO LanguageVariant (langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES(COALESCE(?,nextval('LanguageVariant_langVariantUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.langVariantUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.langVariantUid); } stmt.setLong_6svq3l$(2, entity.langUid); stmt.setString_vqvrqt$(3, entity.countryCode); stmt.setString_vqvrqt$(4, entity.name); stmt.setLong_6svq3l$(5, entity.langVariantLocalChangeSeqNum); stmt.setLong_6svq3l$(6, entity.langVariantMasterChangeSeqNum); stmt.setInt_vux9f0$(7, entity.langVariantLastChangedBy); stmt.setLong_6svq3l$(8, entity.langVariantLct); }; LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LanguageVariantDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao_JdbcKt', interfaces: [LanguageVariantDao]}; function LanguageVariantDao_ReplicateWrapper(_db, _dao) { LanguageVariantDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_108($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_108.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_108.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_108.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_108; Coroutine$replicateOnNewNode_s8cxhz$_108.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_108(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_108($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_108.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_108.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_108.prototype.constructor = Coroutine$replicateOnChange_108; Coroutine$replicateOnChange_108.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_108(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_ReplicateWrapper.prototype.findByCode_61zpoe$ = function (countryCode) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_114($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_114.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_114.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_114.prototype.constructor = Coroutine$insertAsync_114; Coroutine$insertAsync_114.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.langVariantUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(10, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.langVariantUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.langVariantLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.langVariantUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_114(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao_ReplicateWrapper', interfaces: [LanguageVariantDao]}; function LanguageVariantDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LanguageVariantDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_109($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_109.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_109.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_109.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_109; Coroutine$replicateOnNewNode_s8cxhz$_109.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_109(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_109($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_109.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_109.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_109.prototype.constructor = Coroutine$replicateOnChange_109; Coroutine$replicateOnChange_109.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_109(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_Repo.prototype.findByCode_61zpoe$ = function (countryCode) { var _result = this._dao.findByCode_61zpoe$(countryCode); return _result; }; LanguageVariantDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_115($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_115.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_115.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_115.prototype.constructor = Coroutine$insertAsync_115; Coroutine$insertAsync_115.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_115(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LanguageVariantDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LanguageVariantDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LanguageVariantDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao_Repo', interfaces: [LanguageVariantDao]}; function LearnerGroupDao_JdbcKt(_db) { LearnerGroupDao.call(this); this._db = _db; this._insertAdapterLearnerGroup_ = new LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral(this._db); } function Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_110($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_110.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_110.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_110.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_110; Coroutine$replicateOnNewNode_s8cxhz$_110.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgPk,\n | ? AS lgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN LearnerGroup\n | ON LearnerGroup.learnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroup.learnerGroupLct != COALESCE(\n | (SELECT lgVersionId\n | FROM LearnerGroupReplicate\n | WHERE lgPk = LearnerGroup.learnerGroupUid\n | AND lgDestination = ?), 0) \n | /*psql ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgPk,\n | ? AS lgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN LearnerGroup\n | ON LearnerGroup.learnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroup.learnerGroupLct != COALESCE(\n | (SELECT lgVersionId\n | FROM LearnerGroupReplicate\n | WHERE lgPk = LearnerGroup.learnerGroupUid\n | AND lgDestination = ?), 0) \n | ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_110(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda; Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_110($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_110.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_110.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_110.prototype.constructor = Coroutine$replicateOnChange_110; Coroutine$replicateOnChange_110.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgUid,\n | UserSession.usClientNodeId AS lgDestination\n | FROM ChangeLog\n | JOIN LearnerGroup\n | ON ChangeLog.chTableId = 301\n | AND ChangeLog.chEntityPk = LearnerGroup.learnerGroupUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = LearnerGroup.learnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | /*psql ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgUid,\n | UserSession.usClientNodeId AS lgDestination\n | FROM ChangeLog\n | JOIN LearnerGroup\n | ON ChangeLog.chTableId = 301\n | AND ChangeLog.chEntityPk = LearnerGroup.learnerGroupUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = LearnerGroup.learnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LearnerGroupDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_110(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral(this$LearnerGroupDao_JdbcKt, closure$contentEntryUid) { this.this$LearnerGroupDao_JdbcKt = this$LearnerGroupDao_JdbcKt; this.closure$contentEntryUid = closure$contentEntryUid; DoorDataSourceFactory.call(this); } function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_learnerGroupUid = _resultSet.getLong_61zpoe$('learnerGroupUid'); var tmp_learnerGroupName = _resultSet.getString_61zpoe$('learnerGroupName'); var tmp_learnerGroupDescription = _resultSet.getString_61zpoe$('learnerGroupDescription'); var tmp_learnerGroupActive = _resultSet.getBoolean_61zpoe$('learnerGroupActive'); var tmp_learnerGroupMCSN = _resultSet.getLong_61zpoe$('learnerGroupMCSN'); var tmp_learnerGroupCSN = _resultSet.getLong_61zpoe$('learnerGroupCSN'); var tmp_learnerGroupLCB = _resultSet.getInt_61zpoe$('learnerGroupLCB'); var tmp_learnerGroupLct = _resultSet.getLong_61zpoe$('learnerGroupLct'); var _entity = new LearnerGroup(); _entity.learnerGroupUid = tmp_learnerGroupUid; _entity.learnerGroupName = tmp_learnerGroupName; _entity.learnerGroupDescription = tmp_learnerGroupDescription; _entity.learnerGroupActive = tmp_learnerGroupActive; _entity.learnerGroupMCSN = tmp_learnerGroupMCSN; _entity.learnerGroupCSN = tmp_learnerGroupCSN; _entity.learnerGroupLCB = tmp_learnerGroupLCB; _entity.learnerGroupLct = tmp_learnerGroupLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupDao_JdbcKt = this$LearnerGroupDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupDao_JdbcKt._db, _stmtConfig, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$LearnerGroupDao_JdbcKt._db, listOf(['LearnerGroup', 'GroupLearningSession']), LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this.this$LearnerGroupDao_JdbcKt, this.closure$contentEntryUid, _limit, _offset)); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupDao_JdbcKt = this$LearnerGroupDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_liveResult = void 0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupDao_JdbcKt._db, _stmtConfig, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(this.local$closure$contentEntryUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$LearnerGroupDao_JdbcKt._db, listOf(['LearnerGroup', 'GroupLearningSession']), LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this.this$LearnerGroupDao_JdbcKt, this.closure$contentEntryUid)); }; LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; LearnerGroupDao_JdbcKt.prototype.findGroupsForEntryAsync_s8cxhz$ = function (contentEntryUid) { var _result = new LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral(this, contentEntryUid); return _result; }; function LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_learnerGroupUid = _resultSet.getLong_61zpoe$('learnerGroupUid'); var tmp_learnerGroupName = _resultSet.getString_61zpoe$('learnerGroupName'); var tmp_learnerGroupDescription = _resultSet.getString_61zpoe$('learnerGroupDescription'); var tmp_learnerGroupActive = _resultSet.getBoolean_61zpoe$('learnerGroupActive'); var tmp_learnerGroupMCSN = _resultSet.getLong_61zpoe$('learnerGroupMCSN'); var tmp_learnerGroupCSN = _resultSet.getLong_61zpoe$('learnerGroupCSN'); var tmp_learnerGroupLCB = _resultSet.getInt_61zpoe$('learnerGroupLCB'); var tmp_learnerGroupLct = _resultSet.getLong_61zpoe$('learnerGroupLct'); var _entity = new LearnerGroup(); _entity.learnerGroupUid = tmp_learnerGroupUid; _entity.learnerGroupName = tmp_learnerGroupName; _entity.learnerGroupDescription = tmp_learnerGroupDescription; _entity.learnerGroupActive = tmp_learnerGroupActive; _entity.learnerGroupMCSN = tmp_learnerGroupMCSN; _entity.learnerGroupCSN = tmp_learnerGroupCSN; _entity.learnerGroupLCB = tmp_learnerGroupLCB; _entity.learnerGroupLct = tmp_learnerGroupLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda(closure$contentEntryUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); useResults(_stmt.executeQuery(), LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda$lambda(closure$_result)); return Unit; }; } LearnerGroupDao_JdbcKt.prototype.findGroupListForEntry_s8cxhz$ = function (contentEntryUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda(contentEntryUid, _result)); return _result.v; }; LearnerGroupDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLearnerGroup_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_116($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_116.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_116.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_116.prototype.constructor = Coroutine$insertAsync_116; Coroutine$insertAsync_116.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLearnerGroup_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_116(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLearnerGroup_.insertList_4ezy5m$(entityList); }; function LearnerGroupDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.learnerGroupName); _stmt.setString_vqvrqt$(2, _entity.learnerGroupDescription); _stmt.setBoolean_fzusl$(3, _entity.learnerGroupActive); _stmt.setLong_6svq3l$(4, _entity.learnerGroupMCSN); _stmt.setLong_6svq3l$(5, _entity.learnerGroupCSN); _stmt.setInt_vux9f0$(6, _entity.learnerGroupLCB); _stmt.setLong_6svq3l$(7, _entity.learnerGroupLct); _stmt.setLong_6svq3l$(8, _entity.learnerGroupUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LearnerGroupDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LearnerGroup SET learnerGroupName = ?, learnerGroupDescription = ?, learnerGroupActive = ?, learnerGroupMCSN = ?, learnerGroupCSN = ?, learnerGroupLCB = ?, learnerGroupLct = ? WHERE learnerGroupUid = ?'; prepareAndUseStatement_0(this._db, _sql, LearnerGroupDao_JdbcKt$updateList$lambda(entityList)); }; function LearnerGroupDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.learnerGroupName); _stmt.setString_vqvrqt$(2, closure$entity.learnerGroupDescription); _stmt.setBoolean_fzusl$(3, closure$entity.learnerGroupActive); _stmt.setLong_6svq3l$(4, closure$entity.learnerGroupMCSN); _stmt.setLong_6svq3l$(5, closure$entity.learnerGroupCSN); _stmt.setInt_vux9f0$(6, closure$entity.learnerGroupLCB); _stmt.setLong_6svq3l$(7, closure$entity.learnerGroupLct); _stmt.setLong_6svq3l$(8, closure$entity.learnerGroupUid); return _stmt.executeUpdate(); }; } LearnerGroupDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LearnerGroup SET learnerGroupName = ?, learnerGroupDescription = ?, learnerGroupActive = ?, learnerGroupMCSN = ?, learnerGroupCSN = ?, learnerGroupLCB = ?, learnerGroupLct = ? WHERE learnerGroupUid = ?'; prepareAndUseStatement_0(this._db, _sql, LearnerGroupDao_JdbcKt$update$lambda(entity)); }; function LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO LearnerGroup (learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING learnerGroupUid'; } else tmp$ = ''; return "INSERT INTO LearnerGroup (learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES(COALESCE(?,nextval('LearnerGroup_learnerGroupUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.learnerGroupUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.learnerGroupUid); } stmt.setString_vqvrqt$(2, entity.learnerGroupName); stmt.setString_vqvrqt$(3, entity.learnerGroupDescription); stmt.setBoolean_fzusl$(4, entity.learnerGroupActive); stmt.setLong_6svq3l$(5, entity.learnerGroupMCSN); stmt.setLong_6svq3l$(6, entity.learnerGroupCSN); stmt.setInt_vux9f0$(7, entity.learnerGroupLCB); stmt.setLong_6svq3l$(8, entity.learnerGroupLct); }; LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LearnerGroupDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao_JdbcKt', interfaces: [LearnerGroupDao]}; function LearnerGroupDao_ReplicateWrapper(_db, _dao) { LearnerGroupDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_111($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_111.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_111.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_111.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_111; Coroutine$replicateOnNewNode_s8cxhz$_111.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_111(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_111($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_111.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_111.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_111.prototype.constructor = Coroutine$replicateOnChange_111; Coroutine$replicateOnChange_111.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_111(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_ReplicateWrapper.prototype.findGroupsForEntryAsync_s8cxhz$ = function (contentEntryUid) { return this._dao_0.findGroupsForEntryAsync_s8cxhz$(contentEntryUid); }; LearnerGroupDao_ReplicateWrapper.prototype.findGroupListForEntry_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_117($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_117.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_117.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_117.prototype.constructor = Coroutine$insertAsync_117; Coroutine$insertAsync_117.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.learnerGroupUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(301, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.learnerGroupUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.learnerGroupLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.learnerGroupUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_117(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao_ReplicateWrapper', interfaces: [LearnerGroupDao]}; function LearnerGroupDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LearnerGroupDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_112($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_112.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_112.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_112.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_112; Coroutine$replicateOnNewNode_s8cxhz$_112.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_112(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_112($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_112.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_112.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_112.prototype.constructor = Coroutine$replicateOnChange_112; Coroutine$replicateOnChange_112.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_112(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_Repo.prototype.findGroupsForEntryAsync_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.findGroupsForEntryAsync_s8cxhz$(contentEntryUid); return _result; }; LearnerGroupDao_Repo.prototype.findGroupListForEntry_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.findGroupListForEntry_s8cxhz$(contentEntryUid); return _result; }; LearnerGroupDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_118($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_118.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_118.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_118.prototype.constructor = Coroutine$insertAsync_118; Coroutine$insertAsync_118.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_118(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LearnerGroupDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LearnerGroupDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LearnerGroupDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao_Repo', interfaces: [LearnerGroupDao]}; function LearnerGroupMemberDao_JdbcKt(_db) { LearnerGroupMemberDao.call(this); this._db = _db; this._insertAdapterLearnerGroupMember_ = new LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral(this._db); } function Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_113($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_113.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_113.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_113.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_113; Coroutine$replicateOnNewNode_s8cxhz$_113.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmPk,\n | ? AS lgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = ?), 0) \n | /*psql ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmPk,\n | ? AS lgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = ?), 0) \n | ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_113(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_113($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_113.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_113.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_113.prototype.constructor = Coroutine$replicateOnChange_113; Coroutine$replicateOnChange_113.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmUid,\n | UserSession.usClientNodeId AS lgmDestination\n | FROM ChangeLog\n | JOIN LearnerGroupMember\n | ON ChangeLog.chTableId = 300\n | AND ChangeLog.chEntityPk = LearnerGroupMember.learnerGroupMemberUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmUid,\n | UserSession.usClientNodeId AS lgmDestination\n | FROM ChangeLog\n | JOIN LearnerGroupMember\n | ON ChangeLog.chTableId = 300\n | AND ChangeLog.chEntityPk = LearnerGroupMember.learnerGroupMemberUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_113(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral(this$LearnerGroupMemberDao_JdbcKt, closure$learnerGroupUid, closure$contentEntryUid) { this.this$LearnerGroupMemberDao_JdbcKt = this$LearnerGroupMemberDao_JdbcKt; this.closure$learnerGroupUid = closure$learnerGroupUid; this.closure$contentEntryUid = closure$contentEntryUid; DoorDataSourceFactory.call(this); } function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_learnerGroupMemberUid = _resultSet.getLong_61zpoe$('learnerGroupMemberUid'); var tmp_learnerGroupMemberPersonUid = _resultSet.getLong_61zpoe$('learnerGroupMemberPersonUid'); var tmp_learnerGroupMemberLgUid = _resultSet.getLong_61zpoe$('learnerGroupMemberLgUid'); var tmp_learnerGroupMemberRole = _resultSet.getInt_61zpoe$('learnerGroupMemberRole'); var tmp_learnerGroupMemberActive = _resultSet.getBoolean_61zpoe$('learnerGroupMemberActive'); var tmp_learnerGroupMemberMCSN = _resultSet.getLong_61zpoe$('learnerGroupMemberMCSN'); var tmp_learnerGroupMemberCSN = _resultSet.getLong_61zpoe$('learnerGroupMemberCSN'); var tmp_learnerGroupMemberLCB = _resultSet.getInt_61zpoe$('learnerGroupMemberLCB'); var tmp_learnerGroupMemberLct = _resultSet.getLong_61zpoe$('learnerGroupMemberLct'); var _entity = new LearnerGroupMemberWithPerson(); _entity.learnerGroupMemberUid = tmp_learnerGroupMemberUid; _entity.learnerGroupMemberPersonUid = tmp_learnerGroupMemberPersonUid; _entity.learnerGroupMemberLgUid = tmp_learnerGroupMemberLgUid; _entity.learnerGroupMemberRole = tmp_learnerGroupMemberRole; _entity.learnerGroupMemberActive = tmp_learnerGroupMemberActive; _entity.learnerGroupMemberMCSN = tmp_learnerGroupMemberMCSN; _entity.learnerGroupMemberCSN = tmp_learnerGroupMemberCSN; _entity.learnerGroupMemberLCB = tmp_learnerGroupMemberLCB; _entity.learnerGroupMemberLct = tmp_learnerGroupMemberLct; var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$learnerGroupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupMemberDao_JdbcKt = this$LearnerGroupMemberDao_JdbcKt_0; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupMemberDao_JdbcKt._db, _stmtConfig, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(this.local$closure$learnerGroupUid, this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$LearnerGroupMemberDao_JdbcKt._db, listOf(['LearnerGroupMember', 'Person', 'GroupLearningSession']), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this.this$LearnerGroupMemberDao_JdbcKt, this.closure$learnerGroupUid, this.closure$contentEntryUid, _limit, _offset)); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$learnerGroupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupMemberDao_JdbcKt = this$LearnerGroupMemberDao_JdbcKt_0; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_liveResult = void 0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupMemberDao_JdbcKt._db, _stmtConfig, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(this.local$closure$learnerGroupUid, this.local$closure$contentEntryUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$LearnerGroupMemberDao_JdbcKt._db, listOf(['LearnerGroupMember', 'Person', 'GroupLearningSession']), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this.this$LearnerGroupMemberDao_JdbcKt, this.closure$learnerGroupUid, this.closure$contentEntryUid)); }; LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; LearnerGroupMemberDao_JdbcKt.prototype.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$ = function (learnerGroupUid, contentEntryUid) { var _result = new LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral(this, learnerGroupUid, contentEntryUid); return _result; }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_learnerGroupMemberUid = _resultSet.getLong_61zpoe$('learnerGroupMemberUid'); var tmp_learnerGroupMemberPersonUid = _resultSet.getLong_61zpoe$('learnerGroupMemberPersonUid'); var tmp_learnerGroupMemberLgUid = _resultSet.getLong_61zpoe$('learnerGroupMemberLgUid'); var tmp_learnerGroupMemberRole = _resultSet.getInt_61zpoe$('learnerGroupMemberRole'); var tmp_learnerGroupMemberActive = _resultSet.getBoolean_61zpoe$('learnerGroupMemberActive'); var tmp_learnerGroupMemberMCSN = _resultSet.getLong_61zpoe$('learnerGroupMemberMCSN'); var tmp_learnerGroupMemberCSN = _resultSet.getLong_61zpoe$('learnerGroupMemberCSN'); var tmp_learnerGroupMemberLCB = _resultSet.getInt_61zpoe$('learnerGroupMemberLCB'); var tmp_learnerGroupMemberLct = _resultSet.getLong_61zpoe$('learnerGroupMemberLct'); var _entity = new LearnerGroupMemberWithPerson(); _entity.learnerGroupMemberUid = tmp_learnerGroupMemberUid; _entity.learnerGroupMemberPersonUid = tmp_learnerGroupMemberPersonUid; _entity.learnerGroupMemberLgUid = tmp_learnerGroupMemberLgUid; _entity.learnerGroupMemberRole = tmp_learnerGroupMemberRole; _entity.learnerGroupMemberActive = tmp_learnerGroupMemberActive; _entity.learnerGroupMemberMCSN = tmp_learnerGroupMemberMCSN; _entity.learnerGroupMemberCSN = tmp_learnerGroupMemberCSN; _entity.learnerGroupMemberLCB = tmp_learnerGroupMemberLCB; _entity.learnerGroupMemberLct = tmp_learnerGroupMemberLct; var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$learnerGroupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$($this, learnerGroupUid_0, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$learnerGroupUid = learnerGroupUid_0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.prototype.constructor = Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$; Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(this.local$learnerGroupUid, this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$ = function (learnerGroupUid_0, contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$(this, learnerGroupUid_0, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLearnerGroupMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_119($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_119.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_119.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_119.prototype.constructor = Coroutine$insertAsync_119; Coroutine$insertAsync_119.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLearnerGroupMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_119(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLearnerGroupMember_.insertList_4ezy5m$(entityList); }; function LearnerGroupMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.learnerGroupMemberPersonUid); _stmt.setLong_6svq3l$(2, _entity.learnerGroupMemberLgUid); _stmt.setInt_vux9f0$(3, _entity.learnerGroupMemberRole); _stmt.setBoolean_fzusl$(4, _entity.learnerGroupMemberActive); _stmt.setLong_6svq3l$(5, _entity.learnerGroupMemberMCSN); _stmt.setLong_6svq3l$(6, _entity.learnerGroupMemberCSN); _stmt.setInt_vux9f0$(7, _entity.learnerGroupMemberLCB); _stmt.setLong_6svq3l$(8, _entity.learnerGroupMemberLct); _stmt.setLong_6svq3l$(9, _entity.learnerGroupMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LearnerGroupMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LearnerGroupMember SET learnerGroupMemberPersonUid = ?, learnerGroupMemberLgUid = ?, learnerGroupMemberRole = ?, learnerGroupMemberActive = ?, learnerGroupMemberMCSN = ?, learnerGroupMemberCSN = ?, learnerGroupMemberLCB = ?, learnerGroupMemberLct = ? WHERE learnerGroupMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, LearnerGroupMemberDao_JdbcKt$updateList$lambda(entityList)); }; function LearnerGroupMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.learnerGroupMemberPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.learnerGroupMemberLgUid); _stmt.setInt_vux9f0$(3, closure$entity.learnerGroupMemberRole); _stmt.setBoolean_fzusl$(4, closure$entity.learnerGroupMemberActive); _stmt.setLong_6svq3l$(5, closure$entity.learnerGroupMemberMCSN); _stmt.setLong_6svq3l$(6, closure$entity.learnerGroupMemberCSN); _stmt.setInt_vux9f0$(7, closure$entity.learnerGroupMemberLCB); _stmt.setLong_6svq3l$(8, closure$entity.learnerGroupMemberLct); _stmt.setLong_6svq3l$(9, closure$entity.learnerGroupMemberUid); return _stmt.executeUpdate(); }; } LearnerGroupMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LearnerGroupMember SET learnerGroupMemberPersonUid = ?, learnerGroupMemberLgUid = ?, learnerGroupMemberRole = ?, learnerGroupMemberActive = ?, learnerGroupMemberMCSN = ?, learnerGroupMemberCSN = ?, learnerGroupMemberLCB = ?, learnerGroupMemberLct = ? WHERE learnerGroupMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, LearnerGroupMemberDao_JdbcKt$update$lambda(entity)); }; function LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO LearnerGroupMember (learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING learnerGroupMemberUid'; } else tmp$ = ''; return "INSERT INTO LearnerGroupMember (learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES(COALESCE(?,nextval('LearnerGroupMember_learnerGroupMemberUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.learnerGroupMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.learnerGroupMemberUid); } stmt.setLong_6svq3l$(2, entity.learnerGroupMemberPersonUid); stmt.setLong_6svq3l$(3, entity.learnerGroupMemberLgUid); stmt.setInt_vux9f0$(4, entity.learnerGroupMemberRole); stmt.setBoolean_fzusl$(5, entity.learnerGroupMemberActive); stmt.setLong_6svq3l$(6, entity.learnerGroupMemberMCSN); stmt.setLong_6svq3l$(7, entity.learnerGroupMemberCSN); stmt.setInt_vux9f0$(8, entity.learnerGroupMemberLCB); stmt.setLong_6svq3l$(9, entity.learnerGroupMemberLct); }; LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LearnerGroupMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao_JdbcKt', interfaces: [LearnerGroupMemberDao]}; function LearnerGroupMemberDao_ReplicateWrapper(_db, _dao) { LearnerGroupMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_114($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_114.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_114.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_114.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_114; Coroutine$replicateOnNewNode_s8cxhz$_114.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_114(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_114($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_114.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_114.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_114.prototype.constructor = Coroutine$replicateOnChange_114; Coroutine$replicateOnChange_114.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_114(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$ = function (learnerGroupUid, contentEntryUid) { return this._dao_0.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$(learnerGroupUid, contentEntryUid); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$ = function (learnerGroupUid, contentEntryUid, continuation) { return this._dao_0.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$(learnerGroupUid, contentEntryUid, continuation); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_120($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_120.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_120.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_120.prototype.constructor = Coroutine$insertAsync_120; Coroutine$insertAsync_120.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.learnerGroupMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(300, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.learnerGroupMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.learnerGroupMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.learnerGroupMemberUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_120(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao_ReplicateWrapper', interfaces: [LearnerGroupMemberDao]}; function LearnerGroupMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LearnerGroupMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_115($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_115.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_115.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_115.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_115; Coroutine$replicateOnNewNode_s8cxhz$_115.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_115(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_115($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_115.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_115.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_115.prototype.constructor = Coroutine$replicateOnChange_115; Coroutine$replicateOnChange_115.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_115(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_Repo.prototype.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$ = function (learnerGroupUid, contentEntryUid) { var _result = this._dao.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$(learnerGroupUid, contentEntryUid); return _result; }; function Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0($this, learnerGroupUid_0, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$learnerGroupUid = learnerGroupUid_0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0.prototype.constructor = Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0; Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$(this.local$learnerGroupUid, this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$ = function (learnerGroupUid_0, contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$_0(this, learnerGroupUid_0, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_121($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_121.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_121.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_121.prototype.constructor = Coroutine$insertAsync_121; Coroutine$insertAsync_121.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_121(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LearnerGroupMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LearnerGroupMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LearnerGroupMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao_Repo', interfaces: [LearnerGroupMemberDao]}; function LeavingReasonDao_JdbcKt(_db) { LeavingReasonDao.call(this); this._db = _db; this._insertAdapterLeavingReason_upsert = new LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral(this._db); this._insertAdapterLeavingReason_ = new LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral(this._db); } function Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_116($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_116.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_116.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_116.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_116; Coroutine$replicateOnNewNode_s8cxhz$_116.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrPk,\n | ? AS lrDestination\n | FROM LeavingReason\n | WHERE LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = ?), 0) \n | /*psql ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrPk,\n | ? AS lrDestination\n | FROM LeavingReason\n | WHERE LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = ?), 0) \n | ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_116(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda; Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_116($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_116.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_116.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_116.prototype.constructor = Coroutine$replicateOnChange_116; Coroutine$replicateOnChange_116.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrUid,\n | UserSession.usClientNodeId AS lrDestination\n | FROM ChangeLog\n | JOIN LeavingReason\n | ON ChangeLog.chTableId = 410\n | AND ChangeLog.chEntityPk = LeavingReason.leavingReasonUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrUid,\n | UserSession.usClientNodeId AS lrDestination\n | FROM ChangeLog\n | JOIN LeavingReason\n | ON ChangeLog.chTableId = 410\n | AND ChangeLog.chEntityPk = LeavingReason.leavingReasonUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LeavingReasonDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_116(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral(this$LeavingReasonDao_JdbcKt) { this.this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt; DoorDataSourceFactory.call(this); } function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_leavingReasonUid = _resultSet.getLong_61zpoe$('leavingReasonUid'); var tmp_leavingReasonTitle = _resultSet.getString_61zpoe$('leavingReasonTitle'); var tmp_leavingReasonMCSN = _resultSet.getLong_61zpoe$('leavingReasonMCSN'); var tmp_leavingReasonCSN = _resultSet.getLong_61zpoe$('leavingReasonCSN'); var tmp_leavingReasonLCB = _resultSet.getInt_61zpoe$('leavingReasonLCB'); var tmp_leavingReasonLct = _resultSet.getLong_61zpoe$('leavingReasonLct'); var _entity = new LeavingReason(); _entity.leavingReasonUid = tmp_leavingReasonUid; _entity.leavingReasonTitle = tmp_leavingReasonTitle; _entity.leavingReasonMCSN = tmp_leavingReasonMCSN; _entity.leavingReasonCSN = tmp_leavingReasonCSN; _entity.leavingReasonLCB = tmp_leavingReasonLCB; _entity.leavingReasonLct = tmp_leavingReasonLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this$LeavingReasonDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM (SELECT * FROM LeavingReason) LIMIT ? OFFSET ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT * FROM LeavingReason) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LeavingReasonDao_JdbcKt._db, _stmtConfig, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this$LeavingReasonDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this$LeavingReasonDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$LeavingReasonDao_JdbcKt._db, listOf_0('LeavingReason'), LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this.this$LeavingReasonDao_JdbcKt, _limit, _offset)); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this$LeavingReasonDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT * FROM LeavingReason) ', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT * FROM LeavingReason) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LeavingReasonDao_JdbcKt._db, _stmtConfig, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this$LeavingReasonDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this$LeavingReasonDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$LeavingReasonDao_JdbcKt._db, listOf_0('LeavingReason'), LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this.this$LeavingReasonDao_JdbcKt)); }; LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; LeavingReasonDao_JdbcKt.prototype.findAllReasons = function () { var _result = new LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral(this); return _result; }; function LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_leavingReasonUid = _resultSet.getLong_61zpoe$('leavingReasonUid'); var tmp_leavingReasonTitle = _resultSet.getString_61zpoe$('leavingReasonTitle'); var tmp_leavingReasonMCSN = _resultSet.getLong_61zpoe$('leavingReasonMCSN'); var tmp_leavingReasonCSN = _resultSet.getLong_61zpoe$('leavingReasonCSN'); var tmp_leavingReasonLCB = _resultSet.getInt_61zpoe$('leavingReasonLCB'); var tmp_leavingReasonLct = _resultSet.getLong_61zpoe$('leavingReasonLct'); var _entity = new LeavingReason(); _entity.leavingReasonUid = tmp_leavingReasonUid; _entity.leavingReasonTitle = tmp_leavingReasonTitle; _entity.leavingReasonMCSN = tmp_leavingReasonMCSN; _entity.leavingReasonCSN = tmp_leavingReasonCSN; _entity.leavingReasonLCB = tmp_leavingReasonLCB; _entity.leavingReasonLct = tmp_leavingReasonLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda$lambda(closure$_result)); return Unit; }; } LeavingReasonDao_JdbcKt.prototype.findAllReasonsLive = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LeavingReason', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LeavingReason\n |')); prepareAndUseStatement(this._db, _stmtConfig, LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda(_result)); return _result.v; }; function LeavingReasonDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_leavingReasonUid = _resultSet.getLong_61zpoe$('leavingReasonUid'); var tmp_leavingReasonTitle = _resultSet.getString_61zpoe$('leavingReasonTitle'); var tmp_leavingReasonMCSN = _resultSet.getLong_61zpoe$('leavingReasonMCSN'); var tmp_leavingReasonCSN = _resultSet.getLong_61zpoe$('leavingReasonCSN'); var tmp_leavingReasonLCB = _resultSet.getInt_61zpoe$('leavingReasonLCB'); var tmp_leavingReasonLct = _resultSet.getLong_61zpoe$('leavingReasonLct'); var _entity = new LeavingReason(); _entity.leavingReasonUid = tmp_leavingReasonUid; _entity.leavingReasonTitle = tmp_leavingReasonTitle; _entity.leavingReasonMCSN = tmp_leavingReasonMCSN; _entity.leavingReasonCSN = tmp_leavingReasonCSN; _entity.leavingReasonLCB = tmp_leavingReasonLCB; _entity.leavingReasonLct = tmp_leavingReasonLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_5($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUid_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_5.prototype.constructor = Coroutine$findByUid_5; Coroutine$findByUid_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, LeavingReason) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LeavingReason WHERE leavingReasonUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LeavingReason WHERE leavingReasonUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LeavingReasonDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_5(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LeavingReasonDao_JdbcKt$findByUidList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uidList_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$LeavingReasonDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findByUidList$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidList$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uidList_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uidList_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidList($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uidList = uidList_0; } Coroutine$findByUidList.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidList.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidList.prototype.constructor = Coroutine$findByUidList; Coroutine$findByUidList.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT leavingReasonUid FROM LeavingReason WHERE leavingReasonUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT leavingReasonUid FROM LeavingReason WHERE leavingReasonUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LeavingReasonDao_JdbcKt$findByUidList$lambda(this.$this, this.local$uidList, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.findByUidList = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$findByUidList(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_leavingReasonUid = _resultSet.getLong_61zpoe$('leavingReasonUid'); var tmp_leavingReasonTitle = _resultSet.getString_61zpoe$('leavingReasonTitle'); var tmp_leavingReasonMCSN = _resultSet.getLong_61zpoe$('leavingReasonMCSN'); var tmp_leavingReasonCSN = _resultSet.getLong_61zpoe$('leavingReasonCSN'); var tmp_leavingReasonLCB = _resultSet.getInt_61zpoe$('leavingReasonLCB'); var tmp_leavingReasonLct = _resultSet.getLong_61zpoe$('leavingReasonLct'); var _entity = new LeavingReason(); _entity.leavingReasonUid = tmp_leavingReasonUid; _entity.leavingReasonTitle = tmp_leavingReasonTitle; _entity.leavingReasonMCSN = tmp_leavingReasonMCSN; _entity.leavingReasonCSN = tmp_leavingReasonCSN; _entity.leavingReasonLCB = tmp_leavingReasonLCB; _entity.leavingReasonLct = tmp_leavingReasonLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, LeavingReason) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM LeavingReason WHERE leavingReasonUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM LeavingReason WHERE leavingReasonUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LeavingReasonDao_JdbcKt._db, _stmtConfig, LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidLive$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt.prototype.findByUidLive = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('LeavingReason'), LeavingReasonDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_uid = _resultSet.getLong_61zpoe$('uid'); var tmp_labelName = _resultSet.getString_61zpoe$('labelName'); var _entity = new UidAndLabel(); _entity.uid = tmp_uid; _entity.labelName = tmp_labelName; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uidList_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda; Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$LeavingReasonDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uidList_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uidList_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getReasonsFromUids($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uidList = uidList_0; } Coroutine$getReasonsFromUids.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getReasonsFromUids.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getReasonsFromUids.prototype.constructor = Coroutine$getReasonsFromUids; Coroutine$getReasonsFromUids.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT LeavingReason.leavingReasonUid AS uid, \n | LeavingReason.leavingReasonTitle As labelName \n | FROM LeavingReason WHERE leavingReasonUid IN (?)\n '), true, void 0, void 0, trimMargin('\n |SELECT LeavingReason.leavingReasonUid AS uid, \n | LeavingReason.leavingReasonTitle As labelName \n | FROM LeavingReason WHERE leavingReasonUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(this.$this, this.local$uidList, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.getReasonsFromUids = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$getReasonsFromUids(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceList($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList.prototype.constructor = Coroutine$replaceList; Coroutine$replaceList.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLeavingReason_upsert.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.replaceList = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda; Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.leavingReasonTitle); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.leavingReasonMCSN); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.leavingReasonCSN); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$entity.leavingReasonLCB); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.leavingReasonLct); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.leavingReasonUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_e9c2s2$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_e9c2s2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_e9c2s2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_e9c2s2$.prototype.constructor = Coroutine$updateAsync_e9c2s2$; Coroutine$updateAsync_e9c2s2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE LeavingReason SET leavingReasonTitle = ?, leavingReasonMCSN = ?, leavingReasonCSN = ?, leavingReasonLCB = ?, leavingReasonLct = ? WHERE leavingReasonUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, LeavingReasonDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.updateAsync_e9c2s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_e9c2s2$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLeavingReason_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_122($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_122.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_122.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_122.prototype.constructor = Coroutine$insertAsync_122; Coroutine$insertAsync_122.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLeavingReason_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_122(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLeavingReason_.insertList_4ezy5m$(entityList); }; function LeavingReasonDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.leavingReasonTitle); _stmt.setLong_6svq3l$(2, _entity.leavingReasonMCSN); _stmt.setLong_6svq3l$(3, _entity.leavingReasonCSN); _stmt.setInt_vux9f0$(4, _entity.leavingReasonLCB); _stmt.setLong_6svq3l$(5, _entity.leavingReasonLct); _stmt.setLong_6svq3l$(6, _entity.leavingReasonUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LeavingReasonDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LeavingReason SET leavingReasonTitle = ?, leavingReasonMCSN = ?, leavingReasonCSN = ?, leavingReasonLCB = ?, leavingReasonLct = ? WHERE leavingReasonUid = ?'; prepareAndUseStatement_0(this._db, _sql, LeavingReasonDao_JdbcKt$updateList$lambda(entityList)); }; function LeavingReasonDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.leavingReasonTitle); _stmt.setLong_6svq3l$(2, closure$entity.leavingReasonMCSN); _stmt.setLong_6svq3l$(3, closure$entity.leavingReasonCSN); _stmt.setInt_vux9f0$(4, closure$entity.leavingReasonLCB); _stmt.setLong_6svq3l$(5, closure$entity.leavingReasonLct); _stmt.setLong_6svq3l$(6, closure$entity.leavingReasonUid); return _stmt.executeUpdate(); }; } LeavingReasonDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LeavingReason SET leavingReasonTitle = ?, leavingReasonMCSN = ?, leavingReasonCSN = ?, leavingReasonLCB = ?, leavingReasonLct = ? WHERE leavingReasonUid = ?'; prepareAndUseStatement_0(this._db, _sql, LeavingReasonDao_JdbcKt$update$lambda(entity)); }; function LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO LeavingReason (leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING leavingReasonUid'; } else tmp$ = ''; return "INSERT INTO LeavingReason (leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES(COALESCE(?,nextval('LeavingReason_leavingReasonUid_seq')), ?, ?, ?, ?, ?) ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = excluded.leavingReasonTitle,leavingReasonMCSN = excluded.leavingReasonMCSN,leavingReasonCSN = excluded.leavingReasonCSN,leavingReasonLCB = excluded.leavingReasonLCB,leavingReasonLct = excluded.leavingReasonLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.leavingReasonUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.leavingReasonUid); } stmt.setString_vqvrqt$(2, entity.leavingReasonTitle); stmt.setLong_6svq3l$(3, entity.leavingReasonMCSN); stmt.setLong_6svq3l$(4, entity.leavingReasonCSN); stmt.setInt_vux9f0$(5, entity.leavingReasonLCB); stmt.setLong_6svq3l$(6, entity.leavingReasonLct); }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO LeavingReason (leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES(?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING leavingReasonUid'; } else tmp$ = ''; return "INSERT INTO LeavingReason (leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES(COALESCE(?,nextval('LeavingReason_leavingReasonUid_seq')), ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.leavingReasonUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.leavingReasonUid); } stmt.setString_vqvrqt$(2, entity.leavingReasonTitle); stmt.setLong_6svq3l$(3, entity.leavingReasonMCSN); stmt.setLong_6svq3l$(4, entity.leavingReasonCSN); stmt.setInt_vux9f0$(5, entity.leavingReasonLCB); stmt.setLong_6svq3l$(6, entity.leavingReasonLct); }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LeavingReasonDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao_JdbcKt', interfaces: [LeavingReasonDao]}; function LeavingReasonDao_ReplicateWrapper(_db, _dao) { LeavingReasonDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_117($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_117.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_117.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_117.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_117; Coroutine$replicateOnNewNode_s8cxhz$_117.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_117(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_117($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_117.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_117.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_117.prototype.constructor = Coroutine$replicateOnChange_117; Coroutine$replicateOnChange_117.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_117(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_ReplicateWrapper.prototype.findAllReasons = function () { return this._dao_0.findAllReasons(); }; LeavingReasonDao_ReplicateWrapper.prototype.findAllReasonsLive = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.prototype.findByUid = function (uid, continuation) { return this._dao_0.findByUid(uid, continuation); }; LeavingReasonDao_ReplicateWrapper.prototype.findByUidList = function (uidList, continuation) { return this._dao_0.findByUidList(uidList, continuation); }; LeavingReasonDao_ReplicateWrapper.prototype.findByUidLive = function (uid) { return this._dao_0.findByUidLive(uid); }; LeavingReasonDao_ReplicateWrapper.prototype.getReasonsFromUids = function (uidList, continuation) { return this._dao_0.getReasonsFromUids(uidList, continuation); }; function Coroutine$replaceList_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$replaceList_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_0.prototype.constructor = Coroutine$replaceList_0; Coroutine$replaceList_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.leavingReasonUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(410, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.leavingReasonUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.leavingReasonLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceList(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.replaceList = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_ReplicateWrapper.prototype.updateAsync_e9c2s2$ = function (entity, continuation) { entity.leavingReasonLct = systemTimeInMillis(); return this._dao_0.updateAsync_e9c2s2$(entity, continuation); }; LeavingReasonDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_123($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_123.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_123.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_123.prototype.constructor = Coroutine$insertAsync_123; Coroutine$insertAsync_123.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.leavingReasonUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(410, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.leavingReasonUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.leavingReasonLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.leavingReasonUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_123(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao_ReplicateWrapper', interfaces: [LeavingReasonDao]}; function LeavingReasonDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LeavingReasonDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_118($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_118.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_118.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_118.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_118; Coroutine$replicateOnNewNode_s8cxhz$_118.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_118(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_118($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_118.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_118.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_118.prototype.constructor = Coroutine$replicateOnChange_118; Coroutine$replicateOnChange_118.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_118(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.findAllReasons = function () { var _result = this._dao.findAllReasons(); return _result; }; LeavingReasonDao_Repo.prototype.findAllReasonsLive = function () { var _result = this._dao.findAllReasonsLive(); return _result; }; function Coroutine$findByUid_6($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_6.prototype.constructor = Coroutine$findByUid_6; Coroutine$findByUid_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.findByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_6(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidList_0($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$findByUidList_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidList_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidList_0.prototype.constructor = Coroutine$findByUidList_0; Coroutine$findByUidList_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidList(this.local$uidList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.findByUidList = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$findByUidList_0(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.findByUidLive = function (uid) { var _result = this._dao.findByUidLive(uid); return _result; }; function Coroutine$getReasonsFromUids_0($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$getReasonsFromUids_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getReasonsFromUids_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getReasonsFromUids_0.prototype.constructor = Coroutine$getReasonsFromUids_0; Coroutine$getReasonsFromUids_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getReasonsFromUids(this.local$uidList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.getReasonsFromUids = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$getReasonsFromUids_0(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceList_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_1.prototype.constructor = Coroutine$replaceList_1; Coroutine$replaceList_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceList(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.replaceList = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_e9c2s2$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_e9c2s2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_e9c2s2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_e9c2s2$_0.prototype.constructor = Coroutine$updateAsync_e9c2s2$_0; Coroutine$updateAsync_e9c2s2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_e9c2s2$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.updateAsync_e9c2s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_e9c2s2$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_124($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_124.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_124.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_124.prototype.constructor = Coroutine$insertAsync_124; Coroutine$insertAsync_124.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_124(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LeavingReasonDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LeavingReasonDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LeavingReasonDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao_Repo', interfaces: [LeavingReasonDao]}; function LocallyAvailableContainerDao_JdbcKt(_db) { LocallyAvailableContainerDao.call(this); this._db = _db; this._insertAdapterLocallyAvailableContainer_upsert = new LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral(this._db); } function Coroutine$insertList_s1s25j$($this, locallyAvailableContainers_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$locallyAvailableContainers = locallyAvailableContainers_0; } Coroutine$insertList_s1s25j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertList_s1s25j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertList_s1s25j$.prototype.constructor = Coroutine$insertList_s1s25j$; Coroutine$insertList_s1s25j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLocallyAvailableContainer_upsert.insertListAsync_4ezy5m$(this.local$locallyAvailableContainers, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LocallyAvailableContainerDao_JdbcKt.prototype.insertList_s1s25j$ = function (locallyAvailableContainers_0, continuation_0, suspended) { var instance = new Coroutine$insertList_s1s25j$(this, locallyAvailableContainers_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(closure$locallyAvailableContainers_0, closure$_numChanges_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$locallyAvailableContainers = closure$locallyAvailableContainers_0; this.local$closure$_numChanges = closure$_numChanges_0; this.local$tmp$ = void 0; this.local$tmp$_0 = void 0; this.local$_stmt = _stmt_0; } Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.prototype.constructor = Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda; Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$locallyAvailableContainers.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.laContainerUid); this.local$tmp$_0 = this.local$closure$_numChanges.v; this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.local$closure$_numChanges.v = this.local$tmp$_0 + this.result_0 | 0; this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(closure$locallyAvailableContainers_0, closure$_numChanges_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(closure$locallyAvailableContainers_0, closure$_numChanges_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteList_s1s25j$($this, locallyAvailableContainers_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$locallyAvailableContainers = locallyAvailableContainers_0; } Coroutine$deleteList_s1s25j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteList_s1s25j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteList_s1s25j$.prototype.constructor = Coroutine$deleteList_s1s25j$; Coroutine$deleteList_s1s25j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _numChanges = {v: 0}; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, 'DELETE FROM LocallyAvailableContainer WHERE laContainerUid = ?', LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(this.local$locallyAvailableContainers, _numChanges), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LocallyAvailableContainerDao_JdbcKt.prototype.deleteList_s1s25j$ = function (locallyAvailableContainers_0, continuation_0, suspended) { var instance = new Coroutine$deleteList_s1s25j$(this, locallyAvailableContainers_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LocallyAvailableContainerDao_JdbcKt$deleteAll$lambda(_stmt) { var _numUpdates = _stmt.executeUpdate(); return Unit; } LocallyAvailableContainerDao_JdbcKt.prototype.deleteAll = function () { var _stmtConfig = new PreparedStatementConfig('DELETE FROM LocallyAvailableContainer', void 0, void 0, void 0, trimMargin('\n |DELETE FROM LocallyAvailableContainer\n |')); prepareAndUseStatement(this._db, _stmtConfig, LocallyAvailableContainerDao_JdbcKt$deleteAll$lambda); }; function LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO LocallyAvailableContainer (laContainerUid) VALUES(?)'; case 2: if (returnsId) { tmp$ = ' RETURNING laContainerUid'; } else tmp$ = ''; return 'INSERT INTO LocallyAvailableContainer (laContainerUid) VALUES(?) ON CONFLICT (laContainerUid) DO UPDATE SET ' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.laContainerUid); }; LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LocallyAvailableContainerDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LocallyAvailableContainerDao_JdbcKt', interfaces: [LocallyAvailableContainerDao]}; function MessageDao_JdbcKt(_db) { MessageDao.call(this); this._db = _db; this._insertAdapterMessage_ = new MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral(this._db); } function Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda; Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeChats_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$; Coroutine$replicateOnNewNodeChats_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda; Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodePosts_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePosts_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePosts_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePosts_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodePosts_s8cxhz$; Coroutine$replicateOnNewNodePosts_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | \n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN Message \n | ON Message.messageTableId = 132\n | AND Message.messageClazzUid = Clazz.clazzUid\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | \n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN Message \n | ON Message.messageTableId = 132\n | AND Message.messageClazzUid = Clazz.clazzUid\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnNewNodePosts_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePosts_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda; Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnChangeChat$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeChat($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeChat.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeChat.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeChat.prototype.constructor = Coroutine$replicateOnChangeChat; Coroutine$replicateOnChangeChat.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 127\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Message.messageEntityUid))\n | OR UserSession.usSessionType = 2) \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 127\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Message.messageEntityUid))\n | OR UserSession.usSessionType = 2) \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, MessageDao_JdbcKt$replicateOnChangeChat$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnChangeChat = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeChat(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda; Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnChangePosts$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangePosts($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePosts.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePosts.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePosts.prototype.constructor = Coroutine$replicateOnChangePosts; Coroutine$replicateOnChangePosts.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | \n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 132\n | \n | JOIN Clazz\n | ON Clazz.clazzUid = Message.messageClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | \n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 132\n | \n | JOIN Clazz\n | ON Clazz.clazzUid = Message.messageClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, MessageDao_JdbcKt$replicateOnChangePosts$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnChangePosts = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePosts(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral(this$MessageDao_JdbcKt, closure$loggedInPersonUid, closure$tableId, closure$entityUid) { this.this$MessageDao_JdbcKt = this$MessageDao_JdbcKt; this.closure$loggedInPersonUid = closure$loggedInPersonUid; this.closure$tableId = closure$tableId; this.closure$entityUid = closure$entityUid; DoorDataSourceFactory.call(this); } function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_messageUid = _resultSet.getLong_61zpoe$('messageUid'); var tmp_messageSenderPersonUid = _resultSet.getLong_61zpoe$('messageSenderPersonUid'); var tmp_messageTableId = _resultSet.getInt_61zpoe$('messageTableId'); var tmp_messageEntityUid = _resultSet.getLong_61zpoe$('messageEntityUid'); var tmp_messageText = _resultSet.getString_61zpoe$('messageText'); var tmp_messageTimestamp = _resultSet.getLong_61zpoe$('messageTimestamp'); var tmp_messageClazzUid = _resultSet.getLong_61zpoe$('messageClazzUid'); var tmp_messageLct = _resultSet.getLong_61zpoe$('messageLct'); var _entity = new MessageWithPerson(); _entity.messageUid = tmp_messageUid; _entity.messageSenderPersonUid = tmp_messageSenderPersonUid; _entity.messageTableId = tmp_messageTableId; _entity.messageEntityUid = tmp_messageEntityUid; _entity.messageText = tmp_messageText; _entity.messageTimestamp = tmp_messageTimestamp; _entity.messageClazzUid = tmp_messageClazzUid; _entity.messageLct = tmp_messageLct; var _messagePerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _messagePerson_nullFieldCount = _messagePerson_nullFieldCount + 1 | 0; }if (_messagePerson_nullFieldCount < 24) { if (_entity.messagePerson == null) { _entity.messagePerson = new Person(); }ensureNotNull(_entity.messagePerson).personUid = tmp_personUid; ensureNotNull(_entity.messagePerson).username = tmp_username; ensureNotNull(_entity.messagePerson).firstNames = tmp_firstNames; ensureNotNull(_entity.messagePerson).lastName = tmp_lastName; ensureNotNull(_entity.messagePerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.messagePerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.messagePerson).gender = tmp_gender; ensureNotNull(_entity.messagePerson).active = tmp_active; ensureNotNull(_entity.messagePerson).admin = tmp_admin; ensureNotNull(_entity.messagePerson).personNotes = tmp_personNotes; ensureNotNull(_entity.messagePerson).fatherName = tmp_fatherName; ensureNotNull(_entity.messagePerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.messagePerson).motherName = tmp_motherName; ensureNotNull(_entity.messagePerson).motherNum = tmp_motherNum; ensureNotNull(_entity.messagePerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.messagePerson).personAddress = tmp_personAddress; ensureNotNull(_entity.messagePerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.messagePerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.messagePerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.messagePerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.messagePerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.messagePerson).personLct = tmp_personLct; ensureNotNull(_entity.messagePerson).personCountry = tmp_personCountry; ensureNotNull(_entity.messagePerson).personType = tmp_personType; }var _messageRead_nullFieldCount = 0; var tmp_messageReadUid = _resultSet.getLong_61zpoe$('messageReadUid'); if (_resultSet.wasNull()) { _messageRead_nullFieldCount = _messageRead_nullFieldCount + 1 | 0; }var tmp_messageReadPersonUid = _resultSet.getLong_61zpoe$('messageReadPersonUid'); if (_resultSet.wasNull()) { _messageRead_nullFieldCount = _messageRead_nullFieldCount + 1 | 0; }var tmp_messageReadMessageUid = _resultSet.getLong_61zpoe$('messageReadMessageUid'); if (_resultSet.wasNull()) { _messageRead_nullFieldCount = _messageRead_nullFieldCount + 1 | 0; }var tmp_messageReadEntityUid = _resultSet.getLong_61zpoe$('messageReadEntityUid'); if (_resultSet.wasNull()) { _messageRead_nullFieldCount = _messageRead_nullFieldCount + 1 | 0; }var tmp_messageReadLct = _resultSet.getLong_61zpoe$('messageReadLct'); if (_resultSet.wasNull()) { _messageRead_nullFieldCount = _messageRead_nullFieldCount + 1 | 0; }if (_messageRead_nullFieldCount < 5) { if (_entity.messageRead == null) { _entity.messageRead = new MessageRead(); }ensureNotNull(_entity.messageRead).messageReadUid = tmp_messageReadUid; ensureNotNull(_entity.messageRead).messageReadPersonUid = tmp_messageReadPersonUid; ensureNotNull(_entity.messageRead).messageReadMessageUid = tmp_messageReadMessageUid; ensureNotNull(_entity.messageRead).messageReadEntityUid = tmp_messageReadEntityUid; ensureNotNull(_entity.messageRead).messageReadLct = tmp_messageReadLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$loggedInPersonUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entityUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$MessageDao_JdbcKt = this$MessageDao_JdbcKt_0; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT\n | Message.*,\n | Person.*,\n | MessageRead.*\n | FROM Message\n | LEFT JOIN Person\n | ON Message.messageSenderPersonUid = Person.personUid\n | LEFT JOIN MessageRead\n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | AND MessageRead.messageReadPersonUid = ?\n | WHERE Message.messageTableId = ?\n | AND Message.messageEntityUid = ?\n | ORDER BY Message.messageTimestamp DESC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT\n | Message.*,\n | Person.*,\n | MessageRead.*\n | FROM Message\n | LEFT JOIN Person\n | ON Message.messageSenderPersonUid = Person.personUid\n | LEFT JOIN MessageRead\n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | AND MessageRead.messageReadPersonUid = ?\n | WHERE Message.messageTableId = ?\n | AND Message.messageEntityUid = ?\n | ORDER BY Message.messageTimestamp DESC\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$MessageDao_JdbcKt._db, _stmtConfig, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$loggedInPersonUid, this.local$closure$tableId, this.local$closure$entityUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$MessageDao_JdbcKt._db, listOf(['Message', 'Person', 'MessageRead']), MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this.this$MessageDao_JdbcKt, this.closure$loggedInPersonUid, this.closure$tableId, this.closure$entityUid, _limit, _offset)); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$loggedInPersonUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$MessageDao_JdbcKt = this$MessageDao_JdbcKt_0; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_liveResult = void 0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT\n | Message.*,\n | Person.*,\n | MessageRead.*\n | FROM Message\n | LEFT JOIN Person\n | ON Message.messageSenderPersonUid = Person.personUid\n | LEFT JOIN MessageRead\n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | AND MessageRead.messageReadPersonUid = ?\n | WHERE Message.messageTableId = ?\n | AND Message.messageEntityUid = ?\n | ORDER BY Message.messageTimestamp DESC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT\n | Message.*,\n | Person.*,\n | MessageRead.*\n | FROM Message\n | LEFT JOIN Person\n | ON Message.messageSenderPersonUid = Person.personUid\n | LEFT JOIN MessageRead\n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | AND MessageRead.messageReadPersonUid = ?\n | WHERE Message.messageTableId = ?\n | AND Message.messageEntityUid = ?\n | ORDER BY Message.messageTimestamp DESC\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$MessageDao_JdbcKt._db, _stmtConfig, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$loggedInPersonUid, this.local$closure$tableId, this.local$closure$entityUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$MessageDao_JdbcKt._db, listOf(['Message', 'Person', 'MessageRead']), MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this.this$MessageDao_JdbcKt, this.closure$loggedInPersonUid, this.closure$tableId, this.closure$entityUid)); }; MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; MessageDao_JdbcKt.prototype.findAllMessagesByChatUid_ro19vi$ = function (entityUid, tableId, loggedInPersonUid) { var _result = new MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral(this, loggedInPersonUid, tableId, entityUid); return _result; }; MessageDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterMessage_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_125($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_125.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_125.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_125.prototype.constructor = Coroutine$insertAsync_125; Coroutine$insertAsync_125.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterMessage_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_125(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterMessage_.insertList_4ezy5m$(entityList); }; function MessageDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.messageSenderPersonUid); _stmt.setInt_vux9f0$(2, _entity.messageTableId); _stmt.setLong_6svq3l$(3, _entity.messageEntityUid); _stmt.setString_vqvrqt$(4, _entity.messageText); _stmt.setLong_6svq3l$(5, _entity.messageTimestamp); _stmt.setLong_6svq3l$(6, _entity.messageClazzUid); _stmt.setLong_6svq3l$(7, _entity.messageLct); _stmt.setLong_6svq3l$(8, _entity.messageUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } MessageDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Message SET messageSenderPersonUid = ?, messageTableId = ?, messageEntityUid = ?, messageText = ?, messageTimestamp = ?, messageClazzUid = ?, messageLct = ? WHERE messageUid = ?'; prepareAndUseStatement_0(this._db, _sql, MessageDao_JdbcKt$updateList$lambda(entityList)); }; function MessageDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.messageSenderPersonUid); _stmt.setInt_vux9f0$(2, closure$entity.messageTableId); _stmt.setLong_6svq3l$(3, closure$entity.messageEntityUid); _stmt.setString_vqvrqt$(4, closure$entity.messageText); _stmt.setLong_6svq3l$(5, closure$entity.messageTimestamp); _stmt.setLong_6svq3l$(6, closure$entity.messageClazzUid); _stmt.setLong_6svq3l$(7, closure$entity.messageLct); _stmt.setLong_6svq3l$(8, closure$entity.messageUid); return _stmt.executeUpdate(); }; } MessageDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Message SET messageSenderPersonUid = ?, messageTableId = ?, messageEntityUid = ?, messageText = ?, messageTimestamp = ?, messageClazzUid = ?, messageLct = ? WHERE messageUid = ?'; prepareAndUseStatement_0(this._db, _sql, MessageDao_JdbcKt$update$lambda(entity)); }; function MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Message (messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING messageUid'; } else tmp$ = ''; return "INSERT INTO Message (messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(COALESCE(?,nextval('Message_messageUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.messageUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.messageUid); } stmt.setLong_6svq3l$(2, entity.messageSenderPersonUid); stmt.setInt_vux9f0$(3, entity.messageTableId); stmt.setLong_6svq3l$(4, entity.messageEntityUid); stmt.setString_vqvrqt$(5, entity.messageText); stmt.setLong_6svq3l$(6, entity.messageTimestamp); stmt.setLong_6svq3l$(7, entity.messageClazzUid); stmt.setLong_6svq3l$(8, entity.messageLct); }; MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; MessageDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao_JdbcKt', interfaces: [MessageDao]}; function MessageDao_ReplicateWrapper(_db, _dao) { MessageDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_0; Coroutine$replicateOnNewNodeChats_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePosts_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePosts_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePosts_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePosts_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodePosts_s8cxhz$_0; Coroutine$replicateOnNewNodePosts_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodePosts_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnNewNodePosts_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePosts_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeChat_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeChat_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeChat_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeChat_0.prototype.constructor = Coroutine$replicateOnChangeChat_0; Coroutine$replicateOnChangeChat_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeChat(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnChangeChat = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeChat_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePosts_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePosts_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePosts_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePosts_0.prototype.constructor = Coroutine$replicateOnChangePosts_0; Coroutine$replicateOnChangePosts_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangePosts(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnChangePosts = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePosts_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_ReplicateWrapper.prototype.findAllMessagesByChatUid_ro19vi$ = function (entityUid, tableId, loggedInPersonUid) { return this._dao_0.findAllMessagesByChatUid_ro19vi$(entityUid, tableId, loggedInPersonUid); }; MessageDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_126($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_126.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_126.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_126.prototype.constructor = Coroutine$insertAsync_126; Coroutine$insertAsync_126.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.messageUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(126, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.messageUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.messageLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.messageUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_126(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao_ReplicateWrapper', interfaces: [MessageDao]}; function MessageDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { MessageDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_1; Coroutine$replicateOnNewNodeChats_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePosts_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePosts_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePosts_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePosts_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodePosts_s8cxhz$_1; Coroutine$replicateOnNewNodePosts_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodePosts_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnNewNodePosts_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePosts_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeChat_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeChat_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeChat_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeChat_1.prototype.constructor = Coroutine$replicateOnChangeChat_1; Coroutine$replicateOnChangeChat_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeChat(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnChangeChat = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeChat_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePosts_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePosts_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePosts_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePosts_1.prototype.constructor = Coroutine$replicateOnChangePosts_1; Coroutine$replicateOnChangePosts_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangePosts(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnChangePosts = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePosts_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_Repo.prototype.findAllMessagesByChatUid_ro19vi$ = function (entityUid, tableId, loggedInPersonUid) { var _result = this._dao.findAllMessagesByChatUid_ro19vi$(entityUid, tableId, loggedInPersonUid); return _result; }; MessageDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_127($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_127.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_127.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_127.prototype.constructor = Coroutine$insertAsync_127; Coroutine$insertAsync_127.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_127(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; MessageDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; MessageDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; MessageDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao_Repo', interfaces: [MessageDao]}; function MessageReadDao_JdbcKt(_db) { MessageReadDao.call(this); this._db = _db; this._insertAdapterMessageRead_ = new MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral(this._db); } function Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.constructor = Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda; Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_2; Coroutine$replicateOnNewNodeChats_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadPk,\n | ? AS messageReadDestination\n | FROM UserSession \n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = ?), 0) \n | /*psql ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadPk,\n | ? AS messageReadDestination\n | FROM UserSession \n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = ?), 0) \n | ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_JdbcKt.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda; Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageReadDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_119($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_119.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_119.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_119.prototype.constructor = Coroutine$replicateOnChange_119; Coroutine$replicateOnChange_119.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadUid,\n | UserSession.usClientNodeId AS messageReadDestination\n | FROM ChangeLog\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadUid = ChangeLog.chEntityPk\n | AND ChangeLog.chTableId = 129\n | \n |\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = MessageRead.messageReadEntityUid))\n | OR UserSession.usSessionType = 2)\n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadUid,\n | UserSession.usClientNodeId AS messageReadDestination\n | FROM ChangeLog\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadUid = ChangeLog.chEntityPk\n | AND ChangeLog.chTableId = 129\n | \n |\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = MessageRead.messageReadEntityUid))\n | OR UserSession.usSessionType = 2)\n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, MessageReadDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_119(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterMessageRead_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_128($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_128.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_128.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_128.prototype.constructor = Coroutine$insertAsync_128; Coroutine$insertAsync_128.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterMessageRead_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_128(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterMessageRead_.insertList_4ezy5m$(entityList); }; function MessageReadDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.messageReadPersonUid); _stmt.setLong_6svq3l$(2, _entity.messageReadMessageUid); _stmt.setLong_6svq3l$(3, _entity.messageReadEntityUid); _stmt.setLong_6svq3l$(4, _entity.messageReadLct); _stmt.setLong_6svq3l$(5, _entity.messageReadUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } MessageReadDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE MessageRead SET messageReadPersonUid = ?, messageReadMessageUid = ?, messageReadEntityUid = ?, messageReadLct = ? WHERE messageReadUid = ?'; prepareAndUseStatement_0(this._db, _sql, MessageReadDao_JdbcKt$updateList$lambda(entityList)); }; function MessageReadDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.messageReadPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.messageReadMessageUid); _stmt.setLong_6svq3l$(3, closure$entity.messageReadEntityUid); _stmt.setLong_6svq3l$(4, closure$entity.messageReadLct); _stmt.setLong_6svq3l$(5, closure$entity.messageReadUid); return _stmt.executeUpdate(); }; } MessageReadDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE MessageRead SET messageReadPersonUid = ?, messageReadMessageUid = ?, messageReadEntityUid = ?, messageReadLct = ? WHERE messageReadUid = ?'; prepareAndUseStatement_0(this._db, _sql, MessageReadDao_JdbcKt$update$lambda(entity)); }; function MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO MessageRead (messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING messageReadUid'; } else tmp$ = ''; return "INSERT INTO MessageRead (messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(COALESCE(?,nextval('MessageRead_messageReadUid_seq')), ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.messageReadUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.messageReadUid); } stmt.setLong_6svq3l$(2, entity.messageReadPersonUid); stmt.setLong_6svq3l$(3, entity.messageReadMessageUid); stmt.setLong_6svq3l$(4, entity.messageReadEntityUid); stmt.setLong_6svq3l$(5, entity.messageReadLct); }; MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; MessageReadDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao_JdbcKt', interfaces: [MessageReadDao]}; function MessageReadDao_ReplicateWrapper(_db, _dao) { MessageReadDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_3; Coroutine$replicateOnNewNodeChats_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_ReplicateWrapper.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_120($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_120.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_120.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_120.prototype.constructor = Coroutine$replicateOnChange_120; Coroutine$replicateOnChange_120.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_120(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_129($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_129.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_129.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_129.prototype.constructor = Coroutine$insertAsync_129; Coroutine$insertAsync_129.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.messageReadUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(129, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.messageReadUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.messageReadLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.messageReadUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_129(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageReadDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageReadDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageReadDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao_ReplicateWrapper', interfaces: [MessageReadDao]}; function MessageReadDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { MessageReadDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_4; Coroutine$replicateOnNewNodeChats_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_Repo.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_121($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_121.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_121.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_121.prototype.constructor = Coroutine$replicateOnChange_121; Coroutine$replicateOnChange_121.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_121(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_130($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_130.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_130.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_130.prototype.constructor = Coroutine$insertAsync_130; Coroutine$insertAsync_130.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_130(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; MessageReadDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; MessageReadDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; MessageReadDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao_Repo', interfaces: [MessageReadDao]}; function NetworkNodeDao_JdbcKt(_db) { NetworkNodeDao.call(this); this._db = _db; this._insertAdapterNetworkNode_upsert = new NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral(this._db); } function NetworkNodeDao_JdbcKt$all$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_nodeId = _resultSet.getLong_61zpoe$('nodeId'); var tmp_bluetoothMacAddress = _resultSet.getString_61zpoe$('bluetoothMacAddress'); var tmp_ipAddress = _resultSet.getString_61zpoe$('ipAddress'); var tmp_wifiDirectMacAddress = _resultSet.getString_61zpoe$('wifiDirectMacAddress'); var tmp_deviceWifiDirectName = _resultSet.getString_61zpoe$('deviceWifiDirectName'); var tmp_endpointUrl = _resultSet.getString_61zpoe$('endpointUrl'); var tmp_lastUpdateTimeStamp = _resultSet.getLong_61zpoe$('lastUpdateTimeStamp'); var tmp_networkServiceLastUpdated = _resultSet.getLong_61zpoe$('networkServiceLastUpdated'); var tmp_nsdServiceName = _resultSet.getString_61zpoe$('nsdServiceName'); var tmp_port = _resultSet.getInt_61zpoe$('port'); var tmp_numFailureCount = _resultSet.getInt_61zpoe$('numFailureCount'); var tmp_wifiDirectDeviceStatus = _resultSet.getInt_61zpoe$('wifiDirectDeviceStatus'); var tmp_groupSsid = _resultSet.getString_61zpoe$('groupSsid'); var _entity = new NetworkNode(); _entity.nodeId = tmp_nodeId; _entity.bluetoothMacAddress = tmp_bluetoothMacAddress; _entity.ipAddress = tmp_ipAddress; _entity.wifiDirectMacAddress = tmp_wifiDirectMacAddress; _entity.deviceWifiDirectName = tmp_deviceWifiDirectName; _entity.endpointUrl = tmp_endpointUrl; _entity.lastUpdateTimeStamp = tmp_lastUpdateTimeStamp; _entity.networkServiceLastUpdated = tmp_networkServiceLastUpdated; _entity.nsdServiceName = tmp_nsdServiceName; _entity.port = tmp_port; _entity.numFailureCount = tmp_numFailureCount; _entity.wifiDirectDeviceStatus = tmp_wifiDirectDeviceStatus; _entity.groupSsid = tmp_groupSsid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function NetworkNodeDao_JdbcKt$all$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$all$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.all = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM NetworkNode', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM NetworkNode\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$all$lambda(_result)); return _result.v; }; function NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_nodeId = _resultSet.getLong_61zpoe$('nodeId'); var tmp_bluetoothMacAddress = _resultSet.getString_61zpoe$('bluetoothMacAddress'); var tmp_ipAddress = _resultSet.getString_61zpoe$('ipAddress'); var tmp_wifiDirectMacAddress = _resultSet.getString_61zpoe$('wifiDirectMacAddress'); var tmp_deviceWifiDirectName = _resultSet.getString_61zpoe$('deviceWifiDirectName'); var tmp_endpointUrl = _resultSet.getString_61zpoe$('endpointUrl'); var tmp_lastUpdateTimeStamp = _resultSet.getLong_61zpoe$('lastUpdateTimeStamp'); var tmp_networkServiceLastUpdated = _resultSet.getLong_61zpoe$('networkServiceLastUpdated'); var tmp_nsdServiceName = _resultSet.getString_61zpoe$('nsdServiceName'); var tmp_port = _resultSet.getInt_61zpoe$('port'); var tmp_numFailureCount = _resultSet.getInt_61zpoe$('numFailureCount'); var tmp_wifiDirectDeviceStatus = _resultSet.getInt_61zpoe$('wifiDirectDeviceStatus'); var tmp_groupSsid = _resultSet.getString_61zpoe$('groupSsid'); var _entity = new NetworkNode(); _entity.nodeId = tmp_nodeId; _entity.bluetoothMacAddress = tmp_bluetoothMacAddress; _entity.ipAddress = tmp_ipAddress; _entity.wifiDirectMacAddress = tmp_wifiDirectMacAddress; _entity.deviceWifiDirectName = tmp_deviceWifiDirectName; _entity.endpointUrl = tmp_endpointUrl; _entity.lastUpdateTimeStamp = tmp_lastUpdateTimeStamp; _entity.networkServiceLastUpdated = tmp_networkServiceLastUpdated; _entity.nsdServiceName = tmp_nsdServiceName; _entity.port = tmp_port; _entity.numFailureCount = tmp_numFailureCount; _entity.wifiDirectDeviceStatus = tmp_wifiDirectDeviceStatus; _entity.groupSsid = tmp_groupSsid; closure$_result.v = _entity; }return Unit; }; } function NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda(closure$ipAddress, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$ipAddress); useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.findNodeByIpAddress_61zpoe$ = function (ipAddress) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, NetworkNode) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From NetworkNode WHERE ipAddress = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * From NetworkNode WHERE ipAddress = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda(ipAddress, _result)); return _result.v; }; function NetworkNodeDao_JdbcKt$findNodeById$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_nodeId = _resultSet.getLong_61zpoe$('nodeId'); var tmp_bluetoothMacAddress = _resultSet.getString_61zpoe$('bluetoothMacAddress'); var tmp_ipAddress = _resultSet.getString_61zpoe$('ipAddress'); var tmp_wifiDirectMacAddress = _resultSet.getString_61zpoe$('wifiDirectMacAddress'); var tmp_deviceWifiDirectName = _resultSet.getString_61zpoe$('deviceWifiDirectName'); var tmp_endpointUrl = _resultSet.getString_61zpoe$('endpointUrl'); var tmp_lastUpdateTimeStamp = _resultSet.getLong_61zpoe$('lastUpdateTimeStamp'); var tmp_networkServiceLastUpdated = _resultSet.getLong_61zpoe$('networkServiceLastUpdated'); var tmp_nsdServiceName = _resultSet.getString_61zpoe$('nsdServiceName'); var tmp_port = _resultSet.getInt_61zpoe$('port'); var tmp_numFailureCount = _resultSet.getInt_61zpoe$('numFailureCount'); var tmp_wifiDirectDeviceStatus = _resultSet.getInt_61zpoe$('wifiDirectDeviceStatus'); var tmp_groupSsid = _resultSet.getString_61zpoe$('groupSsid'); var _entity = new NetworkNode(); _entity.nodeId = tmp_nodeId; _entity.bluetoothMacAddress = tmp_bluetoothMacAddress; _entity.ipAddress = tmp_ipAddress; _entity.wifiDirectMacAddress = tmp_wifiDirectMacAddress; _entity.deviceWifiDirectName = tmp_deviceWifiDirectName; _entity.endpointUrl = tmp_endpointUrl; _entity.lastUpdateTimeStamp = tmp_lastUpdateTimeStamp; _entity.networkServiceLastUpdated = tmp_networkServiceLastUpdated; _entity.nsdServiceName = tmp_nsdServiceName; _entity.port = tmp_port; _entity.numFailureCount = tmp_numFailureCount; _entity.wifiDirectDeviceStatus = tmp_wifiDirectDeviceStatus; _entity.groupSsid = tmp_groupSsid; closure$_result.v = _entity; }return Unit; }; } function NetworkNodeDao_JdbcKt$findNodeById$lambda(closure$nodeId, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$nodeId); useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeById$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.findNodeById_s8cxhz$ = function (nodeId) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, NetworkNode) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From NetworkNode WHERE nodeId = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * From NetworkNode WHERE nodeId = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$findNodeById$lambda(nodeId, _result)); return _result.v; }; function NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_nodeId = _resultSet.getLong_61zpoe$('nodeId'); var tmp_bluetoothMacAddress = _resultSet.getString_61zpoe$('bluetoothMacAddress'); var tmp_ipAddress = _resultSet.getString_61zpoe$('ipAddress'); var tmp_wifiDirectMacAddress = _resultSet.getString_61zpoe$('wifiDirectMacAddress'); var tmp_deviceWifiDirectName = _resultSet.getString_61zpoe$('deviceWifiDirectName'); var tmp_endpointUrl = _resultSet.getString_61zpoe$('endpointUrl'); var tmp_lastUpdateTimeStamp = _resultSet.getLong_61zpoe$('lastUpdateTimeStamp'); var tmp_networkServiceLastUpdated = _resultSet.getLong_61zpoe$('networkServiceLastUpdated'); var tmp_nsdServiceName = _resultSet.getString_61zpoe$('nsdServiceName'); var tmp_port = _resultSet.getInt_61zpoe$('port'); var tmp_numFailureCount = _resultSet.getInt_61zpoe$('numFailureCount'); var tmp_wifiDirectDeviceStatus = _resultSet.getInt_61zpoe$('wifiDirectDeviceStatus'); var tmp_groupSsid = _resultSet.getString_61zpoe$('groupSsid'); var _entity = new NetworkNode(); _entity.nodeId = tmp_nodeId; _entity.bluetoothMacAddress = tmp_bluetoothMacAddress; _entity.ipAddress = tmp_ipAddress; _entity.wifiDirectMacAddress = tmp_wifiDirectMacAddress; _entity.deviceWifiDirectName = tmp_deviceWifiDirectName; _entity.endpointUrl = tmp_endpointUrl; _entity.lastUpdateTimeStamp = tmp_lastUpdateTimeStamp; _entity.networkServiceLastUpdated = tmp_networkServiceLastUpdated; _entity.nsdServiceName = tmp_nsdServiceName; _entity.port = tmp_port; _entity.numFailureCount = tmp_numFailureCount; _entity.wifiDirectDeviceStatus = tmp_wifiDirectDeviceStatus; _entity.groupSsid = tmp_groupSsid; closure$_result.v = _entity; }return Unit; }; } function NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda(closure$ipAddress, closure$wifiDirectMacAddress, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$ipAddress); _stmt.setString_vqvrqt$(2, closure$wifiDirectMacAddress); useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.findNodeByIpOrWifiDirectMacAddress_puj7f4$ = function (ipAddress, wifiDirectMacAddress) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, NetworkNode) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('Select * From NetworkNode Where ((ipAddress = ? AND ipAddress IS NOT NULL) OR (wifiDirectMacAddress = ? AND wifiDirectMacAddress IS NOT NULL))', void 0, void 0, void 0, trimMargin('\n |Select * From NetworkNode Where ((ipAddress = ? AND ipAddress IS NOT NULL) OR (wifiDirectMacAddress = ? AND wifiDirectMacAddress IS NOT NULL))\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda(ipAddress, wifiDirectMacAddress, _result)); return _result.v; }; function NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_nodeId = _resultSet.getLong_61zpoe$('nodeId'); var tmp_bluetoothMacAddress = _resultSet.getString_61zpoe$('bluetoothMacAddress'); var tmp_ipAddress = _resultSet.getString_61zpoe$('ipAddress'); var tmp_wifiDirectMacAddress = _resultSet.getString_61zpoe$('wifiDirectMacAddress'); var tmp_deviceWifiDirectName = _resultSet.getString_61zpoe$('deviceWifiDirectName'); var tmp_endpointUrl = _resultSet.getString_61zpoe$('endpointUrl'); var tmp_lastUpdateTimeStamp = _resultSet.getLong_61zpoe$('lastUpdateTimeStamp'); var tmp_networkServiceLastUpdated = _resultSet.getLong_61zpoe$('networkServiceLastUpdated'); var tmp_nsdServiceName = _resultSet.getString_61zpoe$('nsdServiceName'); var tmp_port = _resultSet.getInt_61zpoe$('port'); var tmp_numFailureCount = _resultSet.getInt_61zpoe$('numFailureCount'); var tmp_wifiDirectDeviceStatus = _resultSet.getInt_61zpoe$('wifiDirectDeviceStatus'); var tmp_groupSsid = _resultSet.getString_61zpoe$('groupSsid'); var _entity = new NetworkNode(); _entity.nodeId = tmp_nodeId; _entity.bluetoothMacAddress = tmp_bluetoothMacAddress; _entity.ipAddress = tmp_ipAddress; _entity.wifiDirectMacAddress = tmp_wifiDirectMacAddress; _entity.deviceWifiDirectName = tmp_deviceWifiDirectName; _entity.endpointUrl = tmp_endpointUrl; _entity.lastUpdateTimeStamp = tmp_lastUpdateTimeStamp; _entity.networkServiceLastUpdated = tmp_networkServiceLastUpdated; _entity.nsdServiceName = tmp_nsdServiceName; _entity.port = tmp_port; _entity.numFailureCount = tmp_numFailureCount; _entity.wifiDirectDeviceStatus = tmp_wifiDirectDeviceStatus; _entity.groupSsid = tmp_groupSsid; closure$_result.v = _entity; }return Unit; }; } function NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda(closure$bluetoothAddress, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$bluetoothAddress); useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.findNodeByBluetoothAddress_61zpoe$ = function (bluetoothAddress) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, NetworkNode) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from NetworkNode WHERE bluetoothMacAddress = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * from NetworkNode WHERE bluetoothMacAddress = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda(bluetoothAddress, _result)); return _result.v; }; NetworkNodeDao_JdbcKt.prototype.replace_r74hje$ = function (node) { var _retVal = this._insertAdapterNetworkNode_upsert.insertAndReturnId_11rb$(node); return _retVal; }; function Coroutine$insertAsync_r74hje$($this, node_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$node = node_0; } Coroutine$insertAsync_r74hje$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_r74hje$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_r74hje$.prototype.constructor = Coroutine$insertAsync_r74hje$; Coroutine$insertAsync_r74hje$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterNetworkNode_upsert.insertAndReturnIdAsync_11rb$(this.local$node, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.insertAsync_r74hje$ = function (node_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_r74hje$(this, node_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; NetworkNodeDao_JdbcKt.prototype.insertList_f2f1wn$ = function (nodeList) { var _retVal = this._insertAdapterNetworkNode_upsert.insertListAndReturnIds_4ezy5m$(nodeList); return copyToArray(_retVal); }; function NetworkNodeDao_JdbcKt$update$lambda(closure$node) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$node.bluetoothMacAddress); _stmt.setString_vqvrqt$(2, closure$node.ipAddress); _stmt.setString_vqvrqt$(3, closure$node.wifiDirectMacAddress); _stmt.setString_vqvrqt$(4, closure$node.deviceWifiDirectName); _stmt.setString_vqvrqt$(5, closure$node.endpointUrl); _stmt.setLong_6svq3l$(6, closure$node.lastUpdateTimeStamp); _stmt.setLong_6svq3l$(7, closure$node.networkServiceLastUpdated); _stmt.setString_vqvrqt$(8, closure$node.nsdServiceName); _stmt.setInt_vux9f0$(9, closure$node.port); _stmt.setInt_vux9f0$(10, closure$node.numFailureCount); _stmt.setInt_vux9f0$(11, closure$node.wifiDirectDeviceStatus); _stmt.setString_vqvrqt$(12, closure$node.groupSsid); _stmt.setLong_6svq3l$(13, closure$node.nodeId); return _stmt.executeUpdate(); }; } NetworkNodeDao_JdbcKt.prototype.update_r74hje$ = function (node) { var _sql = 'UPDATE NetworkNode SET bluetoothMacAddress = ?, ipAddress = ?, wifiDirectMacAddress = ?, deviceWifiDirectName = ?, endpointUrl = ?, lastUpdateTimeStamp = ?, networkServiceLastUpdated = ?, nsdServiceName = ?, port = ?, numFailureCount = ?, wifiDirectDeviceStatus = ?, groupSsid = ? WHERE nodeId = ?'; prepareAndUseStatement_0(this._db, _sql, NetworkNodeDao_JdbcKt$update$lambda(node)); }; function NetworkNodeDao_JdbcKt$deleteByBluetoothAddress$lambda(closure$bluetoothAddress) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$bluetoothAddress); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.deleteByBluetoothAddress_61zpoe$ = function (bluetoothAddress) { var _stmtConfig = new PreparedStatementConfig('DELETE FROM NetworkNode WHERE bluetoothMacAddress = ?', void 0, void 0, void 0, trimMargin('\n |DELETE FROM NetworkNode WHERE bluetoothMacAddress = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$deleteByBluetoothAddress$lambda(bluetoothAddress)); }; function Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.prototype.constructor = Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda; Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function NetworkNodeDao_JdbcKt$deleteAllAsync$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$deleteAllAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$deleteAllAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteAllAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteAllAsync.prototype.constructor = Coroutine$deleteAllAsync; Coroutine$deleteAllAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig('DELETE FROM NetworkNode', void 0, void 0, void 0, trimMargin('\n |DELETE FROM NetworkNode\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, NetworkNodeDao_JdbcKt$deleteAllAsync$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.deleteAllAsync = function (continuation_0, suspended) { var instance = new Coroutine$deleteAllAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(closure$nodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$nodeId = closure$nodeId_0; this.local$_stmt = _stmt_0; } Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.prototype.constructor = Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda; Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$nodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(closure$nodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(closure$nodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateRetryCountAsync_s8cxhz$($this, nodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$nodeId = nodeId_0; } Coroutine$updateRetryCountAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateRetryCountAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateRetryCountAsync_s8cxhz$.prototype.constructor = Coroutine$updateRetryCountAsync_s8cxhz$; Coroutine$updateRetryCountAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig('UPDATE NetworkNode SET numFailureCount = numFailureCount + 1 WHERE nodeId = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE NetworkNode SET numFailureCount = numFailureCount + 1 WHERE nodeId = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(this.local$nodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.updateRetryCountAsync_s8cxhz$ = function (nodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateRetryCountAsync_s8cxhz$(this, nodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_nodeId = _resultSet.getLong_61zpoe$('nodeId'); var tmp_bluetoothMacAddress = _resultSet.getString_61zpoe$('bluetoothMacAddress'); var tmp_ipAddress = _resultSet.getString_61zpoe$('ipAddress'); var tmp_wifiDirectMacAddress = _resultSet.getString_61zpoe$('wifiDirectMacAddress'); var tmp_deviceWifiDirectName = _resultSet.getString_61zpoe$('deviceWifiDirectName'); var tmp_endpointUrl = _resultSet.getString_61zpoe$('endpointUrl'); var tmp_lastUpdateTimeStamp = _resultSet.getLong_61zpoe$('lastUpdateTimeStamp'); var tmp_networkServiceLastUpdated = _resultSet.getLong_61zpoe$('networkServiceLastUpdated'); var tmp_nsdServiceName = _resultSet.getString_61zpoe$('nsdServiceName'); var tmp_port = _resultSet.getInt_61zpoe$('port'); var tmp_numFailureCount = _resultSet.getInt_61zpoe$('numFailureCount'); var tmp_wifiDirectDeviceStatus = _resultSet.getInt_61zpoe$('wifiDirectDeviceStatus'); var tmp_groupSsid = _resultSet.getString_61zpoe$('groupSsid'); var _entity = new NetworkNode(); _entity.nodeId = tmp_nodeId; _entity.bluetoothMacAddress = tmp_bluetoothMacAddress; _entity.ipAddress = tmp_ipAddress; _entity.wifiDirectMacAddress = tmp_wifiDirectMacAddress; _entity.deviceWifiDirectName = tmp_deviceWifiDirectName; _entity.endpointUrl = tmp_endpointUrl; _entity.lastUpdateTimeStamp = tmp_lastUpdateTimeStamp; _entity.networkServiceLastUpdated = tmp_networkServiceLastUpdated; _entity.nsdServiceName = tmp_nsdServiceName; _entity.port = tmp_port; _entity.numFailureCount = tmp_numFailureCount; _entity.wifiDirectDeviceStatus = tmp_wifiDirectDeviceStatus; _entity.groupSsid = tmp_groupSsid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda(closure$lastUpdatedTime, closure$maxNumFailure, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$lastUpdatedTime); _stmt.setInt_vux9f0$(2, closure$maxNumFailure); useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.findAllActiveNodes_yhmem3$ = function (lastUpdatedTime, maxNumFailure) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('Select * From NetworkNode WHERE lastUpdateTimeStamp >= ? AND numFailureCount <= ?', void 0, void 0, void 0, trimMargin('\n |Select * From NetworkNode WHERE lastUpdateTimeStamp >= ? AND numFailureCount <= ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda(lastUpdatedTime, maxNumFailure, _result)); return _result.v; }; function Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(closure$lastUpdateTimeStamp_0, closure$bluetoothAddress_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$lastUpdateTimeStamp = closure$lastUpdateTimeStamp_0; this.local$closure$bluetoothAddress = closure$bluetoothAddress_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.prototype.constructor = Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda; Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$lastUpdateTimeStamp); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$bluetoothAddress); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return this.local$closure$_result.v = _numUpdates, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(closure$lastUpdateTimeStamp_0, closure$bluetoothAddress_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(closure$lastUpdateTimeStamp_0, closure$bluetoothAddress_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateLastSeenAsync_4wgjuj$($this, bluetoothAddress_0, lastUpdateTimeStamp_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$bluetoothAddress = bluetoothAddress_0; this.local$lastUpdateTimeStamp = lastUpdateTimeStamp_0; } Coroutine$updateLastSeenAsync_4wgjuj$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateLastSeenAsync_4wgjuj$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateLastSeenAsync_4wgjuj$.prototype.constructor = Coroutine$updateLastSeenAsync_4wgjuj$; Coroutine$updateLastSeenAsync_4wgjuj$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig('UPDATE NetworkNode set lastUpdateTimeStamp = ?, numFailureCount = 0 WHERE bluetoothMacAddress = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE NetworkNode set lastUpdateTimeStamp = ?, numFailureCount = 0 WHERE bluetoothMacAddress = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(this.local$lastUpdateTimeStamp, this.local$bluetoothAddress, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.updateLastSeenAsync_4wgjuj$ = function (bluetoothAddress_0, lastUpdateTimeStamp_0, continuation_0, suspended) { var instance = new Coroutine$updateLastSeenAsync_4wgjuj$(this, bluetoothAddress_0, lastUpdateTimeStamp_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function NetworkNodeDao_JdbcKt$deleteOldAndBadNode$lambda(closure$minLastSeenTimestamp, closure$maxFailuresInPeriod) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$minLastSeenTimestamp); _stmt.setInt_vux9f0$(2, closure$maxFailuresInPeriod); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.deleteOldAndBadNode_yhmem3$ = function (minLastSeenTimestamp, maxFailuresInPeriod) { var _stmtConfig = new PreparedStatementConfig('DELETE FROM NetworkNode WHERE NetworkNode.lastUpdateTimeStamp < ? OR NetworkNode.numFailureCount >= ?', void 0, void 0, void 0, trimMargin('\n |DELETE FROM NetworkNode WHERE NetworkNode.lastUpdateTimeStamp < ? OR NetworkNode.numFailureCount >= ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$deleteOldAndBadNode$lambda(minLastSeenTimestamp, maxFailuresInPeriod)); }; function NetworkNodeDao_JdbcKt$updateNetworkNodeGroupSsid$lambda(closure$groupSsid, closure$endpointUrl, closure$nodeId) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$groupSsid); _stmt.setString_vqvrqt$(2, closure$endpointUrl); _stmt.setLong_6svq3l$(3, closure$nodeId); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.updateNetworkNodeGroupSsid_r69jt9$ = function (nodeId, groupSsid, endpointUrl) { var _stmtConfig = new PreparedStatementConfig('UPDATE NetworkNode SET groupSsid = ?, endpointUrl = ? WHERE nodeId = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE NetworkNode SET groupSsid = ?, endpointUrl = ? WHERE nodeId = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$updateNetworkNodeGroupSsid$lambda(groupSsid, endpointUrl, nodeId)); }; function NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda(closure$ssid, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$ssid); useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda$lambda(closure$_result)); return Unit; }; } NetworkNodeDao_JdbcKt.prototype.getEndpointUrlByGroupSsid_61zpoe$ = function (ssid) { var tmp$; var _result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT endpointUrl FROM NetworkNode WHERE groupSsid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT endpointUrl FROM NetworkNode WHERE groupSsid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda(ssid, _result)); return _result.v; }; function NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO NetworkNode (nodeId, bluetoothMacAddress, ipAddress, wifiDirectMacAddress, deviceWifiDirectName, endpointUrl, lastUpdateTimeStamp, networkServiceLastUpdated, nsdServiceName, port, numFailureCount, wifiDirectDeviceStatus, groupSsid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING nodeId'; } else tmp$ = ''; return "INSERT INTO NetworkNode (nodeId, bluetoothMacAddress, ipAddress, wifiDirectMacAddress, deviceWifiDirectName, endpointUrl, lastUpdateTimeStamp, networkServiceLastUpdated, nsdServiceName, port, numFailureCount, wifiDirectDeviceStatus, groupSsid) VALUES(COALESCE(?,nextval('NetworkNode_nodeId_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (nodeId) DO UPDATE SET bluetoothMacAddress = excluded.bluetoothMacAddress,ipAddress = excluded.ipAddress,wifiDirectMacAddress = excluded.wifiDirectMacAddress,deviceWifiDirectName = excluded.deviceWifiDirectName,endpointUrl = excluded.endpointUrl,lastUpdateTimeStamp = excluded.lastUpdateTimeStamp,networkServiceLastUpdated = excluded.networkServiceLastUpdated,nsdServiceName = excluded.nsdServiceName,port = excluded.port,numFailureCount = excluded.numFailureCount,wifiDirectDeviceStatus = excluded.wifiDirectDeviceStatus,groupSsid = excluded.groupSsid" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.nodeId, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.nodeId); } stmt.setString_vqvrqt$(2, entity.bluetoothMacAddress); stmt.setString_vqvrqt$(3, entity.ipAddress); stmt.setString_vqvrqt$(4, entity.wifiDirectMacAddress); stmt.setString_vqvrqt$(5, entity.deviceWifiDirectName); stmt.setString_vqvrqt$(6, entity.endpointUrl); stmt.setLong_6svq3l$(7, entity.lastUpdateTimeStamp); stmt.setLong_6svq3l$(8, entity.networkServiceLastUpdated); stmt.setString_vqvrqt$(9, entity.nsdServiceName); stmt.setInt_vux9f0$(10, entity.port); stmt.setInt_vux9f0$(11, entity.numFailureCount); stmt.setInt_vux9f0$(12, entity.wifiDirectDeviceStatus); stmt.setString_vqvrqt$(13, entity.groupSsid); }; NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; NetworkNodeDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'NetworkNodeDao_JdbcKt', interfaces: [NetworkNodeDao]}; function PersonAuth2Dao_JdbcKt(_db) { PersonAuth2Dao.call(this); this._db = _db; this._insertAdapterPersonAuth2_ = new PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral(this._db); this._insertAdapterPersonAuth2_upsert = new PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral(this._db); } function Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_119($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_119.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_119.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_119.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_119; Coroutine$replicateOnNewNode_s8cxhz$_119.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | ? AS paDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 562949953421312\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonAuth2\n | ON PersonAuth2.pauthUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ? \n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = ?), 0) \n | /*psql ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | ? AS paDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 562949953421312\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonAuth2\n | ON PersonAuth2.pauthUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ? \n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = ?), 0) \n | ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_119(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_122($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_122.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_122.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_122.prototype.constructor = Coroutine$replicateOnChange_122; Coroutine$replicateOnChange_122.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | UserSession.usClientNodeId AS paDestination\n | FROM ChangeLog\n | JOIN PersonAuth2\n | ON ChangeLog.chTableId = 678\n | AND ChangeLog.chEntityPk = PersonAuth2.pauthUid\n | JOIN Person\n | ON Person.personUid = PersonAuth2.pauthUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 562949953421312\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | UserSession.usClientNodeId AS paDestination\n | FROM ChangeLog\n | JOIN PersonAuth2\n | ON ChangeLog.chTableId = 678\n | AND ChangeLog.chEntityPk = PersonAuth2.pauthUid\n | JOIN Person\n | ON Person.personUid = PersonAuth2.pauthUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 562949953421312\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonAuth2Dao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_122(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_3mhn8e$($this, auths_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auths = auths_0; } Coroutine$insertListAsync_3mhn8e$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3mhn8e$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3mhn8e$.prototype.constructor = Coroutine$insertListAsync_3mhn8e$; Coroutine$insertListAsync_3mhn8e$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonAuth2_.insertListAsync_4ezy5m$(this.local$auths, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.insertListAsync_3mhn8e$ = function (auths_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3mhn8e$(this, auths_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_j8byhd$($this, auth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auth = auth_0; } Coroutine$insertAsync_j8byhd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_j8byhd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_j8byhd$.prototype.constructor = Coroutine$insertAsync_j8byhd$; Coroutine$insertAsync_j8byhd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonAuth2_upsert.insertAndReturnIdAsync_11rb$(this.local$auth, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.insertAsync_j8byhd$ = function (auth_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_j8byhd$(this, auth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuth2Dao_JdbcKt$findByPersonUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_pauthUid = _resultSet.getLong_61zpoe$('pauthUid'); var tmp_pauthMechanism = _resultSet.getString_61zpoe$('pauthMechanism'); var tmp_pauthAuth = _resultSet.getString_61zpoe$('pauthAuth'); var tmp_pauthLcsn = _resultSet.getLong_61zpoe$('pauthLcsn'); var tmp_pauthPcsn = _resultSet.getLong_61zpoe$('pauthPcsn'); var tmp_pauthLcb = _resultSet.getLong_61zpoe$('pauthLcb'); var tmp_pauthLct = _resultSet.getLong_61zpoe$('pauthLct'); var _entity = new PersonAuth2(); _entity.pauthUid = tmp_pauthUid; _entity.pauthMechanism = tmp_pauthMechanism; _entity.pauthAuth = tmp_pauthAuth; _entity.pauthLcsn = tmp_pauthLcsn; _entity.pauthPcsn = tmp_pauthPcsn; _entity.pauthLcb = tmp_pauthLcb; _entity.pauthLct = tmp_pauthLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda; Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonAuth2Dao_JdbcKt$findByPersonUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByPersonUid_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; } Coroutine$findByPersonUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUid_s8cxhz$.prototype.constructor = Coroutine$findByPersonUid_s8cxhz$; Coroutine$findByPersonUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonAuth2) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonAuth2.*\n | FROM PersonAuth2\n | WHERE PersonAuth2.pauthUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonAuth2.*\n | FROM PersonAuth2\n | WHERE PersonAuth2.pauthUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.findByPersonUid_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUid_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuth2Dao_JdbcKt$findByUsername$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_pauthUid = _resultSet.getLong_61zpoe$('pauthUid'); var tmp_pauthMechanism = _resultSet.getString_61zpoe$('pauthMechanism'); var tmp_pauthAuth = _resultSet.getString_61zpoe$('pauthAuth'); var tmp_pauthLcsn = _resultSet.getLong_61zpoe$('pauthLcsn'); var tmp_pauthPcsn = _resultSet.getLong_61zpoe$('pauthPcsn'); var tmp_pauthLcb = _resultSet.getLong_61zpoe$('pauthLcb'); var tmp_pauthLct = _resultSet.getLong_61zpoe$('pauthLct'); var _entity = new PersonAuth2(); _entity.pauthUid = tmp_pauthUid; _entity.pauthMechanism = tmp_pauthMechanism; _entity.pauthAuth = tmp_pauthAuth; _entity.pauthLcsn = tmp_pauthLcsn; _entity.pauthPcsn = tmp_pauthPcsn; _entity.pauthLcb = tmp_pauthLcb; _entity.pauthLct = tmp_pauthLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda(closure$username_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda; Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonAuth2Dao_JdbcKt$findByUsername$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$findByUsername$lambda(closure$username_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda(closure$username_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUsername_61zpoe$($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$username = username_0; } Coroutine$findByUsername_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsername_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsername_61zpoe$.prototype.constructor = Coroutine$findByUsername_61zpoe$; Coroutine$findByUsername_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonAuth2) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonAuth2.*\n | FROM PersonAuth2\n | JOIN Person ON PersonAuth2.pauthUid = Person.personUid\n | WHERE Person.username = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonAuth2.*\n | FROM PersonAuth2\n | JOIN Person ON PersonAuth2.pauthUid = Person.personUid\n | WHERE Person.username = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonAuth2Dao_JdbcKt$findByUsername$lambda(this.local$username, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.findByUsername_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findByUsername_61zpoe$(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonAuth2 (pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING pauthUid'; } else tmp$ = ''; return 'INSERT INTO PersonAuth2 (pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES(?, ?, ?, ?, ?, ?, ?)' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.pauthUid); stmt.setString_vqvrqt$(2, entity.pauthMechanism); stmt.setString_vqvrqt$(3, entity.pauthAuth); stmt.setLong_6svq3l$(4, entity.pauthLcsn); stmt.setLong_6svq3l$(5, entity.pauthPcsn); stmt.setLong_6svq3l$(6, entity.pauthLcb); stmt.setLong_6svq3l$(7, entity.pauthLct); }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO PersonAuth2 (pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING pauthUid'; } else tmp$ = ''; return 'INSERT INTO PersonAuth2 (pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = excluded.pauthMechanism,pauthAuth = excluded.pauthAuth,pauthLcsn = excluded.pauthLcsn,pauthPcsn = excluded.pauthPcsn,pauthLcb = excluded.pauthLcb,pauthLct = excluded.pauthLct' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.pauthUid); stmt.setString_vqvrqt$(2, entity.pauthMechanism); stmt.setString_vqvrqt$(3, entity.pauthAuth); stmt.setLong_6svq3l$(4, entity.pauthLcsn); stmt.setLong_6svq3l$(5, entity.pauthPcsn); stmt.setLong_6svq3l$(6, entity.pauthLcb); stmt.setLong_6svq3l$(7, entity.pauthLct); }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonAuth2Dao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao_JdbcKt', interfaces: [PersonAuth2Dao]}; function PersonAuth2Dao_ReplicateWrapper(_db, _dao) { PersonAuth2Dao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_120($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_120.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_120.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_120.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_120; Coroutine$replicateOnNewNode_s8cxhz$_120.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_120(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_123($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_123.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_123.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_123.prototype.constructor = Coroutine$replicateOnChange_123; Coroutine$replicateOnChange_123.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_123(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_3mhn8e$_0($this, auths_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auths = auths_0; } Coroutine$insertListAsync_3mhn8e$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3mhn8e$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3mhn8e$_0.prototype.constructor = Coroutine$insertListAsync_3mhn8e$_0; Coroutine$insertListAsync_3mhn8e$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$auths.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.pauthLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.insertListAsync_3mhn8e$(this.local$auths, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_ReplicateWrapper.prototype.insertListAsync_3mhn8e$ = function (auths_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3mhn8e$_0(this, auths_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuth2Dao_ReplicateWrapper.prototype.insertAsync_j8byhd$ = function (auth, continuation) { auth.pauthLct = systemTimeInMillis(); return this._dao_0.insertAsync_j8byhd$(auth, continuation); }; PersonAuth2Dao_ReplicateWrapper.prototype.findByPersonUid_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findByPersonUid_s8cxhz$(personUid, continuation); }; PersonAuth2Dao_ReplicateWrapper.prototype.findByUsername_61zpoe$ = function (username, continuation) { return this._dao_0.findByUsername_61zpoe$(username, continuation); }; PersonAuth2Dao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao_ReplicateWrapper', interfaces: [PersonAuth2Dao]}; function PersonAuth2Dao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonAuth2Dao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_121($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_121.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_121.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_121.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_121; Coroutine$replicateOnNewNode_s8cxhz$_121.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_121(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_124($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_124.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_124.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_124.prototype.constructor = Coroutine$replicateOnChange_124; Coroutine$replicateOnChange_124.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_124(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_3mhn8e$_1($this, auths_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auths = auths_0; } Coroutine$insertListAsync_3mhn8e$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3mhn8e$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3mhn8e$_1.prototype.constructor = Coroutine$insertListAsync_3mhn8e$_1; Coroutine$insertListAsync_3mhn8e$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_3mhn8e$(this.local$auths, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.insertListAsync_3mhn8e$ = function (auths_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3mhn8e$_1(this, auths_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_j8byhd$_0($this, auth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auth = auth_0; } Coroutine$insertAsync_j8byhd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_j8byhd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_j8byhd$_0.prototype.constructor = Coroutine$insertAsync_j8byhd$_0; Coroutine$insertAsync_j8byhd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_j8byhd$(this.local$auth, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.insertAsync_j8byhd$ = function (auth_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_j8byhd$_0(this, auth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUid_s8cxhz$_0($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findByPersonUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUid_s8cxhz$_0.prototype.constructor = Coroutine$findByPersonUid_s8cxhz$_0; Coroutine$findByPersonUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUid_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.findByPersonUid_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUid_s8cxhz$_0(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUsername_61zpoe$_0($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; } Coroutine$findByUsername_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsername_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsername_61zpoe$_0.prototype.constructor = Coroutine$findByUsername_61zpoe$_0; Coroutine$findByUsername_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUsername_61zpoe$(this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.findByUsername_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findByUsername_61zpoe$_0(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuth2Dao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao_Repo', interfaces: [PersonAuth2Dao]}; function PersonAuthDao_JdbcKt(_db) { PersonAuthDao.call(this); this._db = _db; this._insertAdapterAccessToken_ = new PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(this._db); this._insertAdapterPersonAuth_ = new PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(this._db); } function PersonAuthDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personAuthUid = _resultSet.getLong_61zpoe$('personAuthUid'); var tmp_passwordHash = _resultSet.getString_61zpoe$('passwordHash'); var tmp_personAuthStatus = _resultSet.getInt_61zpoe$('personAuthStatus'); var _entity = new PersonAuth(); _entity.personAuthUid = tmp_personAuthUid; _entity.passwordHash = tmp_passwordHash; _entity.personAuthStatus = tmp_personAuthStatus; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda; Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonAuthDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuthDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_23($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_23.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_23; Coroutine$findByUidAsync_s8cxhz$_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonAuth) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonAuth WHERE personAuthUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonAuth WHERE personAuthUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonAuthDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuthDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_23(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuthDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personAuthUid = _resultSet.getLong_61zpoe$('personAuthUid'); var tmp_passwordHash = _resultSet.getString_61zpoe$('passwordHash'); var tmp_personAuthStatus = _resultSet.getInt_61zpoe$('personAuthStatus'); var _entity = new PersonAuth(); _entity.personAuthUid = tmp_personAuthUid; _entity.passwordHash = tmp_passwordHash; _entity.personAuthStatus = tmp_personAuthStatus; closure$_result.v = _entity; }return Unit; }; } function PersonAuthDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), PersonAuthDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } PersonAuthDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonAuth) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonAuth WHERE personAuthUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonAuth WHERE personAuthUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonAuthDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function PersonAuthDao_JdbcKt$findPersonByUsername$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function PersonAuthDao_JdbcKt$findPersonByUsername$lambda(closure$username, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$username); useResults(_stmt.executeQuery(), PersonAuthDao_JdbcKt$findPersonByUsername$lambda$lambda(closure$_result)); return Unit; }; } PersonAuthDao_JdbcKt.prototype.findPersonByUsername_61zpoe$ = function (username) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Person WHERE username = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Person WHERE username = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonAuthDao_JdbcKt$findPersonByUsername$lambda(username, _result)); return _result.v; }; function Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda; Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.passwordHash); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.personAuthStatus); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.personAuthUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuthDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_k01yar$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_k01yar$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_k01yar$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_k01yar$.prototype.constructor = Coroutine$updateAsync_k01yar$; Coroutine$updateAsync_k01yar$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE PersonAuth SET passwordHash = ?, personAuthStatus = ? WHERE personAuthUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonAuthDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuthDao_JdbcKt.prototype.updateAsync_k01yar$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_k01yar$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuthDao_JdbcKt$isPersonAdmin$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function PersonAuthDao_JdbcKt$isPersonAdmin$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), PersonAuthDao_JdbcKt$isPersonAdmin$lambda$lambda(closure$_result)); return Unit; }; } PersonAuthDao_JdbcKt.prototype.isPersonAdmin_s8cxhz$ = function (uid) { var _result = {v: false}; var _stmtConfig = new PreparedStatementConfig('SELECT admin from Person WHERE personUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT admin from Person WHERE personUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonAuthDao_JdbcKt$isPersonAdmin$lambda(uid, _result)); return _result.v; }; function Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(closure$passwordHash_0, closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$passwordHash = closure$passwordHash_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.prototype.constructor = Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda; Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$passwordHash); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return this.local$closure$_result.v = _numUpdates, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(closure$passwordHash_0, closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(closure$passwordHash_0, closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updatePasswordForPersonUid_a4hdmt$($this, personUid_0, passwordHash_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; this.local$passwordHash = passwordHash_0; } Coroutine$updatePasswordForPersonUid_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updatePasswordForPersonUid_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updatePasswordForPersonUid_a4hdmt$.prototype.constructor = Coroutine$updatePasswordForPersonUid_a4hdmt$; Coroutine$updatePasswordForPersonUid_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig('UPDATE PersonAuth set passwordHash = ? WHERE personAuthUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE PersonAuth set passwordHash = ? WHERE personAuthUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(this.local$passwordHash, this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuthDao_JdbcKt.prototype.updatePasswordForPersonUid_a4hdmt$ = function (personUid_0, passwordHash_0, continuation_0, suspended) { var instance = new Coroutine$updatePasswordForPersonUid_a4hdmt$(this, personUid_0, passwordHash_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuthDao_JdbcKt.prototype.insertAccessToken_sz9w29$ = function (token) { this._insertAdapterAccessToken_.insert_11rb$(token); }; PersonAuthDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonAuth_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_131($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_131.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_131.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_131.prototype.constructor = Coroutine$insertAsync_131; Coroutine$insertAsync_131.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonAuth_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuthDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_131(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuthDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonAuth_.insertList_4ezy5m$(entityList); }; function PersonAuthDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.passwordHash); _stmt.setInt_vux9f0$(2, _entity.personAuthStatus); _stmt.setLong_6svq3l$(3, _entity.personAuthUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonAuthDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonAuth SET passwordHash = ?, personAuthStatus = ? WHERE personAuthUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonAuthDao_JdbcKt$updateList$lambda(entityList)); }; function PersonAuthDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.passwordHash); _stmt.setInt_vux9f0$(2, closure$entity.personAuthStatus); _stmt.setLong_6svq3l$(3, closure$entity.personAuthUid); return _stmt.executeUpdate(); }; } PersonAuthDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonAuth SET passwordHash = ?, personAuthStatus = ? WHERE personAuthUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonAuthDao_JdbcKt$update$lambda(entity)); }; function PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO AccessToken (token, accessTokenPersonUid, expires) VALUES(?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING token'; } else tmp$ = ''; return 'INSERT INTO AccessToken (token, accessTokenPersonUid, expires) VALUES(?, ?, ?)' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setString_vqvrqt$(1, entity.token); stmt.setLong_6svq3l$(2, entity.accessTokenPersonUid); stmt.setLong_6svq3l$(3, entity.expires); }; PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonAuth (personAuthUid, passwordHash, personAuthStatus) VALUES(?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING personAuthUid'; } else tmp$ = ''; return "INSERT INTO PersonAuth (personAuthUid, passwordHash, personAuthStatus) VALUES(COALESCE(?,nextval('PersonAuth_personAuthUid_seq')), ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personAuthUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personAuthUid); } stmt.setString_vqvrqt$(2, entity.passwordHash); stmt.setInt_vux9f0$(3, entity.personAuthStatus); }; PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonAuthDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuthDao_JdbcKt', interfaces: [PersonAuthDao]}; function PersonDao_JdbcKt(_db) { PersonDao.call(this); this._db = _db; this._insertAdapterPerson_ = new PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral(this._db); this._insertAdapterPerson_upsert = new PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral(this._db); this._insertAdapterAccessToken_ = new PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(this._db); this._insertAdapterPersonAuth_ = new PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(this._db); this._insertAdapterPersonGroup_ = new PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(this._db); this._insertAdapterPersonGroupMember_ = new PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(this._db); this._insertAdapterAuditLog_ = new PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral(this._db); } function Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_122($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_122.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_122.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_122.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_122; Coroutine$replicateOnNewNode_s8cxhz$_122.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | ? AS personDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId = ?\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = ?), 0) \n | /*psql ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | ? AS personDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId = ?\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = ?), 0) \n | ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_122(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_125($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_125.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_125.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_125.prototype.constructor = Coroutine$replicateOnChange_125; Coroutine$replicateOnChange_125.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | UserSession.usClientNodeId AS personDestination\n | FROM ChangeLog\n | JOIN Person\n | ON ChangeLog.chTableId = 9\n | AND ChangeLog.chEntityPk = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | UserSession.usClientNodeId AS personDestination\n | FROM ChangeLog\n | JOIN Person\n | ON ChangeLog.chTableId = 9\n | AND ChangeLog.chEntityPk = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_125(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_14($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_14.prototype.constructor = Coroutine$insertListAsync_14; Coroutine$insertListAsync_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPerson_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_14(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace($this, person_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$person = person_0; } Coroutine$insertOrReplace.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace.prototype.constructor = Coroutine$insertOrReplace; Coroutine$insertOrReplace.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPerson_upsert.insertAsync_11rb$(this.local$person, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertOrReplace = function (person_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace(this, person_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findByUsernameCount$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda(closure$username_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda; Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUsernameCount$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUsernameCount$lambda(closure$username_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda(closure$username_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUsernameCount_61zpoe$($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$username = username_0; } Coroutine$findByUsernameCount_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsernameCount_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsernameCount_61zpoe$.prototype.constructor = Coroutine$findByUsernameCount_61zpoe$; Coroutine$findByUsernameCount_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM Person where Person.username = ?', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM Person where Person.username = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$findByUsernameCount$lambda(this.local$username, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.findByUsernameCount_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findByUsernameCount_61zpoe$(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$isValidToken$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function PersonDao_JdbcKt$isValidToken$lambda(closure$token, closure$personUid, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$token); _stmt.setLong_6svq3l$(2, closure$personUid); useResults(_stmt.executeQuery(), PersonDao_JdbcKt$isValidToken$lambda$lambda(closure$_result)); return Unit; }; } PersonDao_JdbcKt.prototype.isValidToken_4wgjuj$ = function (token, personUid) { var _result = {v: false}; var _stmtConfig = new PreparedStatementConfig('SELECT EXISTS(SELECT token FROM AccessToken WHERE token = ? and accessTokenPersonUid = ?)', void 0, void 0, void 0, trimMargin('\n |SELECT EXISTS(SELECT token FROM AccessToken WHERE token = ? and accessTokenPersonUid = ?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonDao_JdbcKt$isValidToken$lambda(token, personUid, _result)); return _result.v; }; PersonDao_JdbcKt.prototype.insertAccessToken_sz9w29$ = function (token) { this._insertAdapterAccessToken_.insert_11rb$(token); }; function PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_passwordHash = _resultSet.getString_61zpoe$('passwordHash'); var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var _entity = new PersonDao$PersonUidAndPasswordHash(); _entity.passwordHash = tmp_passwordHash; _entity.personUid = tmp_personUid; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.admin = tmp_admin; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(closure$username_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda; Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(closure$username_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(closure$username_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findUidAndPasswordHashAsync_61zpoe$($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$username = username_0; } Coroutine$findUidAndPasswordHashAsync_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUidAndPasswordHashAsync_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUidAndPasswordHashAsync_61zpoe$.prototype.constructor = Coroutine$findUidAndPasswordHashAsync_61zpoe$; Coroutine$findUidAndPasswordHashAsync_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonDao$PersonUidAndPasswordHash) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.personUid, Person.admin, Person.firstNames, Person.lastName, \n | PersonAuth.passwordHash\n | FROM Person\n | JOIN PersonAuth\n | ON Person.personUid = PersonAuth.personAuthUid\n | WHERE Person.username = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Person.personUid, Person.admin, Person.firstNames, Person.lastName, \n | PersonAuth.passwordHash\n | FROM Person\n | JOIN PersonAuth\n | ON Person.personUid = PersonAuth.personAuthUid\n | WHERE Person.username = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(this.local$username, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.findUidAndPasswordHashAsync_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findUidAndPasswordHashAsync_61zpoe$(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(closure$username_0, closure$passwordHash_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$passwordHash = closure$passwordHash_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda; Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$passwordHash); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(closure$username_0, closure$passwordHash_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(closure$username_0, closure$passwordHash_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUsernameAndPasswordHash2_puj7f4$($this, username_0, passwordHash_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$username = username_0; this.local$passwordHash = passwordHash_0; } Coroutine$findByUsernameAndPasswordHash2_puj7f4$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsernameAndPasswordHash2_puj7f4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsernameAndPasswordHash2_puj7f4$.prototype.constructor = Coroutine$findByUsernameAndPasswordHash2_puj7f4$; Coroutine$findByUsernameAndPasswordHash2_puj7f4$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*\n | FROM Person\n | JOIN PersonAuth2\n | ON Person.personUid = PersonAuth2.pauthUid\n | WHERE Person.username = ? \n | AND PersonAuth2.pauthAuth = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Person.*\n | FROM Person\n | JOIN PersonAuth2\n | ON Person.personUid = PersonAuth2.pauthUid\n | WHERE Person.username = ? \n | AND PersonAuth2.pauthAuth = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(this.local$username, this.local$passwordHash, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.findByUsernameAndPasswordHash2_puj7f4$ = function (username_0, passwordHash_0, continuation_0, suspended) { var instance = new Coroutine$findByUsernameAndPasswordHash2_puj7f4$(this, username_0, passwordHash_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_JdbcKt.prototype.insertPersonAuth_k01yar$ = function (personAuth) { this._insertAdapterPersonAuth_.insert_11rb$(personAuth); }; function PersonDao_JdbcKt$personHasPermissionAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda(closure$personUid_0, closure$permission_0, closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda; Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$personHasPermissionAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$personHasPermissionAsync$lambda(closure$personUid_0, closure$permission_0, closure$accountPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda(closure$personUid_0, closure$permission_0, closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$personHasPermissionAsync_b9bd0d$($this, accountPersonUid_0, personUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$personUid = personUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionAsync_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionAsync_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionAsync_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionAsync_b9bd0d$; Coroutine$personHasPermissionAsync_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(\n | SELECT 1\n | FROM Person\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE Person.personUid = ?\n | AND (ScopedGrant.sgPermissions & ?) > 0\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LIMIT 1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT EXISTS(\n | SELECT 1\n | FROM Person\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE Person.personUid = ?\n | AND (ScopedGrant.sgPermissions & ?) > 0\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LIMIT 1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$personHasPermissionAsync$lambda(this.local$personUid, this.local$permission, this.local$accountPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.personHasPermissionAsync_b9bd0d$ = function (accountPersonUid_0, personUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionAsync_b9bd0d$(this, accountPersonUid_0, personUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$personIsAdmin$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda(closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda; Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$personIsAdmin$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$personIsAdmin$lambda(closure$accountPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda(closure$accountPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$personIsAdmin_s8cxhz$($this, accountPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; } Coroutine$personIsAdmin_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personIsAdmin_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personIsAdmin_s8cxhz$.prototype.constructor = Coroutine$personIsAdmin_s8cxhz$; Coroutine$personIsAdmin_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig('SELECT COALESCE((SELECT admin FROM Person WHERE personUid = ?), 0)', void 0, void 0, void 0, 'SELECT COALESCE((SELECT admin FROM Person WHERE personUid = ?), FALSE)'); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$personIsAdmin$lambda(this.local$accountPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.personIsAdmin_s8cxhz$ = function (accountPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$personIsAdmin_s8cxhz$(this, accountPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findByUsername$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function PersonDao_JdbcKt$findByUsername$lambda(closure$username, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$username); useResults(_stmt.executeQuery(), PersonDao_JdbcKt$findByUsername$lambda$lambda(closure$_result)); return Unit; }; } PersonDao_JdbcKt.prototype.findByUsername_pdl1vj$ = function (username) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT Person.* FROM PERSON Where Person.username = ?', void 0, void 0, void 0, trimMargin('\n |SELECT Person.* FROM PERSON Where Person.username = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonDao_JdbcKt$findByUsername$lambda(username, _result)); return _result.v; }; function PersonDao_JdbcKt$findSystemAccount$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda(closure$nodeId_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$nodeId = closure$nodeId_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda; Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$nodeId); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findSystemAccount$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findSystemAccount$lambda(closure$nodeId_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda(closure$nodeId_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findSystemAccount_s8cxhz$($this, nodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$nodeId = nodeId_0; } Coroutine$findSystemAccount_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSystemAccount_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSystemAccount_s8cxhz$.prototype.constructor = Coroutine$findSystemAccount_s8cxhz$; Coroutine$findSystemAccount_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*\n | FROM Person\n | WHERE Person.dateOfBirth = ?\n | AND Person.personType = 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Person.*\n | FROM Person\n | WHERE Person.dateOfBirth = ?\n | AND Person.personType = 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$findSystemAccount$lambda(this.local$nodeId, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.findSystemAccount_s8cxhz$ = function (nodeId_0, continuation_0, suspended) { var instance = new Coroutine$findSystemAccount_s8cxhz$(this, nodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function PersonDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), PersonDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } PersonDao_JdbcKt.prototype.findByUid = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PERSON WHERE Person.personUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PERSON WHERE Person.personUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function PersonDao_JdbcKt$findPersonAccountByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_currentPassword = _resultSet.getString_61zpoe$('currentPassword'); var tmp_newPassword = _resultSet.getString_61zpoe$('newPassword'); var tmp_confirmedPassword = _resultSet.getString_61zpoe$('confirmedPassword'); var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new PersonWithAccount(); _entity.currentPassword = tmp_currentPassword; _entity.newPassword = tmp_newPassword; _entity.confirmedPassword = tmp_confirmedPassword; _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda; Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findPersonAccountByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonAccountByUid$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findPersonAccountByUid($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findPersonAccountByUid.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findPersonAccountByUid.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findPersonAccountByUid.prototype.constructor = Coroutine$findPersonAccountByUid; Coroutine$findPersonAccountByUid.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonWithAccount) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT Person.*, null as newPassword, null as currentPassword,null as confirmedPassword FROM PERSON WHERE Person.personUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT Person.*, null as newPassword, null as currentPassword,null as confirmedPassword FROM PERSON WHERE Person.personUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$findPersonAccountByUid$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.findPersonAccountByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findPersonAccountByUid(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findByUidLive$lambda(this$PersonDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidLive$lambda; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From Person WHERE personUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * From Person WHERE personUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, _stmtConfig, PersonDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidLive$lambda(this$PersonDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidLive$lambda(this$PersonDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('Person'), PersonDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function PersonDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda; Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_24($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_24.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_24; Coroutine$findByUidAsync_s8cxhz$_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Person WHERE personUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Person WHERE personUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_24(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$updateAsync$lambda; Coroutine$PersonDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.username); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.firstNames); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.lastName); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.emailAddr); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.phoneNum); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.gender); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$entity.active); this.local$_stmt.setBoolean_fzusl$(8, this.local$closure$entity.admin); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$entity.personNotes); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$entity.fatherName); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$entity.fatherNumber); this.local$_stmt.setString_vqvrqt$(12, this.local$closure$entity.motherName); this.local$_stmt.setString_vqvrqt$(13, this.local$closure$entity.motherNum); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.dateOfBirth); this.local$_stmt.setString_vqvrqt$(15, this.local$closure$entity.personAddress); this.local$_stmt.setString_vqvrqt$(16, this.local$closure$entity.personOrgId); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.personGroupUid); this.local$_stmt.setLong_6svq3l$(18, this.local$closure$entity.personMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.personLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$entity.personLastChangedBy); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.personLct); this.local$_stmt.setString_vqvrqt$(22, this.local$closure$entity.personCountry); this.local$_stmt.setInt_vux9f0$(23, this.local$closure$entity.personType); this.local$_stmt.setLong_6svq3l$(24, this.local$closure$entity.personUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_6c9i1n$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_6c9i1n$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6c9i1n$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6c9i1n$.prototype.constructor = Coroutine$updateAsync_6c9i1n$; Coroutine$updateAsync_6c9i1n$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Person SET username = ?, firstNames = ?, lastName = ?, emailAddr = ?, phoneNum = ?, gender = ?, active = ?, admin = ?, personNotes = ?, fatherName = ?, fatherNumber = ?, motherName = ?, motherNum = ?, dateOfBirth = ?, personAddress = ?, personOrgId = ?, personGroupUid = ?, personMasterChangeSeqNum = ?, personLocalChangeSeqNum = ?, personLastChangedBy = ?, personLct = ?, personCountry = ?, personType = ? WHERE personUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.updateAsync_6c9i1n$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6c9i1n$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroup_j5378c$($this, personGroup_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroup = personGroup_0; } Coroutine$insertPersonGroup_j5378c$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroup_j5378c$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroup_j5378c$.prototype.constructor = Coroutine$insertPersonGroup_j5378c$; Coroutine$insertPersonGroup_j5378c$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroup_.insertAndReturnIdAsync_11rb$(this.local$personGroup, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertPersonGroup_j5378c$ = function (personGroup_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroup_j5378c$(this, personGroup_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroupMember_gftcgu$($this, personGroupMember_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupMember = personGroupMember_0; } Coroutine$insertPersonGroupMember_gftcgu$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroupMember_gftcgu$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroupMember_gftcgu$.prototype.constructor = Coroutine$insertPersonGroupMember_gftcgu$; Coroutine$insertPersonGroupMember_gftcgu$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroupMember_.insertAndReturnIdAsync_11rb$(this.local$personGroupMember, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertPersonGroupMember_gftcgu$ = function (personGroupMember_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroupMember_gftcgu$(this, personGroupMember_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral(this$PersonDao_JdbcKt, closure$accountPersonUid, closure$excludeClazz, closure$timestamp, closure$excludeSchool, closure$excludeSelected, closure$searchText, closure$sortOrder) { this.this$PersonDao_JdbcKt = this$PersonDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$excludeClazz = closure$excludeClazz; this.closure$timestamp = closure$timestamp; this.closure$excludeSchool = closure$excludeSchool; this.closure$excludeSelected = closure$excludeSelected; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new PersonWithDisplayDetails(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, this$PersonDao_JdbcKt_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$timestamp); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$timestamp); this.local$_stmt.setArray_wqp8hw$(8, this.local$this$PersonDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelected))); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, this$PersonDao_JdbcKt_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, this$PersonDao_JdbcKt_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), true, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, _stmtConfig, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$excludeClazz, this.local$closure$timestamp, this.local$closure$excludeSchool, this.local$this$PersonDao_JdbcKt, this.local$closure$excludeSelected, this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$PersonDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'ClazzEnrolment', 'SchoolMember']), PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this.this$PersonDao_JdbcKt, this.closure$accountPersonUid, this.closure$excludeClazz, this.closure$timestamp, this.closure$excludeSchool, this.closure$excludeSelected, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, this$PersonDao_JdbcKt_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$timestamp); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$timestamp); this.local$_stmt.setArray_wqp8hw$(8, this.local$this$PersonDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelected))); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, this$PersonDao_JdbcKt_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, this$PersonDao_JdbcKt_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) \n "), true, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, _stmtConfig, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$excludeClazz, this.local$closure$timestamp, this.local$closure$excludeSchool, this.local$this$PersonDao_JdbcKt, this.local$closure$excludeSelected, this.local$closure$searchText, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$PersonDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'ClazzEnrolment', 'SchoolMember']), PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this.this$PersonDao_JdbcKt, this.closure$accountPersonUid, this.closure$excludeClazz, this.closure$timestamp, this.closure$excludeSchool, this.closure$excludeSelected, this.closure$searchText, this.closure$sortOrder)); }; PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; PersonDao_JdbcKt.prototype.findPersonsWithPermission_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { var _result = new PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral(this, accountPersonUid, excludeClazz, timestamp, excludeSchool, excludeSelected, searchText, sortOrder); return _result; }; function PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda(closure$accountPersonUid, closure$excludeClazz, closure$timestamp, closure$excludeSchool, this$PersonDao_JdbcKt, closure$excludeSelected, closure$searchText, closure$sortOrder, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$accountPersonUid); _stmt.setLong_6svq3l$(2, closure$excludeClazz); _stmt.setLong_6svq3l$(3, closure$excludeClazz); _stmt.setLong_6svq3l$(4, closure$timestamp); _stmt.setLong_6svq3l$(5, closure$excludeSchool); _stmt.setLong_6svq3l$(6, closure$excludeSchool); _stmt.setLong_6svq3l$(7, closure$timestamp); _stmt.setArray_wqp8hw$(8, this$PersonDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'BIGINT', copyToArray(closure$excludeSelected))); _stmt.setString_vqvrqt$(9, closure$searchText); _stmt.setString_vqvrqt$(10, closure$searchText); _stmt.setInt_vux9f0$(11, closure$sortOrder); _stmt.setInt_vux9f0$(12, closure$sortOrder); useResults(_stmt.executeQuery(), PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda$lambda(closure$_result)); return Unit; }; } PersonDao_JdbcKt.prototype.findPersonsWithPermissionAsList_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | \n "), true, void 0, void 0, trimMargin("\n |\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | \n |")); prepareAndUseStatement(this._db, _stmtConfig, PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda(accountPersonUid, excludeClazz, timestamp, excludeSchool, this, excludeSelected, searchText, sortOrder, _result)); return _result.v; }; function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new PersonWithPersonParentJoin(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; var _parentJoin_nullFieldCount = 0; var tmp_ppjUid = _resultSet.getLong_61zpoe$('ppjUid'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjPcsn = _resultSet.getLong_61zpoe$('ppjPcsn'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjLcsn = _resultSet.getLong_61zpoe$('ppjLcsn'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjLcb = _resultSet.getInt_61zpoe$('ppjLcb'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjLct = _resultSet.getLong_61zpoe$('ppjLct'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjParentPersonUid = _resultSet.getLong_61zpoe$('ppjParentPersonUid'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjMinorPersonUid = _resultSet.getLong_61zpoe$('ppjMinorPersonUid'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjRelationship = _resultSet.getInt_61zpoe$('ppjRelationship'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjEmail = _resultSet.getString_61zpoe$('ppjEmail'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjPhone = _resultSet.getString_61zpoe$('ppjPhone'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjInactive = _resultSet.getBoolean_61zpoe$('ppjInactive'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjStatus = _resultSet.getInt_61zpoe$('ppjStatus'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjApprovalTiemstamp = _resultSet.getLong_61zpoe$('ppjApprovalTiemstamp'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }var tmp_ppjApprovalIpAddr = _resultSet.getString_61zpoe$('ppjApprovalIpAddr'); if (_resultSet.wasNull()) { _parentJoin_nullFieldCount = _parentJoin_nullFieldCount + 1 | 0; }if (_parentJoin_nullFieldCount < 14) { if (_entity.parentJoin == null) { _entity.parentJoin = new PersonParentJoin(); }ensureNotNull(_entity.parentJoin).ppjUid = tmp_ppjUid; ensureNotNull(_entity.parentJoin).ppjPcsn = tmp_ppjPcsn; ensureNotNull(_entity.parentJoin).ppjLcsn = tmp_ppjLcsn; ensureNotNull(_entity.parentJoin).ppjLcb = tmp_ppjLcb; ensureNotNull(_entity.parentJoin).ppjLct = tmp_ppjLct; ensureNotNull(_entity.parentJoin).ppjParentPersonUid = tmp_ppjParentPersonUid; ensureNotNull(_entity.parentJoin).ppjMinorPersonUid = tmp_ppjMinorPersonUid; ensureNotNull(_entity.parentJoin).ppjRelationship = tmp_ppjRelationship; ensureNotNull(_entity.parentJoin).ppjEmail = tmp_ppjEmail; ensureNotNull(_entity.parentJoin).ppjPhone = tmp_ppjPhone; ensureNotNull(_entity.parentJoin).ppjInactive = tmp_ppjInactive; ensureNotNull(_entity.parentJoin).ppjStatus = tmp_ppjStatus; ensureNotNull(_entity.parentJoin).ppjApprovalTiemstamp = tmp_ppjApprovalTiemstamp; ensureNotNull(_entity.parentJoin).ppjApprovalIpAddr = tmp_ppjApprovalIpAddr; }closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(closure$personUid_0, closure$activeUserPersonUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$activeUserPersonUid = closure$activeUserPersonUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$activeUserPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(closure$personUid_0, closure$activeUserPersonUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(closure$personUid_0, closure$activeUserPersonUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this$PersonDao_JdbcKt_0, closure$personUid_0, closure$activeUserPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$activeUserPersonUid = closure$activeUserPersonUid_0; this.local$_liveResult = void 0; } Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonWithPersonParentJoin) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*, PersonParentJoin.* \n | FROM Person\n | LEFT JOIN PersonParentJoin on ppjUid = (\n | SELECT ppjUid \n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ? \n | AND ppjParentPersonUid = ? \n | LIMIT 1) \n | WHERE Person.personUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT Person.*, PersonParentJoin.* \n | FROM Person\n | LEFT JOIN PersonParentJoin on ppjUid = (\n | SELECT ppjUid \n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ? \n | AND ppjParentPersonUid = ? \n | LIMIT 1) \n | WHERE Person.personUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, _stmtConfig, PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(this.local$closure$personUid, this.local$closure$activeUserPersonUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this$PersonDao_JdbcKt_0, closure$personUid_0, closure$activeUserPersonUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this$PersonDao_JdbcKt_0, closure$personUid_0, closure$activeUserPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUidWithDisplayDetailsLive_3pjtqy$ = function (personUid, activeUserPersonUid) { var _result = new DoorLiveDataImpl(this._db, listOf(['Person', 'PersonParentJoin']), PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this, personUid, activeUserPersonUid)); return _result; }; PersonDao_JdbcKt.prototype.insertAuditLog_6gshjl$ = function (entity) { var _retVal = this._insertAdapterAuditLog_.insertAndReturnId_11rb$(entity); return _retVal; }; function PersonDao_JdbcKt$getAllPerson$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function PersonDao_JdbcKt$getAllPerson$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), PersonDao_JdbcKt$getAllPerson$lambda$lambda(closure$_result)); return Unit; }; } PersonDao_JdbcKt.prototype.getAllPerson = function () { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Person', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Person\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonDao_JdbcKt$getAllPerson$lambda(_result)); return _result.v; }; PersonDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPerson_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_132($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_132.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_132.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_132.prototype.constructor = Coroutine$insertAsync_132; Coroutine$insertAsync_132.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPerson_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_132(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPerson_.insertList_4ezy5m$(entityList); }; function PersonDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.username); _stmt.setString_vqvrqt$(2, _entity.firstNames); _stmt.setString_vqvrqt$(3, _entity.lastName); _stmt.setString_vqvrqt$(4, _entity.emailAddr); _stmt.setString_vqvrqt$(5, _entity.phoneNum); _stmt.setInt_vux9f0$(6, _entity.gender); _stmt.setBoolean_fzusl$(7, _entity.active); _stmt.setBoolean_fzusl$(8, _entity.admin); _stmt.setString_vqvrqt$(9, _entity.personNotes); _stmt.setString_vqvrqt$(10, _entity.fatherName); _stmt.setString_vqvrqt$(11, _entity.fatherNumber); _stmt.setString_vqvrqt$(12, _entity.motherName); _stmt.setString_vqvrqt$(13, _entity.motherNum); _stmt.setLong_6svq3l$(14, _entity.dateOfBirth); _stmt.setString_vqvrqt$(15, _entity.personAddress); _stmt.setString_vqvrqt$(16, _entity.personOrgId); _stmt.setLong_6svq3l$(17, _entity.personGroupUid); _stmt.setLong_6svq3l$(18, _entity.personMasterChangeSeqNum); _stmt.setLong_6svq3l$(19, _entity.personLocalChangeSeqNum); _stmt.setInt_vux9f0$(20, _entity.personLastChangedBy); _stmt.setLong_6svq3l$(21, _entity.personLct); _stmt.setString_vqvrqt$(22, _entity.personCountry); _stmt.setInt_vux9f0$(23, _entity.personType); _stmt.setLong_6svq3l$(24, _entity.personUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Person SET username = ?, firstNames = ?, lastName = ?, emailAddr = ?, phoneNum = ?, gender = ?, active = ?, admin = ?, personNotes = ?, fatherName = ?, fatherNumber = ?, motherName = ?, motherNum = ?, dateOfBirth = ?, personAddress = ?, personOrgId = ?, personGroupUid = ?, personMasterChangeSeqNum = ?, personLocalChangeSeqNum = ?, personLastChangedBy = ?, personLct = ?, personCountry = ?, personType = ? WHERE personUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonDao_JdbcKt$updateList$lambda(entityList)); }; function PersonDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.username); _stmt.setString_vqvrqt$(2, closure$entity.firstNames); _stmt.setString_vqvrqt$(3, closure$entity.lastName); _stmt.setString_vqvrqt$(4, closure$entity.emailAddr); _stmt.setString_vqvrqt$(5, closure$entity.phoneNum); _stmt.setInt_vux9f0$(6, closure$entity.gender); _stmt.setBoolean_fzusl$(7, closure$entity.active); _stmt.setBoolean_fzusl$(8, closure$entity.admin); _stmt.setString_vqvrqt$(9, closure$entity.personNotes); _stmt.setString_vqvrqt$(10, closure$entity.fatherName); _stmt.setString_vqvrqt$(11, closure$entity.fatherNumber); _stmt.setString_vqvrqt$(12, closure$entity.motherName); _stmt.setString_vqvrqt$(13, closure$entity.motherNum); _stmt.setLong_6svq3l$(14, closure$entity.dateOfBirth); _stmt.setString_vqvrqt$(15, closure$entity.personAddress); _stmt.setString_vqvrqt$(16, closure$entity.personOrgId); _stmt.setLong_6svq3l$(17, closure$entity.personGroupUid); _stmt.setLong_6svq3l$(18, closure$entity.personMasterChangeSeqNum); _stmt.setLong_6svq3l$(19, closure$entity.personLocalChangeSeqNum); _stmt.setInt_vux9f0$(20, closure$entity.personLastChangedBy); _stmt.setLong_6svq3l$(21, closure$entity.personLct); _stmt.setString_vqvrqt$(22, closure$entity.personCountry); _stmt.setInt_vux9f0$(23, closure$entity.personType); _stmt.setLong_6svq3l$(24, closure$entity.personUid); return _stmt.executeUpdate(); }; } PersonDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Person SET username = ?, firstNames = ?, lastName = ?, emailAddr = ?, phoneNum = ?, gender = ?, active = ?, admin = ?, personNotes = ?, fatherName = ?, fatherNumber = ?, motherName = ?, motherNum = ?, dateOfBirth = ?, personAddress = ?, personOrgId = ?, personGroupUid = ?, personMasterChangeSeqNum = ?, personLocalChangeSeqNum = ?, personLastChangedBy = ?, personLct = ?, personCountry = ?, personType = ? WHERE personUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonDao_JdbcKt$update$lambda(entity)); }; function PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Person (personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING personUid'; } else tmp$ = ''; return "INSERT INTO Person (personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES(COALESCE(?,nextval('Person_personUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personUid); } stmt.setString_vqvrqt$(2, entity.username); stmt.setString_vqvrqt$(3, entity.firstNames); stmt.setString_vqvrqt$(4, entity.lastName); stmt.setString_vqvrqt$(5, entity.emailAddr); stmt.setString_vqvrqt$(6, entity.phoneNum); stmt.setInt_vux9f0$(7, entity.gender); stmt.setBoolean_fzusl$(8, entity.active); stmt.setBoolean_fzusl$(9, entity.admin); stmt.setString_vqvrqt$(10, entity.personNotes); stmt.setString_vqvrqt$(11, entity.fatherName); stmt.setString_vqvrqt$(12, entity.fatherNumber); stmt.setString_vqvrqt$(13, entity.motherName); stmt.setString_vqvrqt$(14, entity.motherNum); stmt.setLong_6svq3l$(15, entity.dateOfBirth); stmt.setString_vqvrqt$(16, entity.personAddress); stmt.setString_vqvrqt$(17, entity.personOrgId); stmt.setLong_6svq3l$(18, entity.personGroupUid); stmt.setLong_6svq3l$(19, entity.personMasterChangeSeqNum); stmt.setLong_6svq3l$(20, entity.personLocalChangeSeqNum); stmt.setInt_vux9f0$(21, entity.personLastChangedBy); stmt.setLong_6svq3l$(22, entity.personLct); stmt.setString_vqvrqt$(23, entity.personCountry); stmt.setInt_vux9f0$(24, entity.personType); }; PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO Person (personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING personUid'; } else tmp$ = ''; return "INSERT INTO Person (personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES(COALESCE(?,nextval('Person_personUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (personUid) DO UPDATE SET username = excluded.username,firstNames = excluded.firstNames,lastName = excluded.lastName,emailAddr = excluded.emailAddr,phoneNum = excluded.phoneNum,gender = excluded.gender,active = excluded.active,admin = excluded.admin,personNotes = excluded.personNotes,fatherName = excluded.fatherName,fatherNumber = excluded.fatherNumber,motherName = excluded.motherName,motherNum = excluded.motherNum,dateOfBirth = excluded.dateOfBirth,personAddress = excluded.personAddress,personOrgId = excluded.personOrgId,personGroupUid = excluded.personGroupUid,personMasterChangeSeqNum = excluded.personMasterChangeSeqNum,personLocalChangeSeqNum = excluded.personLocalChangeSeqNum,personLastChangedBy = excluded.personLastChangedBy,personLct = excluded.personLct,personCountry = excluded.personCountry,personType = excluded.personType" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personUid); } stmt.setString_vqvrqt$(2, entity.username); stmt.setString_vqvrqt$(3, entity.firstNames); stmt.setString_vqvrqt$(4, entity.lastName); stmt.setString_vqvrqt$(5, entity.emailAddr); stmt.setString_vqvrqt$(6, entity.phoneNum); stmt.setInt_vux9f0$(7, entity.gender); stmt.setBoolean_fzusl$(8, entity.active); stmt.setBoolean_fzusl$(9, entity.admin); stmt.setString_vqvrqt$(10, entity.personNotes); stmt.setString_vqvrqt$(11, entity.fatherName); stmt.setString_vqvrqt$(12, entity.fatherNumber); stmt.setString_vqvrqt$(13, entity.motherName); stmt.setString_vqvrqt$(14, entity.motherNum); stmt.setLong_6svq3l$(15, entity.dateOfBirth); stmt.setString_vqvrqt$(16, entity.personAddress); stmt.setString_vqvrqt$(17, entity.personOrgId); stmt.setLong_6svq3l$(18, entity.personGroupUid); stmt.setLong_6svq3l$(19, entity.personMasterChangeSeqNum); stmt.setLong_6svq3l$(20, entity.personLocalChangeSeqNum); stmt.setInt_vux9f0$(21, entity.personLastChangedBy); stmt.setLong_6svq3l$(22, entity.personLct); stmt.setString_vqvrqt$(23, entity.personCountry); stmt.setInt_vux9f0$(24, entity.personType); }; PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO AccessToken (token, accessTokenPersonUid, expires) VALUES(?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING token'; } else tmp$ = ''; return 'INSERT INTO AccessToken (token, accessTokenPersonUid, expires) VALUES(?, ?, ?)' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setString_vqvrqt$(1, entity.token); stmt.setLong_6svq3l$(2, entity.accessTokenPersonUid); stmt.setLong_6svq3l$(3, entity.expires); }; PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonAuth (personAuthUid, passwordHash, personAuthStatus) VALUES(?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING personAuthUid'; } else tmp$ = ''; return "INSERT INTO PersonAuth (personAuthUid, passwordHash, personAuthStatus) VALUES(COALESCE(?,nextval('PersonAuth_personAuthUid_seq')), ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personAuthUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personAuthUid); } stmt.setString_vqvrqt$(2, entity.passwordHash); stmt.setInt_vux9f0$(3, entity.personAuthStatus); }; PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonGroup (groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING groupUid'; } else tmp$ = ''; return "INSERT INTO PersonGroup (groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES(COALESCE(?,nextval('PersonGroup_groupUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupUid); } stmt.setLong_6svq3l$(2, entity.groupMasterCsn); stmt.setLong_6svq3l$(3, entity.groupLocalCsn); stmt.setInt_vux9f0$(4, entity.groupLastChangedBy); stmt.setLong_6svq3l$(5, entity.groupLct); stmt.setString_vqvrqt$(6, entity.groupName); stmt.setBoolean_fzusl$(7, entity.groupActive); stmt.setInt_vux9f0$(8, entity.personGroupFlag); }; PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonGroupMember (groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING groupMemberUid'; } else tmp$ = ''; return "INSERT INTO PersonGroupMember (groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES(COALESCE(?,nextval('PersonGroupMember_groupMemberUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupMemberUid); } stmt.setBoolean_fzusl$(2, entity.groupMemberActive); stmt.setLong_6svq3l$(3, entity.groupMemberPersonUid); stmt.setLong_6svq3l$(4, entity.groupMemberGroupUid); stmt.setLong_6svq3l$(5, entity.groupMemberMasterCsn); stmt.setLong_6svq3l$(6, entity.groupMemberLocalCsn); stmt.setInt_vux9f0$(7, entity.groupMemberLastChangedBy); stmt.setLong_6svq3l$(8, entity.groupMemberLct); }; PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO AuditLog (auditLogUid, auditLogMasterChangeSeqNum, auditLogLocalChangeSeqNum, auditLogLastChangedBy, auditLogLct, auditLogActorPersonUid, auditLogTableUid, auditLogEntityUid, auditLogDate, notes) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING auditLogUid'; } else tmp$ = ''; return "INSERT INTO AuditLog (auditLogUid, auditLogMasterChangeSeqNum, auditLogLocalChangeSeqNum, auditLogLastChangedBy, auditLogLct, auditLogActorPersonUid, auditLogTableUid, auditLogEntityUid, auditLogDate, notes) VALUES(COALESCE(?,nextval('AuditLog_auditLogUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.auditLogUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.auditLogUid); } stmt.setLong_6svq3l$(2, entity.auditLogMasterChangeSeqNum); stmt.setLong_6svq3l$(3, entity.auditLogLocalChangeSeqNum); stmt.setInt_vux9f0$(4, entity.auditLogLastChangedBy); stmt.setLong_6svq3l$(5, entity.auditLogLct); stmt.setLong_6svq3l$(6, entity.auditLogActorPersonUid); stmt.setInt_vux9f0$(7, entity.auditLogTableUid); stmt.setLong_6svq3l$(8, entity.auditLogEntityUid); stmt.setLong_6svq3l$(9, entity.auditLogDate); stmt.setString_vqvrqt$(10, entity.notes); }; PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao_JdbcKt', interfaces: [PersonDao]}; function PersonDao_ReplicateWrapper(_db, _dao) { PersonDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_123($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_123.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_123.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_123.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_123; Coroutine$replicateOnNewNode_s8cxhz$_123.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_123(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_126($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_126.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_126.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_126.prototype.constructor = Coroutine$replicateOnChange_126; Coroutine$replicateOnChange_126.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_126(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_15($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_15.prototype.constructor = Coroutine$insertListAsync_15; Coroutine$insertListAsync_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.personUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.personUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.personLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_15(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_0($this, person_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$person = person_0; } Coroutine$insertOrReplace_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_0.prototype.constructor = Coroutine$insertOrReplace_0; Coroutine$insertOrReplace_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$person.personUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$person.personUid = _newPk; this.state_0 = 3; continue; case 3: this.local$person.personLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertOrReplace(this.local$person, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertOrReplace = function (person_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_0(this, person_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_ReplicateWrapper.prototype.findByUsernameCount_61zpoe$ = function (username, continuation) { return this._dao_0.findByUsernameCount_61zpoe$(username, continuation); }; PersonDao_ReplicateWrapper.prototype.isValidToken_4wgjuj$ = function (token, personUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.insertAccessToken_sz9w29$ = function (token) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findUidAndPasswordHashAsync_61zpoe$ = function (username, continuation) { return this._dao_0.findUidAndPasswordHashAsync_61zpoe$(username, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUsernameAndPasswordHash2_puj7f4$ = function (username, passwordHash, continuation) { return this._dao_0.findByUsernameAndPasswordHash2_puj7f4$(username, passwordHash, continuation); }; PersonDao_ReplicateWrapper.prototype.insertPersonAuth_k01yar$ = function (personAuth) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.personHasPermissionAsync_b9bd0d$ = function (accountPersonUid, personUid, permission, continuation) { return this._dao_0.personHasPermissionAsync_b9bd0d$(accountPersonUid, personUid, permission, continuation); }; PersonDao_ReplicateWrapper.prototype.personIsAdmin_s8cxhz$ = function (accountPersonUid, continuation) { return this._dao_0.personIsAdmin_s8cxhz$(accountPersonUid, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUsername_pdl1vj$ = function (username) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findSystemAccount_s8cxhz$ = function (nodeId, continuation) { return this._dao_0.findSystemAccount_s8cxhz$(nodeId, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUid = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findPersonAccountByUid = function (uid, continuation) { return this._dao_0.findPersonAccountByUid(uid, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; PersonDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; PersonDao_ReplicateWrapper.prototype.updateAsync_6c9i1n$ = function (entity, continuation) { entity.personLct = systemTimeInMillis(); return this._dao_0.updateAsync_6c9i1n$(entity, continuation); }; function Coroutine$insertPersonGroup_j5378c$_0($this, personGroup_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroup = personGroup_0; } Coroutine$insertPersonGroup_j5378c$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroup_j5378c$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroup_j5378c$_0.prototype.constructor = Coroutine$insertPersonGroup_j5378c$_0; Coroutine$insertPersonGroup_j5378c$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$personGroup.groupUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(43, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$personGroup.groupUid = _newPk; this.state_0 = 3; continue; case 3: this.local$personGroup.groupLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertPersonGroup_j5378c$(this.local$personGroup, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$personGroup.groupUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertPersonGroup_j5378c$ = function (personGroup_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroup_j5378c$_0(this, personGroup_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroupMember_gftcgu$_0($this, personGroupMember_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupMember = personGroupMember_0; } Coroutine$insertPersonGroupMember_gftcgu$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroupMember_gftcgu$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroupMember_gftcgu$_0.prototype.constructor = Coroutine$insertPersonGroupMember_gftcgu$_0; Coroutine$insertPersonGroupMember_gftcgu$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$personGroupMember.groupMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(44, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$personGroupMember.groupMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$personGroupMember.groupMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertPersonGroupMember_gftcgu$(this.local$personGroupMember, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$personGroupMember.groupMemberUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertPersonGroupMember_gftcgu$ = function (personGroupMember_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroupMember_gftcgu$_0(this, personGroupMember_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_ReplicateWrapper.prototype.findPersonsWithPermission_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { return this._dao_0.findPersonsWithPermission_gs5uuz$(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); }; PersonDao_ReplicateWrapper.prototype.findPersonsWithPermissionAsList_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findByUidWithDisplayDetailsLive_3pjtqy$ = function (personUid, activeUserPersonUid) { return this._dao_0.findByUidWithDisplayDetailsLive_3pjtqy$(personUid, activeUserPersonUid); }; PersonDao_ReplicateWrapper.prototype.insertAuditLog_6gshjl$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.getAllPerson = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_133($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_133.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_133.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_133.prototype.constructor = Coroutine$insertAsync_133; Coroutine$insertAsync_133.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.personUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.personUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.personLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.personUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_133(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao_ReplicateWrapper', interfaces: [PersonDao]}; function PersonDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_124($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_124.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_124.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_124.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_124; Coroutine$replicateOnNewNode_s8cxhz$_124.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_124(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_127($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_127.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_127.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_127.prototype.constructor = Coroutine$replicateOnChange_127; Coroutine$replicateOnChange_127.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_127(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_16($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_16.prototype.constructor = Coroutine$insertListAsync_16; Coroutine$insertListAsync_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_16(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_1($this, person_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$person = person_0; } Coroutine$insertOrReplace_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_1.prototype.constructor = Coroutine$insertOrReplace_1; Coroutine$insertOrReplace_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertOrReplace(this.local$person, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertOrReplace = function (person_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_1(this, person_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUsernameCount_61zpoe$_0($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; } Coroutine$findByUsernameCount_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsernameCount_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsernameCount_61zpoe$_0.prototype.constructor = Coroutine$findByUsernameCount_61zpoe$_0; Coroutine$findByUsernameCount_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUsernameCount_61zpoe$(this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findByUsernameCount_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findByUsernameCount_61zpoe$_0(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.isValidToken_4wgjuj$ = function (token, personUid) { var _result = this._dao.isValidToken_4wgjuj$(token, personUid); return _result; }; PersonDao_Repo.prototype.insertAccessToken_sz9w29$ = function (token) { this._dao.insertAccessToken_sz9w29$(token); }; function Coroutine$findUidAndPasswordHashAsync_61zpoe$_0($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; } Coroutine$findUidAndPasswordHashAsync_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUidAndPasswordHashAsync_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUidAndPasswordHashAsync_61zpoe$_0.prototype.constructor = Coroutine$findUidAndPasswordHashAsync_61zpoe$_0; Coroutine$findUidAndPasswordHashAsync_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findUidAndPasswordHashAsync_61zpoe$(this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findUidAndPasswordHashAsync_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findUidAndPasswordHashAsync_61zpoe$_0(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0($this, username_0, passwordHash_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; this.local$passwordHash = passwordHash_0; } Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0.prototype.constructor = Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0; Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUsernameAndPasswordHash2_puj7f4$(this.local$username, this.local$passwordHash, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findByUsernameAndPasswordHash2_puj7f4$ = function (username_0, passwordHash_0, continuation_0, suspended) { var instance = new Coroutine$findByUsernameAndPasswordHash2_puj7f4$_0(this, username_0, passwordHash_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.insertPersonAuth_k01yar$ = function (personAuth) { this._dao.insertPersonAuth_k01yar$(personAuth); }; function Coroutine$personHasPermissionAsync_b9bd0d$_0($this, accountPersonUid_0, personUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$personUid = personUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionAsync_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionAsync_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionAsync_b9bd0d$_0.prototype.constructor = Coroutine$personHasPermissionAsync_b9bd0d$_0; Coroutine$personHasPermissionAsync_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionAsync_b9bd0d$(this.local$accountPersonUid, this.local$personUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.personHasPermissionAsync_b9bd0d$ = function (accountPersonUid_0, personUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionAsync_b9bd0d$_0(this, accountPersonUid_0, personUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$personIsAdmin_s8cxhz$_0($this, accountPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; } Coroutine$personIsAdmin_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personIsAdmin_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personIsAdmin_s8cxhz$_0.prototype.constructor = Coroutine$personIsAdmin_s8cxhz$_0; Coroutine$personIsAdmin_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personIsAdmin_s8cxhz$(this.local$accountPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.personIsAdmin_s8cxhz$ = function (accountPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$personIsAdmin_s8cxhz$_0(this, accountPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findByUsername_pdl1vj$ = function (username) { var _result = this._dao.findByUsername_pdl1vj$(username); return _result; }; function Coroutine$findSystemAccount_s8cxhz$_0($this, nodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$nodeId = nodeId_0; } Coroutine$findSystemAccount_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSystemAccount_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSystemAccount_s8cxhz$_0.prototype.constructor = Coroutine$findSystemAccount_s8cxhz$_0; Coroutine$findSystemAccount_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSystemAccount_s8cxhz$(this.local$nodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findSystemAccount_s8cxhz$ = function (nodeId_0, continuation_0, suspended) { var instance = new Coroutine$findSystemAccount_s8cxhz$_0(this, nodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findByUid = function (uid) { var _result = this._dao.findByUid(uid); return _result; }; function Coroutine$findPersonAccountByUid_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findPersonAccountByUid_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findPersonAccountByUid_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findPersonAccountByUid_0.prototype.constructor = Coroutine$findPersonAccountByUid_0; Coroutine$findPersonAccountByUid_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findPersonAccountByUid(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findPersonAccountByUid = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findPersonAccountByUid_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_25($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_25.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_25; Coroutine$findByUidAsync_s8cxhz$_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_25(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_6c9i1n$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_6c9i1n$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6c9i1n$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6c9i1n$_0.prototype.constructor = Coroutine$updateAsync_6c9i1n$_0; Coroutine$updateAsync_6c9i1n$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_6c9i1n$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.updateAsync_6c9i1n$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6c9i1n$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroup_j5378c$_1($this, personGroup_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroup = personGroup_0; } Coroutine$insertPersonGroup_j5378c$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroup_j5378c$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroup_j5378c$_1.prototype.constructor = Coroutine$insertPersonGroup_j5378c$_1; Coroutine$insertPersonGroup_j5378c$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertPersonGroup_j5378c$(this.local$personGroup, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertPersonGroup_j5378c$ = function (personGroup_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroup_j5378c$_1(this, personGroup_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroupMember_gftcgu$_1($this, personGroupMember_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupMember = personGroupMember_0; } Coroutine$insertPersonGroupMember_gftcgu$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroupMember_gftcgu$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroupMember_gftcgu$_1.prototype.constructor = Coroutine$insertPersonGroupMember_gftcgu$_1; Coroutine$insertPersonGroupMember_gftcgu$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertPersonGroupMember_gftcgu$(this.local$personGroupMember, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertPersonGroupMember_gftcgu$ = function (personGroupMember_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroupMember_gftcgu$_1(this, personGroupMember_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findPersonsWithPermission_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { var _result = this._dao.findPersonsWithPermission_gs5uuz$(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); return _result; }; PersonDao_Repo.prototype.findPersonsWithPermissionAsList_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { var _result = this._dao.findPersonsWithPermissionAsList_gs5uuz$(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); return _result; }; PersonDao_Repo.prototype.findByUidWithDisplayDetailsLive_3pjtqy$ = function (personUid, activeUserPersonUid) { var _result = this._dao.findByUidWithDisplayDetailsLive_3pjtqy$(personUid, activeUserPersonUid); return _result; }; PersonDao_Repo.prototype.insertAuditLog_6gshjl$ = function (entity) { var _result = this._dao.insertAuditLog_6gshjl$(entity); return _result; }; PersonDao_Repo.prototype.getAllPerson = function () { var _result = this._dao.getAllPerson(); return _result; }; PersonDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_134($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_134.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_134.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_134.prototype.constructor = Coroutine$insertAsync_134; Coroutine$insertAsync_134.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_134(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao_Repo', interfaces: [PersonDao]}; function PersonGroupDao_JdbcKt(_db) { PersonGroupDao.call(this); this._db = _db; this._insertAdapterPersonGroup_ = new PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(this._db); } function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_125($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_125.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_125.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_125.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_125; Coroutine$replicateOnNewNode_s8cxhz$_125.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | ? AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN PersonGroup\n | ON PersonGroup.groupUid = PersonsWithPerm_GroupMember.groupMemberGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | ? AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN PersonGroup\n | ON PersonGroup.groupUid = PersonsWithPerm_GroupMember.groupMemberGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_125(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_128($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_128.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_128.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_128.prototype.constructor = Coroutine$replicateOnChange_128; Coroutine$replicateOnChange_128.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = PersonGroup.groupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE \n | UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | \n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = PersonGroup.groupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE \n | UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | \n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_128(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeClazzBased($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased.prototype.constructor = Coroutine$replicateOnChangeClazzBased; Coroutine$replicateOnChangeClazzBased.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangePersonBased($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased.prototype.constructor = Coroutine$replicateOnChangePersonBased; Coroutine$replicateOnChangePersonBased.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person \n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person \n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodePersonBased_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$; Coroutine$replicateOnNewNodePersonBased_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Person.personUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Person.personUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeSchoolBased($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased.prototype.constructor = Coroutine$replicateOnChangeSchoolBased; Coroutine$replicateOnChangeSchoolBased.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_groupUid = _resultSet.getLong_61zpoe$('groupUid'); var tmp_groupMasterCsn = _resultSet.getLong_61zpoe$('groupMasterCsn'); var tmp_groupLocalCsn = _resultSet.getLong_61zpoe$('groupLocalCsn'); var tmp_groupLastChangedBy = _resultSet.getInt_61zpoe$('groupLastChangedBy'); var tmp_groupLct = _resultSet.getLong_61zpoe$('groupLct'); var tmp_groupName = _resultSet.getString_61zpoe$('groupName'); var tmp_groupActive = _resultSet.getBoolean_61zpoe$('groupActive'); var tmp_personGroupFlag = _resultSet.getInt_61zpoe$('personGroupFlag'); var _entity = new PersonGroup(); _entity.groupUid = tmp_groupUid; _entity.groupMasterCsn = tmp_groupMasterCsn; _entity.groupLocalCsn = tmp_groupLocalCsn; _entity.groupLastChangedBy = tmp_groupLastChangedBy; _entity.groupLct = tmp_groupLct; _entity.groupName = tmp_groupName; _entity.groupActive = tmp_groupActive; _entity.personGroupFlag = tmp_personGroupFlag; closure$_result.v = _entity; }return Unit; }; } function PersonGroupDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), PersonGroupDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } PersonGroupDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonGroup) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonGroup WHERE groupUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonGroup WHERE groupUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, PersonGroupDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function PersonGroupDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_groupUid = _resultSet.getLong_61zpoe$('groupUid'); var tmp_groupMasterCsn = _resultSet.getLong_61zpoe$('groupMasterCsn'); var tmp_groupLocalCsn = _resultSet.getLong_61zpoe$('groupLocalCsn'); var tmp_groupLastChangedBy = _resultSet.getInt_61zpoe$('groupLastChangedBy'); var tmp_groupLct = _resultSet.getLong_61zpoe$('groupLct'); var tmp_groupName = _resultSet.getString_61zpoe$('groupName'); var tmp_groupActive = _resultSet.getBoolean_61zpoe$('groupActive'); var tmp_personGroupFlag = _resultSet.getInt_61zpoe$('personGroupFlag'); var _entity = new PersonGroup(); _entity.groupUid = tmp_groupUid; _entity.groupMasterCsn = tmp_groupMasterCsn; _entity.groupLocalCsn = tmp_groupLocalCsn; _entity.groupLastChangedBy = tmp_groupLastChangedBy; _entity.groupLct = tmp_groupLct; _entity.groupName = tmp_groupName; _entity.groupActive = tmp_groupActive; _entity.personGroupFlag = tmp_personGroupFlag; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda; Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_26($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_26.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_26; Coroutine$findByUidAsync_s8cxhz$_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonGroup) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonGroup WHERE groupUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonGroup WHERE groupUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_26(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_groupUid = _resultSet.getLong_61zpoe$('groupUid'); var tmp_groupMasterCsn = _resultSet.getLong_61zpoe$('groupMasterCsn'); var tmp_groupLocalCsn = _resultSet.getLong_61zpoe$('groupLocalCsn'); var tmp_groupLastChangedBy = _resultSet.getInt_61zpoe$('groupLastChangedBy'); var tmp_groupLct = _resultSet.getLong_61zpoe$('groupLct'); var tmp_groupName = _resultSet.getString_61zpoe$('groupName'); var tmp_groupActive = _resultSet.getBoolean_61zpoe$('groupActive'); var tmp_personGroupFlag = _resultSet.getInt_61zpoe$('personGroupFlag'); var _entity = new PersonGroup(); _entity.groupUid = tmp_groupUid; _entity.groupMasterCsn = tmp_groupMasterCsn; _entity.groupLocalCsn = tmp_groupLocalCsn; _entity.groupLastChangedBy = tmp_groupLastChangedBy; _entity.groupLct = tmp_groupLct; _entity.groupName = tmp_groupName; _entity.groupActive = tmp_groupActive; _entity.personGroupFlag = tmp_personGroupFlag; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda(this$PersonGroupDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonGroupDao_JdbcKt = this$PersonGroupDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonGroup) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonGroup WHERE groupUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonGroup WHERE groupUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonGroupDao_JdbcKt._db, _stmtConfig, PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findByUidLive$lambda(this$PersonGroupDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda(this$PersonGroupDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('PersonGroup'), PersonGroupDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda; Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.groupMasterCsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.groupLocalCsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.groupLastChangedBy); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.groupLct); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.groupName); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.groupActive); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$entity.personGroupFlag); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.groupUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_j5378c$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_j5378c$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_j5378c$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_j5378c$.prototype.constructor = Coroutine$updateAsync_j5378c$; Coroutine$updateAsync_j5378c$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE PersonGroup SET groupMasterCsn = ?, groupLocalCsn = ?, groupLastChangedBy = ?, groupLct = ?, groupName = ?, groupActive = ?, personGroupFlag = ? WHERE groupUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonGroupDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.updateAsync_j5378c$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_j5378c$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupDao_JdbcKt$findNameByGroupUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(closure$groupUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$groupUid = closure$groupUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda; Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$groupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupDao_JdbcKt$findNameByGroupUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(closure$groupUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(closure$groupUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findNameByGroupUid_s8cxhz$($this, groupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$groupUid = groupUid_0; } Coroutine$findNameByGroupUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNameByGroupUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNameByGroupUid_s8cxhz$.prototype.constructor = Coroutine$findNameByGroupUid_s8cxhz$; Coroutine$findNameByGroupUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | Select CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM PersonGroup\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE PersonGroup.groupUid = ?\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | Select CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM PersonGroup\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE PersonGroup.groupUid = ?\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(this.local$groupUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.findNameByGroupUid_s8cxhz$ = function (groupUid_0, continuation_0, suspended) { var instance = new Coroutine$findNameByGroupUid_s8cxhz$(this, groupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonGroup_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_135($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_135.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_135.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_135.prototype.constructor = Coroutine$insertAsync_135; Coroutine$insertAsync_135.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroup_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_135(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonGroup_.insertList_4ezy5m$(entityList); }; function PersonGroupDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.groupMasterCsn); _stmt.setLong_6svq3l$(2, _entity.groupLocalCsn); _stmt.setInt_vux9f0$(3, _entity.groupLastChangedBy); _stmt.setLong_6svq3l$(4, _entity.groupLct); _stmt.setString_vqvrqt$(5, _entity.groupName); _stmt.setBoolean_fzusl$(6, _entity.groupActive); _stmt.setInt_vux9f0$(7, _entity.personGroupFlag); _stmt.setLong_6svq3l$(8, _entity.groupUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonGroupDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonGroup SET groupMasterCsn = ?, groupLocalCsn = ?, groupLastChangedBy = ?, groupLct = ?, groupName = ?, groupActive = ?, personGroupFlag = ? WHERE groupUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonGroupDao_JdbcKt$updateList$lambda(entityList)); }; function PersonGroupDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.groupMasterCsn); _stmt.setLong_6svq3l$(2, closure$entity.groupLocalCsn); _stmt.setInt_vux9f0$(3, closure$entity.groupLastChangedBy); _stmt.setLong_6svq3l$(4, closure$entity.groupLct); _stmt.setString_vqvrqt$(5, closure$entity.groupName); _stmt.setBoolean_fzusl$(6, closure$entity.groupActive); _stmt.setInt_vux9f0$(7, closure$entity.personGroupFlag); _stmt.setLong_6svq3l$(8, closure$entity.groupUid); return _stmt.executeUpdate(); }; } PersonGroupDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonGroup SET groupMasterCsn = ?, groupLocalCsn = ?, groupLastChangedBy = ?, groupLct = ?, groupName = ?, groupActive = ?, personGroupFlag = ? WHERE groupUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonGroupDao_JdbcKt$update$lambda(entity)); }; function PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonGroup (groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING groupUid'; } else tmp$ = ''; return "INSERT INTO PersonGroup (groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES(COALESCE(?,nextval('PersonGroup_groupUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupUid); } stmt.setLong_6svq3l$(2, entity.groupMasterCsn); stmt.setLong_6svq3l$(3, entity.groupLocalCsn); stmt.setInt_vux9f0$(4, entity.groupLastChangedBy); stmt.setLong_6svq3l$(5, entity.groupLct); stmt.setString_vqvrqt$(6, entity.groupName); stmt.setBoolean_fzusl$(7, entity.groupActive); stmt.setInt_vux9f0$(8, entity.personGroupFlag); }; PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonGroupDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao_JdbcKt', interfaces: [PersonGroupDao]}; function PersonGroupDao_ReplicateWrapper(_db, _dao) { PersonGroupDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_126($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_126.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_126.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_126.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_126; Coroutine$replicateOnNewNode_s8cxhz$_126.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_126(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_129($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_129.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_129.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_129.prototype.constructor = Coroutine$replicateOnChange_129; Coroutine$replicateOnChange_129.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_129(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_0.prototype.constructor = Coroutine$replicateOnChangeClazzBased_0; Coroutine$replicateOnChangeClazzBased_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_0.prototype.constructor = Coroutine$replicateOnChangePersonBased_0; Coroutine$replicateOnChangePersonBased_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_0.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_0; Coroutine$replicateOnChangeSchoolBased_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; PersonGroupDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; PersonGroupDao_ReplicateWrapper.prototype.updateAsync_j5378c$ = function (entity, continuation) { entity.groupLct = systemTimeInMillis(); return this._dao_0.updateAsync_j5378c$(entity, continuation); }; PersonGroupDao_ReplicateWrapper.prototype.findNameByGroupUid_s8cxhz$ = function (groupUid, continuation) { return this._dao_0.findNameByGroupUid_s8cxhz$(groupUid, continuation); }; PersonGroupDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_136($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_136.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_136.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_136.prototype.constructor = Coroutine$insertAsync_136; Coroutine$insertAsync_136.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.groupUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(43, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.groupUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.groupLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.groupUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_136(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao_ReplicateWrapper', interfaces: [PersonGroupDao]}; function PersonGroupDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonGroupDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_127($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_127.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_127.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_127.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_127; Coroutine$replicateOnNewNode_s8cxhz$_127.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_127(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_130($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_130.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_130.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_130.prototype.constructor = Coroutine$replicateOnChange_130; Coroutine$replicateOnChange_130.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_130(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_1.prototype.constructor = Coroutine$replicateOnChangeClazzBased_1; Coroutine$replicateOnChangeClazzBased_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_1.prototype.constructor = Coroutine$replicateOnChangePersonBased_1; Coroutine$replicateOnChangePersonBased_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_1.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_1; Coroutine$replicateOnChangeSchoolBased_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_27($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_27.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_27; Coroutine$findByUidAsync_s8cxhz$_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_27(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_j5378c$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_j5378c$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_j5378c$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_j5378c$_0.prototype.constructor = Coroutine$updateAsync_j5378c$_0; Coroutine$updateAsync_j5378c$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_j5378c$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.updateAsync_j5378c$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_j5378c$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findNameByGroupUid_s8cxhz$_0($this, groupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupUid = groupUid_0; } Coroutine$findNameByGroupUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNameByGroupUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNameByGroupUid_s8cxhz$_0.prototype.constructor = Coroutine$findNameByGroupUid_s8cxhz$_0; Coroutine$findNameByGroupUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findNameByGroupUid_s8cxhz$(this.local$groupUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.findNameByGroupUid_s8cxhz$ = function (groupUid_0, continuation_0, suspended) { var instance = new Coroutine$findNameByGroupUid_s8cxhz$_0(this, groupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_137($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_137.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_137.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_137.prototype.constructor = Coroutine$insertAsync_137; Coroutine$insertAsync_137.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_137(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonGroupDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonGroupDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonGroupDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao_Repo', interfaces: [PersonGroupDao]}; function PersonGroupMemberDao_JdbcKt(_db) { PersonGroupMemberDao.call(this); this._db = _db; this._insertAdapterPersonGroupMember_ = new PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(this._db); } function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_128($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_128.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_128.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_128.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_128; Coroutine$replicateOnNewNode_s8cxhz$_128.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_128(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_131($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_131.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_131.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_131.prototype.constructor = Coroutine$replicateOnChange_131; Coroutine$replicateOnChange_131.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_131(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeClazzBased_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_2.prototype.constructor = Coroutine$replicateOnChangeClazzBased_2; Coroutine$replicateOnChangeClazzBased_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeSchoolBased_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_2.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_2; Coroutine$replicateOnChangeSchoolBased_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 164\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 164\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_groupMemberUid = _resultSet.getLong_61zpoe$('groupMemberUid'); var tmp_groupMemberActive = _resultSet.getBoolean_61zpoe$('groupMemberActive'); var tmp_groupMemberPersonUid = _resultSet.getLong_61zpoe$('groupMemberPersonUid'); var tmp_groupMemberGroupUid = _resultSet.getLong_61zpoe$('groupMemberGroupUid'); var tmp_groupMemberMasterCsn = _resultSet.getLong_61zpoe$('groupMemberMasterCsn'); var tmp_groupMemberLocalCsn = _resultSet.getLong_61zpoe$('groupMemberLocalCsn'); var tmp_groupMemberLastChangedBy = _resultSet.getInt_61zpoe$('groupMemberLastChangedBy'); var tmp_groupMemberLct = _resultSet.getLong_61zpoe$('groupMemberLct'); var _entity = new PersonGroupMember(); _entity.groupMemberUid = tmp_groupMemberUid; _entity.groupMemberActive = tmp_groupMemberActive; _entity.groupMemberPersonUid = tmp_groupMemberPersonUid; _entity.groupMemberGroupUid = tmp_groupMemberGroupUid; _entity.groupMemberMasterCsn = tmp_groupMemberMasterCsn; _entity.groupMemberLocalCsn = tmp_groupMemberLocalCsn; _entity.groupMemberLastChangedBy = tmp_groupMemberLastChangedBy; _entity.groupMemberLct = tmp_groupMemberLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllGroupWherePersonIsIn_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; } Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.prototype.constructor = Coroutine$findAllGroupWherePersonIsIn_s8cxhz$; Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonGroupMember WHERE groupMemberPersonUid = ? AND PersonGroupMember.groupMemberActive', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonGroupMember WHERE groupMemberPersonUid = ? AND PersonGroupMember.groupMemberActive\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.findAllGroupWherePersonIsIn_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllGroupWherePersonIsIn_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_groupMemberUid = _resultSet.getLong_61zpoe$('groupMemberUid'); var tmp_groupMemberActive = _resultSet.getBoolean_61zpoe$('groupMemberActive'); var tmp_groupMemberPersonUid = _resultSet.getLong_61zpoe$('groupMemberPersonUid'); var tmp_groupMemberGroupUid = _resultSet.getLong_61zpoe$('groupMemberGroupUid'); var tmp_groupMemberMasterCsn = _resultSet.getLong_61zpoe$('groupMemberMasterCsn'); var tmp_groupMemberLocalCsn = _resultSet.getLong_61zpoe$('groupMemberLocalCsn'); var tmp_groupMemberLastChangedBy = _resultSet.getInt_61zpoe$('groupMemberLastChangedBy'); var tmp_groupMemberLct = _resultSet.getLong_61zpoe$('groupMemberLct'); var _entity = new PersonGroupMember(); _entity.groupMemberUid = tmp_groupMemberUid; _entity.groupMemberActive = tmp_groupMemberActive; _entity.groupMemberPersonUid = tmp_groupMemberPersonUid; _entity.groupMemberGroupUid = tmp_groupMemberGroupUid; _entity.groupMemberMasterCsn = tmp_groupMemberMasterCsn; _entity.groupMemberLocalCsn = tmp_groupMemberLocalCsn; _entity.groupMemberLastChangedBy = tmp_groupMemberLastChangedBy; _entity.groupMemberLct = tmp_groupMemberLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(closure$groupUid_0, closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$groupUid = closure$groupUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$groupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(closure$groupUid_0, closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(closure$groupUid_0, closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$checkPersonBelongsToGroup_3pjtqy$($this, groupUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$groupUid = groupUid_0; this.local$personUid = personUid_0; } Coroutine$checkPersonBelongsToGroup_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$checkPersonBelongsToGroup_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$checkPersonBelongsToGroup_3pjtqy$.prototype.constructor = Coroutine$checkPersonBelongsToGroup_3pjtqy$; Coroutine$checkPersonBelongsToGroup_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM PersonGroupMember WHERE groupMemberGroupUid = ? \n | AND groupMemberPersonUid = ? AND PersonGroupMember.groupMemberActive\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonGroupMember WHERE groupMemberGroupUid = ? \n | AND groupMemberPersonUid = ? AND PersonGroupMember.groupMemberActive\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(this.local$groupUid, this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.checkPersonBelongsToGroup_3pjtqy$ = function (groupUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$checkPersonBelongsToGroup_3pjtqy$(this, groupUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(closure$newGroup_0, closure$changeTime_0, closure$personUid_0, closure$oldGroup_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newGroup = closure$newGroup_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$oldGroup = closure$oldGroup_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newGroup); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$oldGroup); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return this.local$closure$_result.v = _numUpdates, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(closure$newGroup_0, closure$changeTime_0, closure$personUid_0, closure$oldGroup_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(closure$newGroup_0, closure$changeTime_0, closure$personUid_0, closure$oldGroup_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$moveGroupAsync_9xn71c$($this, personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; this.local$newGroup = newGroup_0; this.local$oldGroup = oldGroup_0; this.local$changeTime = changeTime_0; } Coroutine$moveGroupAsync_9xn71c$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveGroupAsync_9xn71c$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveGroupAsync_9xn71c$.prototype.constructor = Coroutine$moveGroupAsync_9xn71c$; Coroutine$moveGroupAsync_9xn71c$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE PersonGroupMember \n | SET groupMemberGroupUid = ?,\n | groupMemberLct = ?\n | WHERE groupMemberPersonUid = ? \n | AND groupMemberGroupUid = ? \n | AND PersonGroupMember.groupMemberActive\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE PersonGroupMember \n | SET groupMemberGroupUid = ?,\n | groupMemberLct = ?\n | WHERE groupMemberPersonUid = ? \n | AND groupMemberGroupUid = ? \n | AND PersonGroupMember.groupMemberActive\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(this.local$newGroup, this.local$changeTime, this.local$personUid, this.local$oldGroup, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.moveGroupAsync_9xn71c$ = function (personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$moveGroupAsync_9xn71c$(this, personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(closure$activeStatus_0, closure$updateTime_0, closure$personUid_0, closure$groupUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$activeStatus = closure$activeStatus_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$groupUid = closure$groupUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$activeStatus); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$groupUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(closure$activeStatus_0, closure$updateTime_0, closure$personUid_0, closure$groupUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(closure$activeStatus_0, closure$updateTime_0, closure$personUid_0, closure$groupUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateGroupMemberActive_u4hhv2$($this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$activeStatus = activeStatus_0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; this.local$updateTime = updateTime_0; } Coroutine$updateGroupMemberActive_u4hhv2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateGroupMemberActive_u4hhv2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateGroupMemberActive_u4hhv2$.prototype.constructor = Coroutine$updateGroupMemberActive_u4hhv2$; Coroutine$updateGroupMemberActive_u4hhv2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE PersonGroupMember \n | SET groupMemberActive = ?,\n | groupMemberLct = ?\n | WHERE groupMemberPersonUid = ? \n | AND groupMemberGroupUid = ? \n | AND PersonGroupMember.groupMemberActive\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE PersonGroupMember \n | SET groupMemberActive = ?,\n | groupMemberLct = ?\n | WHERE groupMemberPersonUid = ? \n | AND groupMemberGroupUid = ? \n | AND PersonGroupMember.groupMemberActive\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(this.local$activeStatus, this.local$updateTime, this.local$personUid, this.local$groupUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.updateGroupMemberActive_u4hhv2$ = function (activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateGroupMemberActive_u4hhv2$(this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_groupMemberUid = _resultSet.getLong_61zpoe$('groupMemberUid'); var tmp_groupMemberActive = _resultSet.getBoolean_61zpoe$('groupMemberActive'); var tmp_groupMemberPersonUid = _resultSet.getLong_61zpoe$('groupMemberPersonUid'); var tmp_groupMemberGroupUid = _resultSet.getLong_61zpoe$('groupMemberGroupUid'); var tmp_groupMemberMasterCsn = _resultSet.getLong_61zpoe$('groupMemberMasterCsn'); var tmp_groupMemberLocalCsn = _resultSet.getLong_61zpoe$('groupMemberLocalCsn'); var tmp_groupMemberLastChangedBy = _resultSet.getInt_61zpoe$('groupMemberLastChangedBy'); var tmp_groupMemberLct = _resultSet.getLong_61zpoe$('groupMemberLct'); var _entity = new PersonGroupMember(); _entity.groupMemberUid = tmp_groupMemberUid; _entity.groupMemberActive = tmp_groupMemberActive; _entity.groupMemberPersonUid = tmp_groupMemberPersonUid; _entity.groupMemberGroupUid = tmp_groupMemberGroupUid; _entity.groupMemberMasterCsn = tmp_groupMemberMasterCsn; _entity.groupMemberLocalCsn = tmp_groupMemberLocalCsn; _entity.groupMemberLastChangedBy = tmp_groupMemberLastChangedBy; _entity.groupMemberLct = tmp_groupMemberLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(closure$personUid_0, closure$groupUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$groupUid = closure$groupUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$groupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(closure$personUid_0, closure$groupUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(closure$personUid_0, closure$groupUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByPersonUidAndGroupUid_3pjtqy$($this, personUid_0, groupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; } Coroutine$findByPersonUidAndGroupUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAndGroupUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAndGroupUid_3pjtqy$.prototype.constructor = Coroutine$findByPersonUidAndGroupUid_3pjtqy$; Coroutine$findByPersonUidAndGroupUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonGroupMember) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonGroupMember.*\n | FROM PersonGroupMember\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberGroupUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonGroupMember.*\n | FROM PersonGroupMember\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberGroupUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(this.local$personUid, this.local$groupUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.findByPersonUidAndGroupUid_3pjtqy$ = function (personUid_0, groupUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAndGroupUid_3pjtqy$(this, personUid_0, groupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonGroupMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_138($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_138.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_138.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_138.prototype.constructor = Coroutine$insertAsync_138; Coroutine$insertAsync_138.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroupMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_138(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonGroupMember_.insertList_4ezy5m$(entityList); }; function PersonGroupMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setBoolean_fzusl$(1, _entity.groupMemberActive); _stmt.setLong_6svq3l$(2, _entity.groupMemberPersonUid); _stmt.setLong_6svq3l$(3, _entity.groupMemberGroupUid); _stmt.setLong_6svq3l$(4, _entity.groupMemberMasterCsn); _stmt.setLong_6svq3l$(5, _entity.groupMemberLocalCsn); _stmt.setInt_vux9f0$(6, _entity.groupMemberLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.groupMemberLct); _stmt.setLong_6svq3l$(8, _entity.groupMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonGroupMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonGroupMember SET groupMemberActive = ?, groupMemberPersonUid = ?, groupMemberGroupUid = ?, groupMemberMasterCsn = ?, groupMemberLocalCsn = ?, groupMemberLastChangedBy = ?, groupMemberLct = ? WHERE groupMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonGroupMemberDao_JdbcKt$updateList$lambda(entityList)); }; function PersonGroupMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$entity.groupMemberActive); _stmt.setLong_6svq3l$(2, closure$entity.groupMemberPersonUid); _stmt.setLong_6svq3l$(3, closure$entity.groupMemberGroupUid); _stmt.setLong_6svq3l$(4, closure$entity.groupMemberMasterCsn); _stmt.setLong_6svq3l$(5, closure$entity.groupMemberLocalCsn); _stmt.setInt_vux9f0$(6, closure$entity.groupMemberLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.groupMemberLct); _stmt.setLong_6svq3l$(8, closure$entity.groupMemberUid); return _stmt.executeUpdate(); }; } PersonGroupMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonGroupMember SET groupMemberActive = ?, groupMemberPersonUid = ?, groupMemberGroupUid = ?, groupMemberMasterCsn = ?, groupMemberLocalCsn = ?, groupMemberLastChangedBy = ?, groupMemberLct = ? WHERE groupMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonGroupMemberDao_JdbcKt$update$lambda(entity)); }; function PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonGroupMember (groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING groupMemberUid'; } else tmp$ = ''; return "INSERT INTO PersonGroupMember (groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES(COALESCE(?,nextval('PersonGroupMember_groupMemberUid_seq')), ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupMemberUid); } stmt.setBoolean_fzusl$(2, entity.groupMemberActive); stmt.setLong_6svq3l$(3, entity.groupMemberPersonUid); stmt.setLong_6svq3l$(4, entity.groupMemberGroupUid); stmt.setLong_6svq3l$(5, entity.groupMemberMasterCsn); stmt.setLong_6svq3l$(6, entity.groupMemberLocalCsn); stmt.setInt_vux9f0$(7, entity.groupMemberLastChangedBy); stmt.setLong_6svq3l$(8, entity.groupMemberLct); }; PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonGroupMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao_JdbcKt', interfaces: [PersonGroupMemberDao]}; function PersonGroupMemberDao_ReplicateWrapper(_db, _dao) { PersonGroupMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_129($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_129.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_129.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_129.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_129; Coroutine$replicateOnNewNode_s8cxhz$_129.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_129(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_132($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_132.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_132.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_132.prototype.constructor = Coroutine$replicateOnChange_132; Coroutine$replicateOnChange_132.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_132(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_3.prototype.constructor = Coroutine$replicateOnChangeClazzBased_3; Coroutine$replicateOnChangeClazzBased_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_3.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_3; Coroutine$replicateOnChangeSchoolBased_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_ReplicateWrapper.prototype.findAllGroupWherePersonIsIn_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findAllGroupWherePersonIsIn_s8cxhz$(personUid, continuation); }; PersonGroupMemberDao_ReplicateWrapper.prototype.checkPersonBelongsToGroup_3pjtqy$ = function (groupUid, personUid, continuation) { return this._dao_0.checkPersonBelongsToGroup_3pjtqy$(groupUid, personUid, continuation); }; PersonGroupMemberDao_ReplicateWrapper.prototype.moveGroupAsync_9xn71c$ = function (personUid, newGroup, oldGroup, changeTime, continuation) { return this._dao_0.moveGroupAsync_9xn71c$(personUid, newGroup, oldGroup, changeTime, continuation); }; function Coroutine$updateGroupMemberActive_u4hhv2$_0($this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$activeStatus = activeStatus_0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; this.local$updateTime = updateTime_0; } Coroutine$updateGroupMemberActive_u4hhv2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateGroupMemberActive_u4hhv2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateGroupMemberActive_u4hhv2$_0.prototype.constructor = Coroutine$updateGroupMemberActive_u4hhv2$_0; Coroutine$updateGroupMemberActive_u4hhv2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateGroupMemberActive_u4hhv2$(this.local$activeStatus, this.local$personUid, this.local$groupUid, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.updateGroupMemberActive_u4hhv2$ = function (activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateGroupMemberActive_u4hhv2$_0(this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_ReplicateWrapper.prototype.findByPersonUidAndGroupUid_3pjtqy$ = function (personUid, groupUid, continuation) { return this._dao_0.findByPersonUidAndGroupUid_3pjtqy$(personUid, groupUid, continuation); }; PersonGroupMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_139($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_139.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_139.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_139.prototype.constructor = Coroutine$insertAsync_139; Coroutine$insertAsync_139.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.groupMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(44, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.groupMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.groupMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.groupMemberUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_139(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao_ReplicateWrapper', interfaces: [PersonGroupMemberDao]}; function PersonGroupMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonGroupMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_130($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_130.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_130.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_130.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_130; Coroutine$replicateOnNewNode_s8cxhz$_130.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_130(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_133($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_133.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_133.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_133.prototype.constructor = Coroutine$replicateOnChange_133; Coroutine$replicateOnChange_133.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_133(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_4.prototype.constructor = Coroutine$replicateOnChangeClazzBased_4; Coroutine$replicateOnChangeClazzBased_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_4.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_4; Coroutine$replicateOnChangeSchoolBased_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0.prototype.constructor = Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0; Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllGroupWherePersonIsIn_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.findAllGroupWherePersonIsIn_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllGroupWherePersonIsIn_s8cxhz$_0(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$checkPersonBelongsToGroup_3pjtqy$_0($this, groupUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupUid = groupUid_0; this.local$personUid = personUid_0; } Coroutine$checkPersonBelongsToGroup_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$checkPersonBelongsToGroup_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$checkPersonBelongsToGroup_3pjtqy$_0.prototype.constructor = Coroutine$checkPersonBelongsToGroup_3pjtqy$_0; Coroutine$checkPersonBelongsToGroup_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.checkPersonBelongsToGroup_3pjtqy$(this.local$groupUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.checkPersonBelongsToGroup_3pjtqy$ = function (groupUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$checkPersonBelongsToGroup_3pjtqy$_0(this, groupUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$moveGroupAsync_9xn71c$_0($this, personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$newGroup = newGroup_0; this.local$oldGroup = oldGroup_0; this.local$changeTime = changeTime_0; } Coroutine$moveGroupAsync_9xn71c$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveGroupAsync_9xn71c$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveGroupAsync_9xn71c$_0.prototype.constructor = Coroutine$moveGroupAsync_9xn71c$_0; Coroutine$moveGroupAsync_9xn71c$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.moveGroupAsync_9xn71c$(this.local$personUid, this.local$newGroup, this.local$oldGroup, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.moveGroupAsync_9xn71c$ = function (personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$moveGroupAsync_9xn71c$_0(this, personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateGroupMemberActive_u4hhv2$_1($this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$activeStatus = activeStatus_0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; this.local$updateTime = updateTime_0; } Coroutine$updateGroupMemberActive_u4hhv2$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateGroupMemberActive_u4hhv2$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateGroupMemberActive_u4hhv2$_1.prototype.constructor = Coroutine$updateGroupMemberActive_u4hhv2$_1; Coroutine$updateGroupMemberActive_u4hhv2$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateGroupMemberActive_u4hhv2$(this.local$activeStatus, this.local$personUid, this.local$groupUid, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.updateGroupMemberActive_u4hhv2$ = function (activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateGroupMemberActive_u4hhv2$_1(this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0($this, personUid_0, groupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; } Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0.prototype.constructor = Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0; Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUidAndGroupUid_3pjtqy$(this.local$personUid, this.local$groupUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.findByPersonUidAndGroupUid_3pjtqy$ = function (personUid_0, groupUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAndGroupUid_3pjtqy$_0(this, personUid_0, groupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_140($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_140.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_140.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_140.prototype.constructor = Coroutine$insertAsync_140; Coroutine$insertAsync_140.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_140(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonGroupMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonGroupMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonGroupMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao_Repo', interfaces: [PersonGroupMemberDao]}; function PersonParentJoinDao_JdbcKt(_db) { PersonParentJoinDao.call(this); this._db = _db; this._insertAdapterPersonParentJoin_ = new PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral(this._db); } function Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_131($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_131.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_131.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_131.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_131; Coroutine$replicateOnNewNode_s8cxhz$_131.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjPk,\n | ? AS ppjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonParentJoin\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid \n | WHERE UserSession.usStatus = 1\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = ?), 0) \n | /*psql ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjPk,\n | ? AS ppjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonParentJoin\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid \n | WHERE UserSession.usStatus = 1\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = ?), 0) \n | ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_131(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_134($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_134.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_134.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_134.prototype.constructor = Coroutine$replicateOnChange_134; Coroutine$replicateOnChange_134.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjUid,\n | UserSession.usClientNodeId AS ppjDestination\n | FROM ChangeLog\n | JOIN PersonParentJoin\n | ON ChangeLog.chTableId = 512\n | AND ChangeLog.chEntityPk = PersonParentJoin.ppjUid\n | JOIN Person\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjUid,\n | UserSession.usClientNodeId AS ppjDestination\n | FROM ChangeLog\n | JOIN PersonParentJoin\n | ON ChangeLog.chTableId = 512\n | AND ChangeLog.chEntityPk = PersonParentJoin.ppjUid\n | JOIN Person\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_134(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_ei4fsf$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_ei4fsf$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_ei4fsf$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_ei4fsf$.prototype.constructor = Coroutine$insertAsync_ei4fsf$; Coroutine$insertAsync_ei4fsf$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonParentJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.insertAsync_ei4fsf$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_ei4fsf$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_ppjUid = _resultSet.getLong_61zpoe$('ppjUid'); var tmp_ppjPcsn = _resultSet.getLong_61zpoe$('ppjPcsn'); var tmp_ppjLcsn = _resultSet.getLong_61zpoe$('ppjLcsn'); var tmp_ppjLcb = _resultSet.getInt_61zpoe$('ppjLcb'); var tmp_ppjLct = _resultSet.getLong_61zpoe$('ppjLct'); var tmp_ppjParentPersonUid = _resultSet.getLong_61zpoe$('ppjParentPersonUid'); var tmp_ppjMinorPersonUid = _resultSet.getLong_61zpoe$('ppjMinorPersonUid'); var tmp_ppjRelationship = _resultSet.getInt_61zpoe$('ppjRelationship'); var tmp_ppjEmail = _resultSet.getString_61zpoe$('ppjEmail'); var tmp_ppjPhone = _resultSet.getString_61zpoe$('ppjPhone'); var tmp_ppjInactive = _resultSet.getBoolean_61zpoe$('ppjInactive'); var tmp_ppjStatus = _resultSet.getInt_61zpoe$('ppjStatus'); var tmp_ppjApprovalTiemstamp = _resultSet.getLong_61zpoe$('ppjApprovalTiemstamp'); var tmp_ppjApprovalIpAddr = _resultSet.getString_61zpoe$('ppjApprovalIpAddr'); var _entity = new PersonParentJoinWithMinorPerson(); _entity.ppjUid = tmp_ppjUid; _entity.ppjPcsn = tmp_ppjPcsn; _entity.ppjLcsn = tmp_ppjLcsn; _entity.ppjLcb = tmp_ppjLcb; _entity.ppjLct = tmp_ppjLct; _entity.ppjParentPersonUid = tmp_ppjParentPersonUid; _entity.ppjMinorPersonUid = tmp_ppjMinorPersonUid; _entity.ppjRelationship = tmp_ppjRelationship; _entity.ppjEmail = tmp_ppjEmail; _entity.ppjPhone = tmp_ppjPhone; _entity.ppjInactive = tmp_ppjInactive; _entity.ppjStatus = tmp_ppjStatus; _entity.ppjApprovalTiemstamp = tmp_ppjApprovalTiemstamp; _entity.ppjApprovalIpAddr = tmp_ppjApprovalIpAddr; var _minorPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }if (_minorPerson_nullFieldCount < 24) { if (_entity.minorPerson == null) { _entity.minorPerson = new Person(); }ensureNotNull(_entity.minorPerson).personUid = tmp_personUid; ensureNotNull(_entity.minorPerson).username = tmp_username; ensureNotNull(_entity.minorPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.minorPerson).lastName = tmp_lastName; ensureNotNull(_entity.minorPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.minorPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.minorPerson).gender = tmp_gender; ensureNotNull(_entity.minorPerson).active = tmp_active; ensureNotNull(_entity.minorPerson).admin = tmp_admin; ensureNotNull(_entity.minorPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.minorPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.minorPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.minorPerson).motherName = tmp_motherName; ensureNotNull(_entity.minorPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.minorPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.minorPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.minorPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.minorPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.minorPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.minorPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.minorPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.minorPerson).personLct = tmp_personLct; ensureNotNull(_entity.minorPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.minorPerson).personType = tmp_personType; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidWithMinorAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithMinorAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithMinorAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithMinorAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithMinorAsync_s8cxhz$; Coroutine$findByUidWithMinorAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonParentJoinWithMinorPerson) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.*, Person.*\n | FROM PersonParentJoin\n | LEFT JOIN Person ON Person.personUid = PersonParentJoin.ppjMinorPersonUid \n | WHERE PersonParentJoin.ppjUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonParentJoin.*, Person.*\n | FROM PersonParentJoin\n | LEFT JOIN Person ON Person.personUid = PersonParentJoin.ppjMinorPersonUid \n | WHERE PersonParentJoin.ppjUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.findByUidWithMinorAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithMinorAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_ppjUid = _resultSet.getLong_61zpoe$('ppjUid'); var tmp_ppjPcsn = _resultSet.getLong_61zpoe$('ppjPcsn'); var tmp_ppjLcsn = _resultSet.getLong_61zpoe$('ppjLcsn'); var tmp_ppjLcb = _resultSet.getInt_61zpoe$('ppjLcb'); var tmp_ppjLct = _resultSet.getLong_61zpoe$('ppjLct'); var tmp_ppjParentPersonUid = _resultSet.getLong_61zpoe$('ppjParentPersonUid'); var tmp_ppjMinorPersonUid = _resultSet.getLong_61zpoe$('ppjMinorPersonUid'); var tmp_ppjRelationship = _resultSet.getInt_61zpoe$('ppjRelationship'); var tmp_ppjEmail = _resultSet.getString_61zpoe$('ppjEmail'); var tmp_ppjPhone = _resultSet.getString_61zpoe$('ppjPhone'); var tmp_ppjInactive = _resultSet.getBoolean_61zpoe$('ppjInactive'); var tmp_ppjStatus = _resultSet.getInt_61zpoe$('ppjStatus'); var tmp_ppjApprovalTiemstamp = _resultSet.getLong_61zpoe$('ppjApprovalTiemstamp'); var tmp_ppjApprovalIpAddr = _resultSet.getString_61zpoe$('ppjApprovalIpAddr'); var _entity = new PersonParentJoinWithMinorPerson(); _entity.ppjUid = tmp_ppjUid; _entity.ppjPcsn = tmp_ppjPcsn; _entity.ppjLcsn = tmp_ppjLcsn; _entity.ppjLcb = tmp_ppjLcb; _entity.ppjLct = tmp_ppjLct; _entity.ppjParentPersonUid = tmp_ppjParentPersonUid; _entity.ppjMinorPersonUid = tmp_ppjMinorPersonUid; _entity.ppjRelationship = tmp_ppjRelationship; _entity.ppjEmail = tmp_ppjEmail; _entity.ppjPhone = tmp_ppjPhone; _entity.ppjInactive = tmp_ppjInactive; _entity.ppjStatus = tmp_ppjStatus; _entity.ppjApprovalTiemstamp = tmp_ppjApprovalTiemstamp; _entity.ppjApprovalIpAddr = tmp_ppjApprovalIpAddr; var _minorPerson_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _minorPerson_nullFieldCount = _minorPerson_nullFieldCount + 1 | 0; }if (_minorPerson_nullFieldCount < 24) { if (_entity.minorPerson == null) { _entity.minorPerson = new Person(); }ensureNotNull(_entity.minorPerson).personUid = tmp_personUid; ensureNotNull(_entity.minorPerson).username = tmp_username; ensureNotNull(_entity.minorPerson).firstNames = tmp_firstNames; ensureNotNull(_entity.minorPerson).lastName = tmp_lastName; ensureNotNull(_entity.minorPerson).emailAddr = tmp_emailAddr; ensureNotNull(_entity.minorPerson).phoneNum = tmp_phoneNum; ensureNotNull(_entity.minorPerson).gender = tmp_gender; ensureNotNull(_entity.minorPerson).active = tmp_active; ensureNotNull(_entity.minorPerson).admin = tmp_admin; ensureNotNull(_entity.minorPerson).personNotes = tmp_personNotes; ensureNotNull(_entity.minorPerson).fatherName = tmp_fatherName; ensureNotNull(_entity.minorPerson).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.minorPerson).motherName = tmp_motherName; ensureNotNull(_entity.minorPerson).motherNum = tmp_motherNum; ensureNotNull(_entity.minorPerson).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.minorPerson).personAddress = tmp_personAddress; ensureNotNull(_entity.minorPerson).personOrgId = tmp_personOrgId; ensureNotNull(_entity.minorPerson).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.minorPerson).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.minorPerson).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.minorPerson).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.minorPerson).personLct = tmp_personLct; ensureNotNull(_entity.minorPerson).personCountry = tmp_personCountry; ensureNotNull(_entity.minorPerson).personType = tmp_personType; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$.prototype.constructor = Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$; Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonParentJoinWithMinorPerson) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.*, Person.*\n | FROM PersonParentJoin\n | LEFT JOIN Person ON Person.personUid = PersonParentJoin.ppjMinorPersonUid \n | WHERE PersonParentJoin.ppjUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonParentJoin.*, Person.*\n | FROM PersonParentJoin\n | LEFT JOIN Person ON Person.personUid = PersonParentJoin.ppjMinorPersonUid \n | WHERE PersonParentJoin.ppjUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.findByUidWithMinorAsyncFromWeb_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_ppjUid = _resultSet.getLong_61zpoe$('ppjUid'); var tmp_ppjPcsn = _resultSet.getLong_61zpoe$('ppjPcsn'); var tmp_ppjLcsn = _resultSet.getLong_61zpoe$('ppjLcsn'); var tmp_ppjLcb = _resultSet.getInt_61zpoe$('ppjLcb'); var tmp_ppjLct = _resultSet.getLong_61zpoe$('ppjLct'); var tmp_ppjParentPersonUid = _resultSet.getLong_61zpoe$('ppjParentPersonUid'); var tmp_ppjMinorPersonUid = _resultSet.getLong_61zpoe$('ppjMinorPersonUid'); var tmp_ppjRelationship = _resultSet.getInt_61zpoe$('ppjRelationship'); var tmp_ppjEmail = _resultSet.getString_61zpoe$('ppjEmail'); var tmp_ppjPhone = _resultSet.getString_61zpoe$('ppjPhone'); var tmp_ppjInactive = _resultSet.getBoolean_61zpoe$('ppjInactive'); var tmp_ppjStatus = _resultSet.getInt_61zpoe$('ppjStatus'); var tmp_ppjApprovalTiemstamp = _resultSet.getLong_61zpoe$('ppjApprovalTiemstamp'); var tmp_ppjApprovalIpAddr = _resultSet.getString_61zpoe$('ppjApprovalIpAddr'); var _entity = new PersonParentJoin(); _entity.ppjUid = tmp_ppjUid; _entity.ppjPcsn = tmp_ppjPcsn; _entity.ppjLcsn = tmp_ppjLcsn; _entity.ppjLcb = tmp_ppjLcb; _entity.ppjLct = tmp_ppjLct; _entity.ppjParentPersonUid = tmp_ppjParentPersonUid; _entity.ppjMinorPersonUid = tmp_ppjMinorPersonUid; _entity.ppjRelationship = tmp_ppjRelationship; _entity.ppjEmail = tmp_ppjEmail; _entity.ppjPhone = tmp_ppjPhone; _entity.ppjInactive = tmp_ppjInactive; _entity.ppjStatus = tmp_ppjStatus; _entity.ppjApprovalTiemstamp = tmp_ppjApprovalTiemstamp; _entity.ppjApprovalIpAddr = tmp_ppjApprovalIpAddr; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(closure$minorPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(closure$minorPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(closure$minorPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByMinorPersonUid_s8cxhz$($this, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$findByMinorPersonUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByMinorPersonUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByMinorPersonUid_s8cxhz$.prototype.constructor = Coroutine$findByMinorPersonUid_s8cxhz$; Coroutine$findByMinorPersonUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.*\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonParentJoin.*\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(this.local$minorPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.findByMinorPersonUid_s8cxhz$ = function (minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$findByMinorPersonUid_s8cxhz$(this, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_parentPersonUid = _resultSet.getLong_61zpoe$('parentPersonUid'); var tmp_clazzUid = _resultSet.getLong_61zpoe$('clazzUid'); var _entity = new PersonParentJoinDao$ParentEnrolmentRequired(); _entity.parentPersonUid = tmp_parentPersonUid; _entity.clazzUid = tmp_clazzUid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(closure$minorPersonUid_0, closure$clazzUidFilter_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$closure$clazzUidFilter = closure$clazzUidFilter_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUidFilter); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUidFilter); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$minorPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(closure$minorPersonUid_0, closure$clazzUidFilter_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(closure$minorPersonUid_0, closure$clazzUidFilter_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$($this, minorPersonUid_0, clazzUidFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$minorPersonUid = minorPersonUid_0; this.local$clazzUidFilter = clazzUidFilter_0; } Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.prototype.constructor = Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$; Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.ppjParentPersonUid AS parentPersonUid,\n | ChildEnrolment.clazzEnrolmentClazzUid AS clazzUid\n | FROM PersonParentJoin\n | JOIN ClazzEnrolment ChildEnrolment \n | ON ChildEnrolment.clazzEnrolmentPersonUid = ?\n | AND (? = 0 OR ChildEnrolment.clazzEnrolmentClazzUid = ?)\n | WHERE PersonParentJoin.ppjMinorPersonUid = ?\n | AND PersonParentJoin.ppjParentPersonUid != 0\n | AND NOT EXISTS(\n | SELECT clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = PersonParentJoin.ppjParentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ChildEnrolment.clazzEnrolmentClazzUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1003\n | AND CAST(ClazzEnrolment.clazzEnrolmentActive AS INTEGER) = 1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT PersonParentJoin.ppjParentPersonUid AS parentPersonUid,\n | ChildEnrolment.clazzEnrolmentClazzUid AS clazzUid\n | FROM PersonParentJoin\n | JOIN ClazzEnrolment ChildEnrolment \n | ON ChildEnrolment.clazzEnrolmentPersonUid = ?\n | AND (? = 0 OR ChildEnrolment.clazzEnrolmentClazzUid = ?)\n | WHERE PersonParentJoin.ppjMinorPersonUid = ?\n | AND PersonParentJoin.ppjParentPersonUid != 0\n | AND NOT EXISTS(\n | SELECT clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = PersonParentJoin.ppjParentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ChildEnrolment.clazzEnrolmentClazzUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1003\n | AND CAST(ClazzEnrolment.clazzEnrolmentActive AS INTEGER) = 1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(this.local$minorPersonUid, this.local$clazzUidFilter, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$ = function (minorPersonUid_0, clazzUidFilter_0, continuation_0, suspended) { var instance = new Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$(this, minorPersonUid_0, clazzUidFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$isParentOf$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda(closure$minorPersonUid_0, closure$userPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$closure$userPersonUid = closure$userPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda; Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$userPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$isParentOf$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$isParentOf$lambda(closure$minorPersonUid_0, closure$userPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda(closure$minorPersonUid_0, closure$userPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$isParentOf_3pjtqy$($this, userPersonUid_0, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$userPersonUid = userPersonUid_0; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$isParentOf_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isParentOf_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isParentOf_3pjtqy$.prototype.constructor = Coroutine$isParentOf_3pjtqy$; Coroutine$isParentOf_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(\n | SELECT ppjUid\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ?\n | AND ppjParentPersonUid = ?\n | AND CAST(ppjInactive AS INTEGER) = 0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT EXISTS(\n | SELECT ppjUid\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ?\n | AND ppjParentPersonUid = ?\n | AND CAST(ppjInactive AS INTEGER) = 0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$isParentOf$lambda(this.local$minorPersonUid, this.local$userPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.isParentOf_3pjtqy$ = function (userPersonUid_0, minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$isParentOf_3pjtqy$(this, userPersonUid_0, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda(closure$personParentJoin_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personParentJoin = closure$personParentJoin_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda; Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personParentJoin.ppjPcsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personParentJoin.ppjLcsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$personParentJoin.ppjLcb); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personParentJoin.ppjLct); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personParentJoin.ppjParentPersonUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$personParentJoin.ppjMinorPersonUid); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$personParentJoin.ppjRelationship); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$personParentJoin.ppjEmail); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$personParentJoin.ppjPhone); this.local$_stmt.setBoolean_fzusl$(10, this.local$closure$personParentJoin.ppjInactive); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$personParentJoin.ppjStatus); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$personParentJoin.ppjApprovalTiemstamp); this.local$_stmt.setString_vqvrqt$(13, this.local$closure$personParentJoin.ppjApprovalIpAddr); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$personParentJoin.ppjUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$updateAsync$lambda(closure$personParentJoin_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda(closure$personParentJoin_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_ei4fsf$($this, personParentJoin_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personParentJoin = personParentJoin_0; } Coroutine$updateAsync_ei4fsf$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ei4fsf$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ei4fsf$.prototype.constructor = Coroutine$updateAsync_ei4fsf$; Coroutine$updateAsync_ei4fsf$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE PersonParentJoin SET ppjPcsn = ?, ppjLcsn = ?, ppjLcb = ?, ppjLct = ?, ppjParentPersonUid = ?, ppjMinorPersonUid = ?, ppjRelationship = ?, ppjEmail = ?, ppjPhone = ?, ppjInactive = ?, ppjStatus = ?, ppjApprovalTiemstamp = ?, ppjApprovalIpAddr = ? WHERE ppjUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonParentJoinDao_JdbcKt$updateAsync$lambda(this.local$personParentJoin), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.updateAsync_ei4fsf$ = function (personParentJoin_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ei4fsf$(this, personParentJoin_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$isMinorApproved$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(closure$minorPersonUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda; Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$isMinorApproved$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(closure$minorPersonUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(closure$minorPersonUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$isMinorApproved_s8cxhz$($this, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$isMinorApproved_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isMinorApproved_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isMinorApproved_s8cxhz$.prototype.constructor = Coroutine$isMinorApproved_s8cxhz$; Coroutine$isMinorApproved_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(\n | SELECT ppjUid\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ?\n | AND CAST(ppjInactive AS INTEGER) = 0\n | AND ppjStatus = 1)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT EXISTS(\n | SELECT ppjUid\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ?\n | AND CAST(ppjInactive AS INTEGER) = 0\n | AND ppjStatus = 1)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(this.local$minorPersonUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.isMinorApproved_s8cxhz$ = function (minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$isMinorApproved_s8cxhz$(this, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonParentJoin (ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING ppjUid'; } else tmp$ = ''; return "INSERT INTO PersonParentJoin (ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES(COALESCE(?,nextval('PersonParentJoin_ppjUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ppjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ppjUid); } stmt.setLong_6svq3l$(2, entity.ppjPcsn); stmt.setLong_6svq3l$(3, entity.ppjLcsn); stmt.setInt_vux9f0$(4, entity.ppjLcb); stmt.setLong_6svq3l$(5, entity.ppjLct); stmt.setLong_6svq3l$(6, entity.ppjParentPersonUid); stmt.setLong_6svq3l$(7, entity.ppjMinorPersonUid); stmt.setInt_vux9f0$(8, entity.ppjRelationship); stmt.setString_vqvrqt$(9, entity.ppjEmail); stmt.setString_vqvrqt$(10, entity.ppjPhone); stmt.setBoolean_fzusl$(11, entity.ppjInactive); stmt.setInt_vux9f0$(12, entity.ppjStatus); stmt.setLong_6svq3l$(13, entity.ppjApprovalTiemstamp); stmt.setString_vqvrqt$(14, entity.ppjApprovalIpAddr); }; PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonParentJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao_JdbcKt', interfaces: [PersonParentJoinDao]}; function PersonParentJoinDao_ReplicateWrapper(_db, _dao) { PersonParentJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_132($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_132.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_132.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_132.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_132; Coroutine$replicateOnNewNode_s8cxhz$_132.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_132(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_135($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_135.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_135.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_135.prototype.constructor = Coroutine$replicateOnChange_135; Coroutine$replicateOnChange_135.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_135(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_ei4fsf$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_ei4fsf$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_ei4fsf$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_ei4fsf$_0.prototype.constructor = Coroutine$insertAsync_ei4fsf$_0; Coroutine$insertAsync_ei4fsf$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ppjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(512, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ppjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ppjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_ei4fsf$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ppjUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.insertAsync_ei4fsf$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_ei4fsf$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByUidWithMinorAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithMinorAsync_s8cxhz$(uid, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByUidWithMinorAsyncFromWeb_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithMinorAsyncFromWeb_s8cxhz$(uid, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByMinorPersonUid_s8cxhz$ = function (minorPersonUid, continuation) { return this._dao_0.findByMinorPersonUid_s8cxhz$(minorPersonUid, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$ = function (minorPersonUid, clazzUidFilter, continuation) { return this._dao_0.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$(minorPersonUid, clazzUidFilter, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.isParentOf_3pjtqy$ = function (userPersonUid, minorPersonUid, continuation) { return this._dao_0.isParentOf_3pjtqy$(userPersonUid, minorPersonUid, continuation); }; function Coroutine$updateAsync_ei4fsf$_0($this, personParentJoin_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personParentJoin = personParentJoin_0; } Coroutine$updateAsync_ei4fsf$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ei4fsf$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ei4fsf$_0.prototype.constructor = Coroutine$updateAsync_ei4fsf$_0; Coroutine$updateAsync_ei4fsf$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$personParentJoin.ppjLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_ei4fsf$(this.local$personParentJoin, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.updateAsync_ei4fsf$ = function (personParentJoin_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ei4fsf$_0(this, personParentJoin_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_ReplicateWrapper.prototype.isMinorApproved_s8cxhz$ = function (minorPersonUid, continuation) { return this._dao_0.isMinorApproved_s8cxhz$(minorPersonUid, continuation); }; PersonParentJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao_ReplicateWrapper', interfaces: [PersonParentJoinDao]}; var receiveOrNull$lambda_1 = wrapFunction(function () { var throwCCE = Kotlin.throwCCE; var reflect = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect; var getKClass = Kotlin.getKClass; var typeInfoImpl = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect.typeInfoImpl_1lvkm8$; function Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$typeClosure$T = typeClosure$T_0; this.local$isT = isT_0; this.local$isT_0 = void 0; this.local$it = it_0; } Coroutine$receiveOrNull$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$receiveOrNull$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$receiveOrNull$lambda.prototype.constructor = Coroutine$receiveOrNull$lambda; Coroutine$receiveOrNull$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; if ((tmp$ = this.local$it.status) != null ? tmp$.equals(HttpStatusCode.Companion.NoContent) : null) { return null; } else { var T_0 = this.local$typeClosure$T; this.local$isT_0 = this.local$isT; var tmp$_1; var tmp$_2 = this.local$it.call; var typeInfo$result_0; typeInfo$break: do { try { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), getReifiedTypeParameterKType(this.local$typeClosure$T)); } catch (_) { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_2.receive_qi9ur9$(typeInfo$result_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } case 1: throw this.exception_0; case 2: this.result_0 = this.local$isT_0(tmp$_1 = this.result_0) ? tmp$_1 : throwCCE(); return this.result_0; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; return function (typeClosure$T_0, isT_0) { return function (it_0, continuation_0, suspended) { var instance = new Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; }; }); function getOrNull$lambda_0_1(closure$block) { return function ($receiver) { closure$block($receiver); return Unit; }; } function PersonParentJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonParentJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_133($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_133.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_133.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_133.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_133; Coroutine$replicateOnNewNode_s8cxhz$_133.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_133(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_136($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_136.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_136.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_136.prototype.constructor = Coroutine$replicateOnChange_136; Coroutine$replicateOnChange_136.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_136(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_ei4fsf$_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_ei4fsf$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_ei4fsf$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_ei4fsf$_1.prototype.constructor = Coroutine$insertAsync_ei4fsf$_1; Coroutine$insertAsync_ei4fsf$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_ei4fsf$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.insertAsync_ei4fsf$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_ei4fsf$_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithMinorAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithMinorAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithMinorAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithMinorAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidWithMinorAsync_s8cxhz$_0; Coroutine$findByUidWithMinorAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithMinorAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByUidWithMinorAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithMinorAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_Repo$findByUidWithMinorAsyncFromWeb$lambda$lambda(this$PersonParentJoinDao_Repo) { return function ($receiver, it) { takeFrom($receiver, this$PersonParentJoinDao_Repo._endpoint); $receiver.encodedPath = $receiver.encodedPath + 'PersonParentJoinDao/findByUidWithMinorAsyncFromWeb'; return Unit; }; } function PersonParentJoinDao_Repo$findByUidWithMinorAsyncFromWeb$lambda(this$PersonParentJoinDao_Repo, closure$uid) { return function ($receiver) { $receiver.url_6yzzjr$(PersonParentJoinDao_Repo$findByUidWithMinorAsyncFromWeb$lambda$lambda(this$PersonParentJoinDao_Repo)); doorNodeAndVersionHeaders($receiver, this$PersonParentJoinDao_Repo._repo); header($receiver, 'x-nid', this$PersonParentJoinDao_Repo._clientId); parameter($receiver, 'uid', closure$uid); return Unit; }; } function Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.$this = $this; this.local$response = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0.prototype.constructor = Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0; Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var $receiver = this.$this._httpClient; var host_0; var body_0; host_0 = 'localhost'; body_0 = utils.EmptyContent; var $receiver_1_0 = new HttpRequestBuilder_init(); url($receiver_1_0, 'http', host_0, 0, '/'); $receiver_1_0.method = HttpMethod.Companion.Get; $receiver_1_0.body = body_0; getOrNull$lambda_0_1(PersonParentJoinDao_Repo$findByUidWithMinorAsyncFromWeb$lambda(this.$this, this.local$uid))($receiver_1_0); var $this_0_0 = new HttpStatement($receiver_1_0, $receiver); var tmp$_4_0, tmp$_5_0, tmp$_6_0; tmp$_4_0 = getKClass(HttpStatement); if (equals(tmp$_4_0, getKClass(HttpStatement))) { this.result_0 = Kotlin.isType(tmp$_5_0 = $this_0_0, HttpStatement) ? tmp$_5_0 : throwCCE(); this.state_0 = 9; continue; } else { if (equals(tmp$_4_0, getKClass(HttpResponse))) { this.state_0 = 7; this.result_0 = $this_0_0.execute(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 1; this.result_0 = $this_0_0.executeUnsafe(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } } case 1: this.local$response = this.result_0; this.exceptionState_0 = 4; var tmp$_7_0; var tmp$_8_0 = this.local$response.call; var typeInfo$result_0_0; typeInfo$break: do { try { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), createKType(getKClass(HttpStatement), [], false)); } catch (_) { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_8_0.receive_qi9ur9$(typeInfo$result_0_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 2: this.result_0 = Kotlin.isType(tmp$_7_0 = this.result_0, HttpStatement) ? tmp$_7_0 : throwCCE(); this.exceptionState_0 = 6; this.finallyPath_0 = [3]; this.state_0 = 5; continue; case 3: this.state_0 = 8; continue; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; complete(this.local$response); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; case 7: this.result_0 = Kotlin.isType(tmp$_6_0 = this.result_0, HttpStatement) ? tmp$_6_0 : throwCCE(); this.state_0 = 8; continue; case 8: this.state_0 = 9; continue; case 9: this.result_0; var httpStatement_0 = this.result_0; this.state_0 = 10; this.result_0 = httpStatement_0.execute_2rh6on$(receiveOrNull$lambda_1(PersonParentJoinWithMinorPerson, Kotlin.orNull(Kotlin.isInstanceOf(PersonParentJoinWithMinorPerson))), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 10: this.result_0; return this.result_0; default:this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByUidWithMinorAsyncFromWeb_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithMinorAsyncFromWeb_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByMinorPersonUid_s8cxhz$_0($this, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$findByMinorPersonUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByMinorPersonUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByMinorPersonUid_s8cxhz$_0.prototype.constructor = Coroutine$findByMinorPersonUid_s8cxhz$_0; Coroutine$findByMinorPersonUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByMinorPersonUid_s8cxhz$(this.local$minorPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByMinorPersonUid_s8cxhz$ = function (minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$findByMinorPersonUid_s8cxhz$_0(this, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0($this, minorPersonUid_0, clazzUidFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$minorPersonUid = minorPersonUid_0; this.local$clazzUidFilter = clazzUidFilter_0; } Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0.prototype.constructor = Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0; Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$(this.local$minorPersonUid, this.local$clazzUidFilter, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$ = function (minorPersonUid_0, clazzUidFilter_0, continuation_0, suspended) { var instance = new Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$_0(this, minorPersonUid_0, clazzUidFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$isParentOf_3pjtqy$_0($this, userPersonUid_0, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$userPersonUid = userPersonUid_0; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$isParentOf_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isParentOf_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isParentOf_3pjtqy$_0.prototype.constructor = Coroutine$isParentOf_3pjtqy$_0; Coroutine$isParentOf_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.isParentOf_3pjtqy$(this.local$userPersonUid, this.local$minorPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.isParentOf_3pjtqy$ = function (userPersonUid_0, minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$isParentOf_3pjtqy$_0(this, userPersonUid_0, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_ei4fsf$_1($this, personParentJoin_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personParentJoin = personParentJoin_0; } Coroutine$updateAsync_ei4fsf$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ei4fsf$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ei4fsf$_1.prototype.constructor = Coroutine$updateAsync_ei4fsf$_1; Coroutine$updateAsync_ei4fsf$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_ei4fsf$(this.local$personParentJoin, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.updateAsync_ei4fsf$ = function (personParentJoin_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ei4fsf$_1(this, personParentJoin_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$isMinorApproved_s8cxhz$_0($this, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$isMinorApproved_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isMinorApproved_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isMinorApproved_s8cxhz$_0.prototype.constructor = Coroutine$isMinorApproved_s8cxhz$_0; Coroutine$isMinorApproved_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.isMinorApproved_s8cxhz$(this.local$minorPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.isMinorApproved_s8cxhz$ = function (minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$isMinorApproved_s8cxhz$_0(this, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao_Repo', interfaces: [PersonParentJoinDao]}; function PersonPictureDao_JdbcKt(_db) { PersonPictureDao.call(this); this._db = _db; this._insertAdapterPersonPicture_ = new PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral(this._db); } function Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_134($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_134.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_134.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_134.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_134; Coroutine$replicateOnNewNode_s8cxhz$_134.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppPk,\n | ? AS ppDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 1048576\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonPicture\n | ON PersonPicture.personPicturePersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = ?), 0) \n | /*psql ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppPk,\n | ? AS ppDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 1048576\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonPicture\n | ON PersonPicture.personPicturePersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = ?), 0) \n | ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_134(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_137($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_137.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_137.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_137.prototype.constructor = Coroutine$replicateOnChange_137; Coroutine$replicateOnChange_137.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppUid,\n | UserSession.usClientNodeId AS ppDestination\n | FROM ChangeLog\n | JOIN PersonPicture\n | ON ChangeLog.chTableId = 50\n | AND ChangeLog.chEntityPk = PersonPicture.personPictureUid\n | JOIN Person\n | ON Person.personUid = PersonPicture.personPicturePersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 1048576\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppUid,\n | UserSession.usClientNodeId AS ppDestination\n | FROM ChangeLog\n | JOIN PersonPicture\n | ON ChangeLog.chTableId = 50\n | AND ChangeLog.chEntityPk = PersonPicture.personPictureUid\n | JOIN Person\n | ON Person.personUid = PersonPicture.personPicturePersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 1048576\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonPictureDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_137(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personPictureUid = _resultSet.getLong_61zpoe$('personPictureUid'); var tmp_personPicturePersonUid = _resultSet.getLong_61zpoe$('personPicturePersonUid'); var tmp_personPictureMasterCsn = _resultSet.getLong_61zpoe$('personPictureMasterCsn'); var tmp_personPictureLocalCsn = _resultSet.getLong_61zpoe$('personPictureLocalCsn'); var tmp_personPictureLastChangedBy = _resultSet.getInt_61zpoe$('personPictureLastChangedBy'); var tmp_personPictureLct = _resultSet.getLong_61zpoe$('personPictureLct'); var tmp_personPictureUri = _resultSet.getString_61zpoe$('personPictureUri'); var tmp_personPictureMd5 = _resultSet.getString_61zpoe$('personPictureMd5'); var tmp_fileSize = _resultSet.getInt_61zpoe$('fileSize'); var tmp_picTimestamp = _resultSet.getLong_61zpoe$('picTimestamp'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_personPictureActive = _resultSet.getBoolean_61zpoe$('personPictureActive'); var _entity = new PersonPicture(); _entity.personPictureUid = tmp_personPictureUid; _entity.personPicturePersonUid = tmp_personPicturePersonUid; _entity.personPictureMasterCsn = tmp_personPictureMasterCsn; _entity.personPictureLocalCsn = tmp_personPictureLocalCsn; _entity.personPictureLastChangedBy = tmp_personPictureLastChangedBy; _entity.personPictureLct = tmp_personPictureLct; _entity.personPictureUri = tmp_personPictureUri; _entity.personPictureMd5 = tmp_personPictureMd5; _entity.fileSize = tmp_fileSize; _entity.picTimestamp = tmp_picTimestamp; _entity.mimeType = tmp_mimeType; _entity.personPictureActive = tmp_personPictureActive; closure$_result.v = _entity; }return Unit; }; } function Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByPersonUidAsync_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; } Coroutine$findByPersonUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByPersonUidAsync_s8cxhz$; Coroutine$findByPersonUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonPicture) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM PersonPicture \n | WHERE personPicturePersonUid = ?\n | AND CAST(personPictureActive AS INTEGER) = 1\n | ORDER BY picTimestamp DESC LIMIT 1\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonPicture \n | WHERE personPicturePersonUid = ?\n | AND CAST(personPictureActive AS INTEGER) = 1\n | ORDER BY picTimestamp DESC LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.findByPersonUidAsync_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAsync_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personPictureUid = _resultSet.getLong_61zpoe$('personPictureUid'); var tmp_personPicturePersonUid = _resultSet.getLong_61zpoe$('personPicturePersonUid'); var tmp_personPictureMasterCsn = _resultSet.getLong_61zpoe$('personPictureMasterCsn'); var tmp_personPictureLocalCsn = _resultSet.getLong_61zpoe$('personPictureLocalCsn'); var tmp_personPictureLastChangedBy = _resultSet.getInt_61zpoe$('personPictureLastChangedBy'); var tmp_personPictureLct = _resultSet.getLong_61zpoe$('personPictureLct'); var tmp_personPictureUri = _resultSet.getString_61zpoe$('personPictureUri'); var tmp_personPictureMd5 = _resultSet.getString_61zpoe$('personPictureMd5'); var tmp_fileSize = _resultSet.getInt_61zpoe$('fileSize'); var tmp_picTimestamp = _resultSet.getLong_61zpoe$('picTimestamp'); var tmp_mimeType = _resultSet.getString_61zpoe$('mimeType'); var tmp_personPictureActive = _resultSet.getBoolean_61zpoe$('personPictureActive'); var _entity = new PersonPicture(); _entity.personPictureUid = tmp_personPictureUid; _entity.personPicturePersonUid = tmp_personPicturePersonUid; _entity.personPictureMasterCsn = tmp_personPictureMasterCsn; _entity.personPictureLocalCsn = tmp_personPictureLocalCsn; _entity.personPictureLastChangedBy = tmp_personPictureLastChangedBy; _entity.personPictureLct = tmp_personPictureLct; _entity.personPictureUri = tmp_personPictureUri; _entity.personPictureMd5 = tmp_personPictureMd5; _entity.fileSize = tmp_fileSize; _entity.picTimestamp = tmp_picTimestamp; _entity.mimeType = tmp_mimeType; _entity.personPictureActive = tmp_personPictureActive; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this$PersonPictureDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonPictureDao_JdbcKt = this$PersonPictureDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, PersonPicture) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PersonPicture where personPicturePersonUid = ? ORDER BY picTimestamp DESC LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PersonPicture where personPicturePersonUid = ? ORDER BY picTimestamp DESC LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonPictureDao_JdbcKt._db, _stmtConfig, PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this$PersonPictureDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this$PersonPictureDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonPictureDao_JdbcKt.prototype.findByPersonUidLive_s8cxhz$ = function (personUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('PersonPicture'), PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this, personUid)); return _result; }; function Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda(closure$personPicture_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personPicture = closure$personPicture_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda; Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personPicture.personPicturePersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personPicture.personPictureMasterCsn); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personPicture.personPictureLocalCsn); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$personPicture.personPictureLastChangedBy); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personPicture.personPictureLct); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$personPicture.personPictureUri); this.local$_stmt.setString_vqvrqt$(7, this.local$closure$personPicture.personPictureMd5); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$personPicture.fileSize); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personPicture.picTimestamp); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$personPicture.mimeType); this.local$_stmt.setBoolean_fzusl$(11, this.local$closure$personPicture.personPictureActive); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$personPicture.personPictureUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$updateAsync$lambda(closure$personPicture_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda(closure$personPicture_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_c8xyxp$($this, personPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personPicture = personPicture_0; } Coroutine$updateAsync_c8xyxp$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_c8xyxp$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_c8xyxp$.prototype.constructor = Coroutine$updateAsync_c8xyxp$; Coroutine$updateAsync_c8xyxp$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE PersonPicture SET personPicturePersonUid = ?, personPictureMasterCsn = ?, personPictureLocalCsn = ?, personPictureLastChangedBy = ?, personPictureLct = ?, personPictureUri = ?, personPictureMd5 = ?, fileSize = ?, picTimestamp = ?, mimeType = ?, personPictureActive = ? WHERE personPictureUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonPictureDao_JdbcKt$updateAsync$lambda(this.local$personPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.updateAsync_c8xyxp$ = function (personPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_c8xyxp$(this, personPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonPicture_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_141($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_141.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_141.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_141.prototype.constructor = Coroutine$insertAsync_141; Coroutine$insertAsync_141.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonPicture_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_141(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonPicture_.insertList_4ezy5m$(entityList); }; function PersonPictureDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.personPicturePersonUid); _stmt.setLong_6svq3l$(2, _entity.personPictureMasterCsn); _stmt.setLong_6svq3l$(3, _entity.personPictureLocalCsn); _stmt.setInt_vux9f0$(4, _entity.personPictureLastChangedBy); _stmt.setLong_6svq3l$(5, _entity.personPictureLct); _stmt.setString_vqvrqt$(6, _entity.personPictureUri); _stmt.setString_vqvrqt$(7, _entity.personPictureMd5); _stmt.setInt_vux9f0$(8, _entity.fileSize); _stmt.setLong_6svq3l$(9, _entity.picTimestamp); _stmt.setString_vqvrqt$(10, _entity.mimeType); _stmt.setBoolean_fzusl$(11, _entity.personPictureActive); _stmt.setLong_6svq3l$(12, _entity.personPictureUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonPictureDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonPicture SET personPicturePersonUid = ?, personPictureMasterCsn = ?, personPictureLocalCsn = ?, personPictureLastChangedBy = ?, personPictureLct = ?, personPictureUri = ?, personPictureMd5 = ?, fileSize = ?, picTimestamp = ?, mimeType = ?, personPictureActive = ? WHERE personPictureUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonPictureDao_JdbcKt$updateList$lambda(entityList)); }; function PersonPictureDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.personPicturePersonUid); _stmt.setLong_6svq3l$(2, closure$entity.personPictureMasterCsn); _stmt.setLong_6svq3l$(3, closure$entity.personPictureLocalCsn); _stmt.setInt_vux9f0$(4, closure$entity.personPictureLastChangedBy); _stmt.setLong_6svq3l$(5, closure$entity.personPictureLct); _stmt.setString_vqvrqt$(6, closure$entity.personPictureUri); _stmt.setString_vqvrqt$(7, closure$entity.personPictureMd5); _stmt.setInt_vux9f0$(8, closure$entity.fileSize); _stmt.setLong_6svq3l$(9, closure$entity.picTimestamp); _stmt.setString_vqvrqt$(10, closure$entity.mimeType); _stmt.setBoolean_fzusl$(11, closure$entity.personPictureActive); _stmt.setLong_6svq3l$(12, closure$entity.personPictureUid); return _stmt.executeUpdate(); }; } PersonPictureDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonPicture SET personPicturePersonUid = ?, personPictureMasterCsn = ?, personPictureLocalCsn = ?, personPictureLastChangedBy = ?, personPictureLct = ?, personPictureUri = ?, personPictureMd5 = ?, fileSize = ?, picTimestamp = ?, mimeType = ?, personPictureActive = ? WHERE personPictureUid = ?'; prepareAndUseStatement_0(this._db, _sql, PersonPictureDao_JdbcKt$update$lambda(entity)); }; function PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO PersonPicture (personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING personPictureUid'; } else tmp$ = ''; return "INSERT INTO PersonPicture (personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES(COALESCE(?,nextval('PersonPicture_personPictureUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personPictureUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personPictureUid); } stmt.setLong_6svq3l$(2, entity.personPicturePersonUid); stmt.setLong_6svq3l$(3, entity.personPictureMasterCsn); stmt.setLong_6svq3l$(4, entity.personPictureLocalCsn); stmt.setInt_vux9f0$(5, entity.personPictureLastChangedBy); stmt.setLong_6svq3l$(6, entity.personPictureLct); stmt.setString_vqvrqt$(7, entity.personPictureUri); stmt.setString_vqvrqt$(8, entity.personPictureMd5); stmt.setInt_vux9f0$(9, entity.fileSize); stmt.setLong_6svq3l$(10, entity.picTimestamp); stmt.setString_vqvrqt$(11, entity.mimeType); stmt.setBoolean_fzusl$(12, entity.personPictureActive); }; PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonPictureDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao_JdbcKt', interfaces: [PersonPictureDao]}; function PersonPictureDao_ReplicateWrapper(_db, _dao) { PersonPictureDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_135($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_135.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_135.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_135.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_135; Coroutine$replicateOnNewNode_s8cxhz$_135.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_135(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_138($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_138.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_138.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_138.prototype.constructor = Coroutine$replicateOnChange_138; Coroutine$replicateOnChange_138.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_138(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_ReplicateWrapper.prototype.findByPersonUidAsync_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findByPersonUidAsync_s8cxhz$(personUid, continuation); }; PersonPictureDao_ReplicateWrapper.prototype.findByPersonUidLive_s8cxhz$ = function (personUid) { return this._dao_0.findByPersonUidLive_s8cxhz$(personUid); }; function Coroutine$updateAsync_c8xyxp$_0($this, personPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personPicture = personPicture_0; } Coroutine$updateAsync_c8xyxp$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_c8xyxp$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_c8xyxp$_0.prototype.constructor = Coroutine$updateAsync_c8xyxp$_0; Coroutine$updateAsync_c8xyxp$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new PersonPicture_EwaAdapter(this.local$personPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.local$personPicture.personPictureLct = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.$this._dao_0.updateAsync_c8xyxp$(this.local$personPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.updateAsync_c8xyxp$ = function (personPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_c8xyxp$_0(this, personPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_142($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_142.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_142.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_142.prototype.constructor = Coroutine$insertAsync_142; Coroutine$insertAsync_142.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new PersonPicture_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.personPictureUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(50, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.personPictureUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.personPictureLct = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.personPictureUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_142(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonPictureDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonPictureDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonPictureDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao_ReplicateWrapper', interfaces: [PersonPictureDao]}; function PersonPictureDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonPictureDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_136($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_136.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_136.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_136.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_136; Coroutine$replicateOnNewNode_s8cxhz$_136.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_136(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_139($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_139.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_139.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_139.prototype.constructor = Coroutine$replicateOnChange_139; Coroutine$replicateOnChange_139.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_139(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUidAsync_s8cxhz$_0($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findByPersonUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByPersonUidAsync_s8cxhz$_0; Coroutine$findByPersonUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUidAsync_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.findByPersonUidAsync_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAsync_s8cxhz$_0(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_Repo.prototype.findByPersonUidLive_s8cxhz$ = function (personUid) { var _result = this._dao.findByPersonUidLive_s8cxhz$(personUid); return _result; }; function Coroutine$updateAsync_c8xyxp$_1($this, personPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personPicture = personPicture_0; } Coroutine$updateAsync_c8xyxp$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_c8xyxp$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_c8xyxp$_1.prototype.constructor = Coroutine$updateAsync_c8xyxp$_1; Coroutine$updateAsync_c8xyxp$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_c8xyxp$(this.local$personPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.updateAsync_c8xyxp$ = function (personPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_c8xyxp$_1(this, personPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_143($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_143.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_143.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_143.prototype.constructor = Coroutine$insertAsync_143; Coroutine$insertAsync_143.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_143(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonPictureDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonPictureDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonPictureDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao_Repo', interfaces: [PersonPictureDao]}; function ReportDao_JdbcKt(_db) { ReportDao.call(this); this._db = _db; this._insertAdapterReport_upsert = new ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral(this._db); this._insertAdapterReport_ = new ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral(this._db); } function Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda; Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeTemplates_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeTemplates_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeTemplates_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeTemplates_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeTemplates_s8cxhz$; Coroutine$replicateOnNewNodeTemplates_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportPk,\n | ? AS reportDestination\n | FROM Report\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = ?), 0) \n | /*psql ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportPk,\n | ? AS reportDestination\n | FROM Report\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = ?), 0) \n | ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.replicateOnNewNodeTemplates_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeTemplates_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda; Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$replicateOnChangeTemplates$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeTemplates($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeTemplates.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeTemplates.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeTemplates.prototype.constructor = Coroutine$replicateOnChangeTemplates; Coroutine$replicateOnChangeTemplates.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportUid,\n | UserSession.usClientNodeId AS reportDestination\n | FROM ChangeLog\n | JOIN Report\n | ON ChangeLog.chTableId = 101 \n | AND ChangeLog.chEntityPk = Report.reportUid\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportUid,\n | UserSession.usClientNodeId AS reportDestination\n | FROM ChangeLog\n | JOIN Report\n | ON ChangeLog.chTableId = 101 \n | AND ChangeLog.chEntityPk = Report.reportUid\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ReportDao_JdbcKt$replicateOnChangeTemplates$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.replicateOnChangeTemplates = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeTemplates(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ReportDao_JdbcKt$getResults$lambda$lambda(closure$_result) { return function (_resultSet) { var tmp$, tmp$_0, tmp$_1; var _columnIndexMap = columnIndexMap(_resultSet); while (_resultSet.next()) { var tmp_reportUid; if (_columnIndexMap.containsKey_11rb$('reportUid')) { tmp_reportUid = _resultSet.getLong_61zpoe$('reportUid'); } else { tmp_reportUid = L0; } var tmp_reportOwnerUid; if (_columnIndexMap.containsKey_11rb$('reportOwnerUid')) { tmp_reportOwnerUid = _resultSet.getLong_61zpoe$('reportOwnerUid'); } else { tmp_reportOwnerUid = L0; } var tmp_xAxis; if (_columnIndexMap.containsKey_11rb$('xAxis')) { tmp_xAxis = _resultSet.getInt_61zpoe$('xAxis'); } else { tmp_xAxis = 0; } var tmp_reportDateRangeSelection; if (_columnIndexMap.containsKey_11rb$('reportDateRangeSelection')) { tmp_reportDateRangeSelection = _resultSet.getInt_61zpoe$('reportDateRangeSelection'); } else { tmp_reportDateRangeSelection = 0; } var tmp_fromDate; if (_columnIndexMap.containsKey_11rb$('fromDate')) { tmp_fromDate = _resultSet.getLong_61zpoe$('fromDate'); } else { tmp_fromDate = L0; } var tmp_fromRelTo; if (_columnIndexMap.containsKey_11rb$('fromRelTo')) { tmp_fromRelTo = _resultSet.getInt_61zpoe$('fromRelTo'); } else { tmp_fromRelTo = 0; } var tmp_fromRelOffSet; if (_columnIndexMap.containsKey_11rb$('fromRelOffSet')) { tmp_fromRelOffSet = _resultSet.getInt_61zpoe$('fromRelOffSet'); } else { tmp_fromRelOffSet = 0; } var tmp_fromRelUnit; if (_columnIndexMap.containsKey_11rb$('fromRelUnit')) { tmp_fromRelUnit = _resultSet.getInt_61zpoe$('fromRelUnit'); } else { tmp_fromRelUnit = 0; } var tmp_toDate; if (_columnIndexMap.containsKey_11rb$('toDate')) { tmp_toDate = _resultSet.getLong_61zpoe$('toDate'); } else { tmp_toDate = L0; } var tmp_toRelTo; if (_columnIndexMap.containsKey_11rb$('toRelTo')) { tmp_toRelTo = _resultSet.getInt_61zpoe$('toRelTo'); } else { tmp_toRelTo = 0; } var tmp_toRelOffSet; if (_columnIndexMap.containsKey_11rb$('toRelOffSet')) { tmp_toRelOffSet = _resultSet.getInt_61zpoe$('toRelOffSet'); } else { tmp_toRelOffSet = 0; } var tmp_toRelUnit; if (_columnIndexMap.containsKey_11rb$('toRelUnit')) { tmp_toRelUnit = _resultSet.getInt_61zpoe$('toRelUnit'); } else { tmp_toRelUnit = 0; } var tmp_reportTitle; if (_columnIndexMap.containsKey_11rb$('reportTitle')) { tmp_reportTitle = _resultSet.getString_61zpoe$('reportTitle'); } else { tmp_reportTitle = (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE(); } var tmp_reportDescription; if (_columnIndexMap.containsKey_11rb$('reportDescription')) { tmp_reportDescription = _resultSet.getString_61zpoe$('reportDescription'); } else { tmp_reportDescription = (tmp$_0 = null) == null || typeof tmp$_0 === 'string' ? tmp$_0 : throwCCE(); } var tmp_reportSeries; if (_columnIndexMap.containsKey_11rb$('reportSeries')) { tmp_reportSeries = _resultSet.getString_61zpoe$('reportSeries'); } else { tmp_reportSeries = (tmp$_1 = null) == null || typeof tmp$_1 === 'string' ? tmp$_1 : throwCCE(); } var tmp_reportInactive; if (_columnIndexMap.containsKey_11rb$('reportInactive')) { tmp_reportInactive = _resultSet.getBoolean_61zpoe$('reportInactive'); } else { tmp_reportInactive = false; } var tmp_isTemplate; if (_columnIndexMap.containsKey_11rb$('isTemplate')) { tmp_isTemplate = _resultSet.getBoolean_61zpoe$('isTemplate'); } else { tmp_isTemplate = false; } var tmp_priority; if (_columnIndexMap.containsKey_11rb$('priority')) { tmp_priority = _resultSet.getInt_61zpoe$('priority'); } else { tmp_priority = 0; } var tmp_reportTitleId; if (_columnIndexMap.containsKey_11rb$('reportTitleId')) { tmp_reportTitleId = _resultSet.getInt_61zpoe$('reportTitleId'); } else { tmp_reportTitleId = 0; } var tmp_reportDescId; if (_columnIndexMap.containsKey_11rb$('reportDescId')) { tmp_reportDescId = _resultSet.getInt_61zpoe$('reportDescId'); } else { tmp_reportDescId = 0; } var tmp_reportMasterChangeSeqNum; if (_columnIndexMap.containsKey_11rb$('reportMasterChangeSeqNum')) { tmp_reportMasterChangeSeqNum = _resultSet.getLong_61zpoe$('reportMasterChangeSeqNum'); } else { tmp_reportMasterChangeSeqNum = L0; } var tmp_reportLocalChangeSeqNum; if (_columnIndexMap.containsKey_11rb$('reportLocalChangeSeqNum')) { tmp_reportLocalChangeSeqNum = _resultSet.getLong_61zpoe$('reportLocalChangeSeqNum'); } else { tmp_reportLocalChangeSeqNum = L0; } var tmp_reportLastChangedBy; if (_columnIndexMap.containsKey_11rb$('reportLastChangedBy')) { tmp_reportLastChangedBy = _resultSet.getInt_61zpoe$('reportLastChangedBy'); } else { tmp_reportLastChangedBy = 0; } var tmp_reportLct; if (_columnIndexMap.containsKey_11rb$('reportLct')) { tmp_reportLct = _resultSet.getLong_61zpoe$('reportLct'); } else { tmp_reportLct = L0; } var _entity = new Report(); _entity.reportUid = tmp_reportUid; _entity.reportOwnerUid = tmp_reportOwnerUid; _entity.xAxis = tmp_xAxis; _entity.reportDateRangeSelection = tmp_reportDateRangeSelection; _entity.fromDate = tmp_fromDate; _entity.fromRelTo = tmp_fromRelTo; _entity.fromRelOffSet = tmp_fromRelOffSet; _entity.fromRelUnit = tmp_fromRelUnit; _entity.toDate = tmp_toDate; _entity.toRelTo = tmp_toRelTo; _entity.toRelOffSet = tmp_toRelOffSet; _entity.toRelUnit = tmp_toRelUnit; _entity.reportTitle = tmp_reportTitle; _entity.reportDescription = tmp_reportDescription; _entity.reportSeries = tmp_reportSeries; _entity.reportInactive = tmp_reportInactive; _entity.isTemplate = tmp_isTemplate; _entity.priority = tmp_priority; _entity.reportTitleId = tmp_reportTitleId; _entity.reportDescId = tmp_reportDescId; _entity.reportMasterChangeSeqNum = tmp_reportMasterChangeSeqNum; _entity.reportLocalChangeSeqNum = tmp_reportLocalChangeSeqNum; _entity.reportLastChangedBy = tmp_reportLastChangedBy; _entity.reportLct = tmp_reportLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ReportDao_JdbcKt$getResults$lambda(closure$query, this$ReportDao_JdbcKt, closure$_result) { return function (_stmt) { closure$query.bindToPreparedStmt_k1n6ap$(_stmt, this$ReportDao_JdbcKt._db, _stmt.getConnection()); useResults(_stmt.executeQuery(), ReportDao_JdbcKt$getResults$lambda$lambda(closure$_result)); return Unit; }; } ReportDao_JdbcKt.prototype.getResults_j49vja$ = function (query) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(query.getSql(), hasListOrArrayParams(query)); prepareAndUseStatement(this._db, _stmtConfig, ReportDao_JdbcKt$getResults$lambda(query, this, _result)); return _result.v; }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral(this$ReportDao_JdbcKt, closure$personUid, closure$isTemplate, closure$searchBit, closure$sortOrder) { this.this$ReportDao_JdbcKt = this$ReportDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$isTemplate = closure$isTemplate; this.closure$searchBit = closure$searchBit; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_reportUid = _resultSet.getLong_61zpoe$('reportUid'); var tmp_reportOwnerUid = _resultSet.getLong_61zpoe$('reportOwnerUid'); var tmp_xAxis = _resultSet.getInt_61zpoe$('xAxis'); var tmp_reportDateRangeSelection = _resultSet.getInt_61zpoe$('reportDateRangeSelection'); var tmp_fromDate = _resultSet.getLong_61zpoe$('fromDate'); var tmp_fromRelTo = _resultSet.getInt_61zpoe$('fromRelTo'); var tmp_fromRelOffSet = _resultSet.getInt_61zpoe$('fromRelOffSet'); var tmp_fromRelUnit = _resultSet.getInt_61zpoe$('fromRelUnit'); var tmp_toDate = _resultSet.getLong_61zpoe$('toDate'); var tmp_toRelTo = _resultSet.getInt_61zpoe$('toRelTo'); var tmp_toRelOffSet = _resultSet.getInt_61zpoe$('toRelOffSet'); var tmp_toRelUnit = _resultSet.getInt_61zpoe$('toRelUnit'); var tmp_reportTitle = _resultSet.getString_61zpoe$('reportTitle'); var tmp_reportDescription = _resultSet.getString_61zpoe$('reportDescription'); var tmp_reportSeries = _resultSet.getString_61zpoe$('reportSeries'); var tmp_reportInactive = _resultSet.getBoolean_61zpoe$('reportInactive'); var tmp_isTemplate = _resultSet.getBoolean_61zpoe$('isTemplate'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_reportTitleId = _resultSet.getInt_61zpoe$('reportTitleId'); var tmp_reportDescId = _resultSet.getInt_61zpoe$('reportDescId'); var tmp_reportMasterChangeSeqNum = _resultSet.getLong_61zpoe$('reportMasterChangeSeqNum'); var tmp_reportLocalChangeSeqNum = _resultSet.getLong_61zpoe$('reportLocalChangeSeqNum'); var tmp_reportLastChangedBy = _resultSet.getInt_61zpoe$('reportLastChangedBy'); var tmp_reportLct = _resultSet.getLong_61zpoe$('reportLct'); var _entity = new Report(); _entity.reportUid = tmp_reportUid; _entity.reportOwnerUid = tmp_reportOwnerUid; _entity.xAxis = tmp_xAxis; _entity.reportDateRangeSelection = tmp_reportDateRangeSelection; _entity.fromDate = tmp_fromDate; _entity.fromRelTo = tmp_fromRelTo; _entity.fromRelOffSet = tmp_fromRelOffSet; _entity.fromRelUnit = tmp_fromRelUnit; _entity.toDate = tmp_toDate; _entity.toRelTo = tmp_toRelTo; _entity.toRelOffSet = tmp_toRelOffSet; _entity.toRelUnit = tmp_toRelUnit; _entity.reportTitle = tmp_reportTitle; _entity.reportDescription = tmp_reportDescription; _entity.reportSeries = tmp_reportSeries; _entity.reportInactive = tmp_reportInactive; _entity.isTemplate = tmp_isTemplate; _entity.priority = tmp_priority; _entity.reportTitleId = tmp_reportTitleId; _entity.reportDescId = tmp_reportDescId; _entity.reportMasterChangeSeqNum = tmp_reportMasterChangeSeqNum; _entity.reportLocalChangeSeqNum = tmp_reportLocalChangeSeqNum; _entity.reportLastChangedBy = tmp_reportLastChangedBy; _entity.reportLct = tmp_reportLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setBoolean_fzusl$(2, this.local$closure$isTemplate); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (SELECT * FROM REPORT WHERE NOT reportInactive \n | AND reportOwnerUid = ?\n | AND isTemplate = ?\n | AND reportTitle LIKE ?\n | ORDER BY priority, CASE(?)\n | WHEN 1 THEN Report.reportTitle\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Report.reportTitle\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (SELECT * FROM REPORT WHERE NOT reportInactive \n | AND reportOwnerUid = ?\n | AND isTemplate = ?\n | AND reportTitle LIKE ?\n | ORDER BY priority, CASE(?)\n | WHEN 1 THEN Report.reportTitle\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Report.reportTitle\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, _stmtConfig, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$isTemplate, this.local$closure$searchBit, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ReportDao_JdbcKt._db, listOf_0('REPORT'), ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this.this$ReportDao_JdbcKt, this.closure$personUid, this.closure$isTemplate, this.closure$searchBit, this.closure$sortOrder, _limit, _offset)); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setBoolean_fzusl$(2, this.local$closure$isTemplate); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (SELECT * FROM REPORT WHERE NOT reportInactive \n | AND reportOwnerUid = ?\n | AND isTemplate = ?\n | AND reportTitle LIKE ?\n | ORDER BY priority, CASE(?)\n | WHEN 1 THEN Report.reportTitle\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Report.reportTitle\n | ELSE ''\n | END DESC\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (SELECT * FROM REPORT WHERE NOT reportInactive \n | AND reportOwnerUid = ?\n | AND isTemplate = ?\n | AND reportTitle LIKE ?\n | ORDER BY priority, CASE(?)\n | WHEN 1 THEN Report.reportTitle\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Report.reportTitle\n | ELSE ''\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, _stmtConfig, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$isTemplate, this.local$closure$searchBit, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ReportDao_JdbcKt._db, listOf_0('REPORT'), ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this.this$ReportDao_JdbcKt, this.closure$personUid, this.closure$isTemplate, this.closure$searchBit, this.closure$sortOrder)); }; ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ReportDao_JdbcKt.prototype.findAllActiveReport_dw84ek$ = function (searchBit, personUid, sortOrder, isTemplate) { var _result = new ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral(this, personUid, isTemplate, searchBit, sortOrder); return _result; }; function ReportDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_reportUid = _resultSet.getLong_61zpoe$('reportUid'); var tmp_reportOwnerUid = _resultSet.getLong_61zpoe$('reportOwnerUid'); var tmp_xAxis = _resultSet.getInt_61zpoe$('xAxis'); var tmp_reportDateRangeSelection = _resultSet.getInt_61zpoe$('reportDateRangeSelection'); var tmp_fromDate = _resultSet.getLong_61zpoe$('fromDate'); var tmp_fromRelTo = _resultSet.getInt_61zpoe$('fromRelTo'); var tmp_fromRelOffSet = _resultSet.getInt_61zpoe$('fromRelOffSet'); var tmp_fromRelUnit = _resultSet.getInt_61zpoe$('fromRelUnit'); var tmp_toDate = _resultSet.getLong_61zpoe$('toDate'); var tmp_toRelTo = _resultSet.getInt_61zpoe$('toRelTo'); var tmp_toRelOffSet = _resultSet.getInt_61zpoe$('toRelOffSet'); var tmp_toRelUnit = _resultSet.getInt_61zpoe$('toRelUnit'); var tmp_reportTitle = _resultSet.getString_61zpoe$('reportTitle'); var tmp_reportDescription = _resultSet.getString_61zpoe$('reportDescription'); var tmp_reportSeries = _resultSet.getString_61zpoe$('reportSeries'); var tmp_reportInactive = _resultSet.getBoolean_61zpoe$('reportInactive'); var tmp_isTemplate = _resultSet.getBoolean_61zpoe$('isTemplate'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_reportTitleId = _resultSet.getInt_61zpoe$('reportTitleId'); var tmp_reportDescId = _resultSet.getInt_61zpoe$('reportDescId'); var tmp_reportMasterChangeSeqNum = _resultSet.getLong_61zpoe$('reportMasterChangeSeqNum'); var tmp_reportLocalChangeSeqNum = _resultSet.getLong_61zpoe$('reportLocalChangeSeqNum'); var tmp_reportLastChangedBy = _resultSet.getInt_61zpoe$('reportLastChangedBy'); var tmp_reportLct = _resultSet.getLong_61zpoe$('reportLct'); var _entity = new Report(); _entity.reportUid = tmp_reportUid; _entity.reportOwnerUid = tmp_reportOwnerUid; _entity.xAxis = tmp_xAxis; _entity.reportDateRangeSelection = tmp_reportDateRangeSelection; _entity.fromDate = tmp_fromDate; _entity.fromRelTo = tmp_fromRelTo; _entity.fromRelOffSet = tmp_fromRelOffSet; _entity.fromRelUnit = tmp_fromRelUnit; _entity.toDate = tmp_toDate; _entity.toRelTo = tmp_toRelTo; _entity.toRelOffSet = tmp_toRelOffSet; _entity.toRelUnit = tmp_toRelUnit; _entity.reportTitle = tmp_reportTitle; _entity.reportDescription = tmp_reportDescription; _entity.reportSeries = tmp_reportSeries; _entity.reportInactive = tmp_reportInactive; _entity.isTemplate = tmp_isTemplate; _entity.priority = tmp_priority; _entity.reportTitleId = tmp_reportTitleId; _entity.reportDescId = tmp_reportDescId; _entity.reportMasterChangeSeqNum = tmp_reportMasterChangeSeqNum; _entity.reportLocalChangeSeqNum = tmp_reportLocalChangeSeqNum; _entity.reportLastChangedBy = tmp_reportLastChangedBy; _entity.reportLct = tmp_reportLct; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ReportDao_JdbcKt$findByUid$lambda(closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findByUid$lambda; Coroutine$ReportDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findByUid$lambda(closure$entityUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findByUid$lambda(closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_s8cxhz$_5($this, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entityUid = entityUid_0; } Coroutine$findByUid_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_5.prototype.constructor = Coroutine$findByUid_s8cxhz$_5; Coroutine$findByUid_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Report) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Report WHERE reportUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Report WHERE reportUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ReportDao_JdbcKt$findByUid$lambda(this.local$entityUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_5(this, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ReportDao_JdbcKt$updateAsync$lambda(closure$entity_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$updateAsync$lambda; Coroutine$ReportDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.reportOwnerUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.xAxis); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.reportDateRangeSelection); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.fromDate); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.fromRelTo); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.fromRelOffSet); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$entity.fromRelUnit); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.toDate); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.toRelTo); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$entity.toRelOffSet); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$entity.toRelUnit); this.local$_stmt.setString_vqvrqt$(12, this.local$closure$entity.reportTitle); this.local$_stmt.setString_vqvrqt$(13, this.local$closure$entity.reportDescription); this.local$_stmt.setString_vqvrqt$(14, this.local$closure$entity.reportSeries); this.local$_stmt.setBoolean_fzusl$(15, this.local$closure$entity.reportInactive); this.local$_stmt.setBoolean_fzusl$(16, this.local$closure$entity.isTemplate); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$entity.priority); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$entity.reportTitleId); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$entity.reportDescId); this.local$_stmt.setLong_6svq3l$(20, this.local$closure$entity.reportMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.reportLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(22, this.local$closure$entity.reportLastChangedBy); this.local$_stmt.setLong_6svq3l$(23, this.local$closure$entity.reportLct); this.local$_stmt.setLong_6svq3l$(24, this.local$closure$entity.reportUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$updateAsync$lambda(closure$entity_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$updateAsync$lambda(closure$entity_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_7abdyy$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7abdyy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7abdyy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7abdyy$.prototype.constructor = Coroutine$updateAsync_7abdyy$; Coroutine$updateAsync_7abdyy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Report SET reportOwnerUid = ?, xAxis = ?, reportDateRangeSelection = ?, fromDate = ?, fromRelTo = ?, fromRelOffSet = ?, fromRelUnit = ?, toDate = ?, toRelTo = ?, toRelOffSet = ?, toRelUnit = ?, reportTitle = ?, reportDescription = ?, reportSeries = ?, reportInactive = ?, isTemplate = ?, priority = ?, reportTitleId = ?, reportDescId = ?, reportMasterChangeSeqNum = ?, reportLocalChangeSeqNum = ?, reportLastChangedBy = ?, reportLct = ? WHERE reportUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ReportDao_JdbcKt$updateAsync$lambda(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.updateAsync_7abdyy$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7abdyy$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ReportDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_reportUid = _resultSet.getLong_61zpoe$('reportUid'); var tmp_reportOwnerUid = _resultSet.getLong_61zpoe$('reportOwnerUid'); var tmp_xAxis = _resultSet.getInt_61zpoe$('xAxis'); var tmp_reportDateRangeSelection = _resultSet.getInt_61zpoe$('reportDateRangeSelection'); var tmp_fromDate = _resultSet.getLong_61zpoe$('fromDate'); var tmp_fromRelTo = _resultSet.getInt_61zpoe$('fromRelTo'); var tmp_fromRelOffSet = _resultSet.getInt_61zpoe$('fromRelOffSet'); var tmp_fromRelUnit = _resultSet.getInt_61zpoe$('fromRelUnit'); var tmp_toDate = _resultSet.getLong_61zpoe$('toDate'); var tmp_toRelTo = _resultSet.getInt_61zpoe$('toRelTo'); var tmp_toRelOffSet = _resultSet.getInt_61zpoe$('toRelOffSet'); var tmp_toRelUnit = _resultSet.getInt_61zpoe$('toRelUnit'); var tmp_reportTitle = _resultSet.getString_61zpoe$('reportTitle'); var tmp_reportDescription = _resultSet.getString_61zpoe$('reportDescription'); var tmp_reportSeries = _resultSet.getString_61zpoe$('reportSeries'); var tmp_reportInactive = _resultSet.getBoolean_61zpoe$('reportInactive'); var tmp_isTemplate = _resultSet.getBoolean_61zpoe$('isTemplate'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_reportTitleId = _resultSet.getInt_61zpoe$('reportTitleId'); var tmp_reportDescId = _resultSet.getInt_61zpoe$('reportDescId'); var tmp_reportMasterChangeSeqNum = _resultSet.getLong_61zpoe$('reportMasterChangeSeqNum'); var tmp_reportLocalChangeSeqNum = _resultSet.getLong_61zpoe$('reportLocalChangeSeqNum'); var tmp_reportLastChangedBy = _resultSet.getInt_61zpoe$('reportLastChangedBy'); var tmp_reportLct = _resultSet.getLong_61zpoe$('reportLct'); var _entity = new Report(); _entity.reportUid = tmp_reportUid; _entity.reportOwnerUid = tmp_reportOwnerUid; _entity.xAxis = tmp_xAxis; _entity.reportDateRangeSelection = tmp_reportDateRangeSelection; _entity.fromDate = tmp_fromDate; _entity.fromRelTo = tmp_fromRelTo; _entity.fromRelOffSet = tmp_fromRelOffSet; _entity.fromRelUnit = tmp_fromRelUnit; _entity.toDate = tmp_toDate; _entity.toRelTo = tmp_toRelTo; _entity.toRelOffSet = tmp_toRelOffSet; _entity.toRelUnit = tmp_toRelUnit; _entity.reportTitle = tmp_reportTitle; _entity.reportDescription = tmp_reportDescription; _entity.reportSeries = tmp_reportSeries; _entity.reportInactive = tmp_reportInactive; _entity.isTemplate = tmp_isTemplate; _entity.priority = tmp_priority; _entity.reportTitleId = tmp_reportTitleId; _entity.reportDescId = tmp_reportDescId; _entity.reportMasterChangeSeqNum = tmp_reportMasterChangeSeqNum; _entity.reportLocalChangeSeqNum = tmp_reportLocalChangeSeqNum; _entity.reportLastChangedBy = tmp_reportLastChangedBy; _entity.reportLct = tmp_reportLct; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findByUidLive$lambda(this$ReportDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; this.local$_liveResult = void 0; } Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findByUidLive$lambda; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Report) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From Report WHERE reportUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * From Report WHERE reportUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, _stmtConfig, ReportDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findByUidLive$lambda(this$ReportDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findByUidLive$lambda(this$ReportDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('Report'), ReportDao_JdbcKt$findByUidLive$lambda(this, uid)); return _result; }; function ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_reportUid = _resultSet.getLong_61zpoe$('reportUid'); var tmp_reportOwnerUid = _resultSet.getLong_61zpoe$('reportOwnerUid'); var tmp_xAxis = _resultSet.getInt_61zpoe$('xAxis'); var tmp_reportDateRangeSelection = _resultSet.getInt_61zpoe$('reportDateRangeSelection'); var tmp_fromDate = _resultSet.getLong_61zpoe$('fromDate'); var tmp_fromRelTo = _resultSet.getInt_61zpoe$('fromRelTo'); var tmp_fromRelOffSet = _resultSet.getInt_61zpoe$('fromRelOffSet'); var tmp_fromRelUnit = _resultSet.getInt_61zpoe$('fromRelUnit'); var tmp_toDate = _resultSet.getLong_61zpoe$('toDate'); var tmp_toRelTo = _resultSet.getInt_61zpoe$('toRelTo'); var tmp_toRelOffSet = _resultSet.getInt_61zpoe$('toRelOffSet'); var tmp_toRelUnit = _resultSet.getInt_61zpoe$('toRelUnit'); var tmp_reportTitle = _resultSet.getString_61zpoe$('reportTitle'); var tmp_reportDescription = _resultSet.getString_61zpoe$('reportDescription'); var tmp_reportSeries = _resultSet.getString_61zpoe$('reportSeries'); var tmp_reportInactive = _resultSet.getBoolean_61zpoe$('reportInactive'); var tmp_isTemplate = _resultSet.getBoolean_61zpoe$('isTemplate'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_reportTitleId = _resultSet.getInt_61zpoe$('reportTitleId'); var tmp_reportDescId = _resultSet.getInt_61zpoe$('reportDescId'); var tmp_reportMasterChangeSeqNum = _resultSet.getLong_61zpoe$('reportMasterChangeSeqNum'); var tmp_reportLocalChangeSeqNum = _resultSet.getLong_61zpoe$('reportLocalChangeSeqNum'); var tmp_reportLastChangedBy = _resultSet.getInt_61zpoe$('reportLastChangedBy'); var tmp_reportLct = _resultSet.getLong_61zpoe$('reportLct'); var _entity = new Report(); _entity.reportUid = tmp_reportUid; _entity.reportOwnerUid = tmp_reportOwnerUid; _entity.xAxis = tmp_xAxis; _entity.reportDateRangeSelection = tmp_reportDateRangeSelection; _entity.fromDate = tmp_fromDate; _entity.fromRelTo = tmp_fromRelTo; _entity.fromRelOffSet = tmp_fromRelOffSet; _entity.fromRelUnit = tmp_fromRelUnit; _entity.toDate = tmp_toDate; _entity.toRelTo = tmp_toRelTo; _entity.toRelOffSet = tmp_toRelOffSet; _entity.toRelUnit = tmp_toRelUnit; _entity.reportTitle = tmp_reportTitle; _entity.reportDescription = tmp_reportDescription; _entity.reportSeries = tmp_reportSeries; _entity.reportInactive = tmp_reportInactive; _entity.isTemplate = tmp_isTemplate; _entity.priority = tmp_priority; _entity.reportTitleId = tmp_reportTitleId; _entity.reportDescId = tmp_reportDescId; _entity.reportMasterChangeSeqNum = tmp_reportMasterChangeSeqNum; _entity.reportLocalChangeSeqNum = tmp_reportLocalChangeSeqNum; _entity.reportLastChangedBy = tmp_reportLastChangedBy; _entity.reportLct = tmp_reportLct; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(closure$isTemplate_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$isTemplate); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(closure$isTemplate_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(closure$isTemplate_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda(this$ReportDao_JdbcKt_0, closure$isTemplate_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$_liveResult = void 0; } Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM REPORT WHERE NOT reportInactive \n | AND isTemplate = ?\n | ORDER BY priority ASC\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM REPORT WHERE NOT reportInactive \n | AND isTemplate = ?\n | ORDER BY priority ASC\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, _stmtConfig, ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(this.local$closure$isTemplate, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReportLive$lambda(this$ReportDao_JdbcKt_0, closure$isTemplate_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda(this$ReportDao_JdbcKt_0, closure$isTemplate_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt.prototype.findAllActiveReportLive_6taknv$ = function (isTemplate) { var _result = new DoorLiveDataImpl(this._db, listOf_0('REPORT'), ReportDao_JdbcKt$findAllActiveReportLive$lambda(this, isTemplate)); return _result; }; function ReportDao_JdbcKt$findAllActiveReportList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_reportUid = _resultSet.getLong_61zpoe$('reportUid'); var tmp_reportOwnerUid = _resultSet.getLong_61zpoe$('reportOwnerUid'); var tmp_xAxis = _resultSet.getInt_61zpoe$('xAxis'); var tmp_reportDateRangeSelection = _resultSet.getInt_61zpoe$('reportDateRangeSelection'); var tmp_fromDate = _resultSet.getLong_61zpoe$('fromDate'); var tmp_fromRelTo = _resultSet.getInt_61zpoe$('fromRelTo'); var tmp_fromRelOffSet = _resultSet.getInt_61zpoe$('fromRelOffSet'); var tmp_fromRelUnit = _resultSet.getInt_61zpoe$('fromRelUnit'); var tmp_toDate = _resultSet.getLong_61zpoe$('toDate'); var tmp_toRelTo = _resultSet.getInt_61zpoe$('toRelTo'); var tmp_toRelOffSet = _resultSet.getInt_61zpoe$('toRelOffSet'); var tmp_toRelUnit = _resultSet.getInt_61zpoe$('toRelUnit'); var tmp_reportTitle = _resultSet.getString_61zpoe$('reportTitle'); var tmp_reportDescription = _resultSet.getString_61zpoe$('reportDescription'); var tmp_reportSeries = _resultSet.getString_61zpoe$('reportSeries'); var tmp_reportInactive = _resultSet.getBoolean_61zpoe$('reportInactive'); var tmp_isTemplate = _resultSet.getBoolean_61zpoe$('isTemplate'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_reportTitleId = _resultSet.getInt_61zpoe$('reportTitleId'); var tmp_reportDescId = _resultSet.getInt_61zpoe$('reportDescId'); var tmp_reportMasterChangeSeqNum = _resultSet.getLong_61zpoe$('reportMasterChangeSeqNum'); var tmp_reportLocalChangeSeqNum = _resultSet.getLong_61zpoe$('reportLocalChangeSeqNum'); var tmp_reportLastChangedBy = _resultSet.getInt_61zpoe$('reportLastChangedBy'); var tmp_reportLct = _resultSet.getLong_61zpoe$('reportLct'); var _entity = new Report(); _entity.reportUid = tmp_reportUid; _entity.reportOwnerUid = tmp_reportOwnerUid; _entity.xAxis = tmp_xAxis; _entity.reportDateRangeSelection = tmp_reportDateRangeSelection; _entity.fromDate = tmp_fromDate; _entity.fromRelTo = tmp_fromRelTo; _entity.fromRelOffSet = tmp_fromRelOffSet; _entity.fromRelUnit = tmp_fromRelUnit; _entity.toDate = tmp_toDate; _entity.toRelTo = tmp_toRelTo; _entity.toRelOffSet = tmp_toRelOffSet; _entity.toRelUnit = tmp_toRelUnit; _entity.reportTitle = tmp_reportTitle; _entity.reportDescription = tmp_reportDescription; _entity.reportSeries = tmp_reportSeries; _entity.reportInactive = tmp_reportInactive; _entity.isTemplate = tmp_isTemplate; _entity.priority = tmp_priority; _entity.reportTitleId = tmp_reportTitleId; _entity.reportDescId = tmp_reportDescId; _entity.reportMasterChangeSeqNum = tmp_reportMasterChangeSeqNum; _entity.reportLocalChangeSeqNum = tmp_reportLocalChangeSeqNum; _entity.reportLastChangedBy = tmp_reportLastChangedBy; _entity.reportLct = tmp_reportLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ReportDao_JdbcKt$findAllActiveReportList$lambda(closure$isTemplate, closure$_result) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isTemplate); useResults(_stmt.executeQuery(), ReportDao_JdbcKt$findAllActiveReportList$lambda$lambda(closure$_result)); return Unit; }; } ReportDao_JdbcKt.prototype.findAllActiveReportList_6taknv$ = function (isTemplate) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM REPORT WHERE NOT reportInactive \n | AND isTemplate = ?\n | ORDER BY priority ASC\n | \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM REPORT WHERE NOT reportInactive \n | AND isTemplate = ?\n | ORDER BY priority ASC\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ReportDao_JdbcKt$findAllActiveReportList$lambda(isTemplate, _result)); return _result.v; }; function ReportDao_JdbcKt$findByUidList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ReportDao_JdbcKt$findByUidList$lambda(this$ReportDao_JdbcKt, closure$uidList, closure$_result) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, this$ReportDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); useResults(_stmt.executeQuery(), ReportDao_JdbcKt$findByUidList$lambda$lambda(closure$_result)); return Unit; }; } ReportDao_JdbcKt.prototype.findByUidList = function (uidList) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT reportUid FROM Report WHERE reportUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT reportUid FROM Report WHERE reportUid IN (?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, ReportDao_JdbcKt$findByUidList$lambda(this, uidList, _result)); return _result.v; }; function Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(closure$toggleVisibility_0, closure$updateTime_0, this$ReportDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$updateTime = closure$updateTime_0; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda; Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setArray_wqp8hw$(3, this.local$this$ReportDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(closure$toggleVisibility_0, closure$updateTime_0, this$ReportDao_JdbcKt_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(closure$toggleVisibility_0, closure$updateTime_0, this$ReportDao_JdbcKt_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityReportItems_cbj1f0$($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityReportItems_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityReportItems_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityReportItems_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityReportItems_cbj1f0$; Coroutine$toggleVisibilityReportItems_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Report \n | SET reportInactive = ?,\n | reportLct = ? \n | WHERE reportUid IN (?)\n | \n '), true, void 0, void 0, trimMargin('\n |\n | UPDATE Report \n | SET reportInactive = ?,\n | reportLct = ? \n | WHERE reportUid IN (?)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(this.local$toggleVisibility, this.local$updateTime, this.$this, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.toggleVisibilityReportItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityReportItems_cbj1f0$(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_JdbcKt.prototype.replaceList = function (entityList) { this._insertAdapterReport_upsert.insertList_4ezy5m$(entityList); }; ReportDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterReport_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_144($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_144.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_144.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_144.prototype.constructor = Coroutine$insertAsync_144; Coroutine$insertAsync_144.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterReport_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_144(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterReport_.insertList_4ezy5m$(entityList); }; function ReportDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.reportOwnerUid); _stmt.setInt_vux9f0$(2, _entity.xAxis); _stmt.setInt_vux9f0$(3, _entity.reportDateRangeSelection); _stmt.setLong_6svq3l$(4, _entity.fromDate); _stmt.setInt_vux9f0$(5, _entity.fromRelTo); _stmt.setInt_vux9f0$(6, _entity.fromRelOffSet); _stmt.setInt_vux9f0$(7, _entity.fromRelUnit); _stmt.setLong_6svq3l$(8, _entity.toDate); _stmt.setInt_vux9f0$(9, _entity.toRelTo); _stmt.setInt_vux9f0$(10, _entity.toRelOffSet); _stmt.setInt_vux9f0$(11, _entity.toRelUnit); _stmt.setString_vqvrqt$(12, _entity.reportTitle); _stmt.setString_vqvrqt$(13, _entity.reportDescription); _stmt.setString_vqvrqt$(14, _entity.reportSeries); _stmt.setBoolean_fzusl$(15, _entity.reportInactive); _stmt.setBoolean_fzusl$(16, _entity.isTemplate); _stmt.setInt_vux9f0$(17, _entity.priority); _stmt.setInt_vux9f0$(18, _entity.reportTitleId); _stmt.setInt_vux9f0$(19, _entity.reportDescId); _stmt.setLong_6svq3l$(20, _entity.reportMasterChangeSeqNum); _stmt.setLong_6svq3l$(21, _entity.reportLocalChangeSeqNum); _stmt.setInt_vux9f0$(22, _entity.reportLastChangedBy); _stmt.setLong_6svq3l$(23, _entity.reportLct); _stmt.setLong_6svq3l$(24, _entity.reportUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ReportDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Report SET reportOwnerUid = ?, xAxis = ?, reportDateRangeSelection = ?, fromDate = ?, fromRelTo = ?, fromRelOffSet = ?, fromRelUnit = ?, toDate = ?, toRelTo = ?, toRelOffSet = ?, toRelUnit = ?, reportTitle = ?, reportDescription = ?, reportSeries = ?, reportInactive = ?, isTemplate = ?, priority = ?, reportTitleId = ?, reportDescId = ?, reportMasterChangeSeqNum = ?, reportLocalChangeSeqNum = ?, reportLastChangedBy = ?, reportLct = ? WHERE reportUid = ?'; prepareAndUseStatement_0(this._db, _sql, ReportDao_JdbcKt$updateList$lambda(entityList)); }; function ReportDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.reportOwnerUid); _stmt.setInt_vux9f0$(2, closure$entity.xAxis); _stmt.setInt_vux9f0$(3, closure$entity.reportDateRangeSelection); _stmt.setLong_6svq3l$(4, closure$entity.fromDate); _stmt.setInt_vux9f0$(5, closure$entity.fromRelTo); _stmt.setInt_vux9f0$(6, closure$entity.fromRelOffSet); _stmt.setInt_vux9f0$(7, closure$entity.fromRelUnit); _stmt.setLong_6svq3l$(8, closure$entity.toDate); _stmt.setInt_vux9f0$(9, closure$entity.toRelTo); _stmt.setInt_vux9f0$(10, closure$entity.toRelOffSet); _stmt.setInt_vux9f0$(11, closure$entity.toRelUnit); _stmt.setString_vqvrqt$(12, closure$entity.reportTitle); _stmt.setString_vqvrqt$(13, closure$entity.reportDescription); _stmt.setString_vqvrqt$(14, closure$entity.reportSeries); _stmt.setBoolean_fzusl$(15, closure$entity.reportInactive); _stmt.setBoolean_fzusl$(16, closure$entity.isTemplate); _stmt.setInt_vux9f0$(17, closure$entity.priority); _stmt.setInt_vux9f0$(18, closure$entity.reportTitleId); _stmt.setInt_vux9f0$(19, closure$entity.reportDescId); _stmt.setLong_6svq3l$(20, closure$entity.reportMasterChangeSeqNum); _stmt.setLong_6svq3l$(21, closure$entity.reportLocalChangeSeqNum); _stmt.setInt_vux9f0$(22, closure$entity.reportLastChangedBy); _stmt.setLong_6svq3l$(23, closure$entity.reportLct); _stmt.setLong_6svq3l$(24, closure$entity.reportUid); return _stmt.executeUpdate(); }; } ReportDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Report SET reportOwnerUid = ?, xAxis = ?, reportDateRangeSelection = ?, fromDate = ?, fromRelTo = ?, fromRelOffSet = ?, fromRelUnit = ?, toDate = ?, toRelTo = ?, toRelOffSet = ?, toRelUnit = ?, reportTitle = ?, reportDescription = ?, reportSeries = ?, reportInactive = ?, isTemplate = ?, priority = ?, reportTitleId = ?, reportDescId = ?, reportMasterChangeSeqNum = ?, reportLocalChangeSeqNum = ?, reportLastChangedBy = ?, reportLct = ? WHERE reportUid = ?'; prepareAndUseStatement_0(this._db, _sql, ReportDao_JdbcKt$update$lambda(entity)); }; function ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO Report (reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING reportUid'; } else tmp$ = ''; return "INSERT INTO Report (reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES(COALESCE(?,nextval('Report_reportUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = excluded.reportOwnerUid,xAxis = excluded.xAxis,reportDateRangeSelection = excluded.reportDateRangeSelection,fromDate = excluded.fromDate,fromRelTo = excluded.fromRelTo,fromRelOffSet = excluded.fromRelOffSet,fromRelUnit = excluded.fromRelUnit,toDate = excluded.toDate,toRelTo = excluded.toRelTo,toRelOffSet = excluded.toRelOffSet,toRelUnit = excluded.toRelUnit,reportTitle = excluded.reportTitle,reportDescription = excluded.reportDescription,reportSeries = excluded.reportSeries,reportInactive = excluded.reportInactive,isTemplate = excluded.isTemplate,priority = excluded.priority,reportTitleId = excluded.reportTitleId,reportDescId = excluded.reportDescId,reportMasterChangeSeqNum = excluded.reportMasterChangeSeqNum,reportLocalChangeSeqNum = excluded.reportLocalChangeSeqNum,reportLastChangedBy = excluded.reportLastChangedBy,reportLct = excluded.reportLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.reportUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.reportUid); } stmt.setLong_6svq3l$(2, entity.reportOwnerUid); stmt.setInt_vux9f0$(3, entity.xAxis); stmt.setInt_vux9f0$(4, entity.reportDateRangeSelection); stmt.setLong_6svq3l$(5, entity.fromDate); stmt.setInt_vux9f0$(6, entity.fromRelTo); stmt.setInt_vux9f0$(7, entity.fromRelOffSet); stmt.setInt_vux9f0$(8, entity.fromRelUnit); stmt.setLong_6svq3l$(9, entity.toDate); stmt.setInt_vux9f0$(10, entity.toRelTo); stmt.setInt_vux9f0$(11, entity.toRelOffSet); stmt.setInt_vux9f0$(12, entity.toRelUnit); stmt.setString_vqvrqt$(13, entity.reportTitle); stmt.setString_vqvrqt$(14, entity.reportDescription); stmt.setString_vqvrqt$(15, entity.reportSeries); stmt.setBoolean_fzusl$(16, entity.reportInactive); stmt.setBoolean_fzusl$(17, entity.isTemplate); stmt.setInt_vux9f0$(18, entity.priority); stmt.setInt_vux9f0$(19, entity.reportTitleId); stmt.setInt_vux9f0$(20, entity.reportDescId); stmt.setLong_6svq3l$(21, entity.reportMasterChangeSeqNum); stmt.setLong_6svq3l$(22, entity.reportLocalChangeSeqNum); stmt.setInt_vux9f0$(23, entity.reportLastChangedBy); stmt.setLong_6svq3l$(24, entity.reportLct); }; ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Report (reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING reportUid'; } else tmp$ = ''; return "INSERT INTO Report (reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES(COALESCE(?,nextval('Report_reportUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.reportUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.reportUid); } stmt.setLong_6svq3l$(2, entity.reportOwnerUid); stmt.setInt_vux9f0$(3, entity.xAxis); stmt.setInt_vux9f0$(4, entity.reportDateRangeSelection); stmt.setLong_6svq3l$(5, entity.fromDate); stmt.setInt_vux9f0$(6, entity.fromRelTo); stmt.setInt_vux9f0$(7, entity.fromRelOffSet); stmt.setInt_vux9f0$(8, entity.fromRelUnit); stmt.setLong_6svq3l$(9, entity.toDate); stmt.setInt_vux9f0$(10, entity.toRelTo); stmt.setInt_vux9f0$(11, entity.toRelOffSet); stmt.setInt_vux9f0$(12, entity.toRelUnit); stmt.setString_vqvrqt$(13, entity.reportTitle); stmt.setString_vqvrqt$(14, entity.reportDescription); stmt.setString_vqvrqt$(15, entity.reportSeries); stmt.setBoolean_fzusl$(16, entity.reportInactive); stmt.setBoolean_fzusl$(17, entity.isTemplate); stmt.setInt_vux9f0$(18, entity.priority); stmt.setInt_vux9f0$(19, entity.reportTitleId); stmt.setInt_vux9f0$(20, entity.reportDescId); stmt.setLong_6svq3l$(21, entity.reportMasterChangeSeqNum); stmt.setLong_6svq3l$(22, entity.reportLocalChangeSeqNum); stmt.setInt_vux9f0$(23, entity.reportLastChangedBy); stmt.setLong_6svq3l$(24, entity.reportLct); }; ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ReportDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao_JdbcKt', interfaces: [ReportDao]}; function ReportDao_ReplicateWrapper(_db, _dao) { ReportDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeTemplates_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.replicateOnNewNodeTemplates_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeTemplates_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeTemplates_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeTemplates_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeTemplates_0.prototype.constructor = Coroutine$replicateOnChangeTemplates_0; Coroutine$replicateOnChangeTemplates_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeTemplates(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.replicateOnChangeTemplates = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeTemplates_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.getResults_j49vja$ = function (query) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.findAllActiveReport_dw84ek$ = function (searchBit, personUid, sortOrder, isTemplate) { return this._dao_0.findAllActiveReport_dw84ek$(searchBit, personUid, sortOrder, isTemplate); }; ReportDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (entityUid, continuation) { return this._dao_0.findByUid_s8cxhz$(entityUid, continuation); }; function Coroutine$updateAsync_7abdyy$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7abdyy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7abdyy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7abdyy$_0.prototype.constructor = Coroutine$updateAsync_7abdyy$_0; Coroutine$updateAsync_7abdyy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$entity.reportLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_7abdyy$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.updateAsync_7abdyy$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7abdyy$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ReportDao_ReplicateWrapper.prototype.findAllActiveReportLive_6taknv$ = function (isTemplate) { return this._dao_0.findAllActiveReportLive_6taknv$(isTemplate); }; ReportDao_ReplicateWrapper.prototype.findAllActiveReportList_6taknv$ = function (isTemplate) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.findByUidList = function (uidList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$toggleVisibilityReportItems_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityReportItems_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityReportItems_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityReportItems_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityReportItems_cbj1f0$_0; Coroutine$toggleVisibilityReportItems_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityReportItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.toggleVisibilityReportItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityReportItems_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.replaceList = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_145($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_145.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_145.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_145.prototype.constructor = Coroutine$insertAsync_145; Coroutine$insertAsync_145.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.reportUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(101, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.reportUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.reportLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.reportUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_145(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao_ReplicateWrapper', interfaces: [ReportDao]}; function ReportDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ReportDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeTemplates_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.replicateOnNewNodeTemplates_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeTemplates_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeTemplates_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeTemplates_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeTemplates_1.prototype.constructor = Coroutine$replicateOnChangeTemplates_1; Coroutine$replicateOnChangeTemplates_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeTemplates(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.replicateOnChangeTemplates = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeTemplates_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.getResults_j49vja$ = function (query) { var _result = this._dao.getResults_j49vja$(query); return _result; }; ReportDao_Repo.prototype.findAllActiveReport_dw84ek$ = function (searchBit, personUid, sortOrder, isTemplate) { var _result = this._dao.findAllActiveReport_dw84ek$(searchBit, personUid, sortOrder, isTemplate); return _result; }; function Coroutine$findByUid_s8cxhz$_6($this, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityUid = entityUid_0; } Coroutine$findByUid_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_6.prototype.constructor = Coroutine$findByUid_s8cxhz$_6; Coroutine$findByUid_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$entityUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.findByUid_s8cxhz$ = function (entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_6(this, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_7abdyy$_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7abdyy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7abdyy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7abdyy$_1.prototype.constructor = Coroutine$updateAsync_7abdyy$_1; Coroutine$updateAsync_7abdyy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_7abdyy$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.updateAsync_7abdyy$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7abdyy$_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; ReportDao_Repo.prototype.findAllActiveReportLive_6taknv$ = function (isTemplate) { var _result = this._dao.findAllActiveReportLive_6taknv$(isTemplate); return _result; }; ReportDao_Repo.prototype.findAllActiveReportList_6taknv$ = function (isTemplate) { var _result = this._dao.findAllActiveReportList_6taknv$(isTemplate); return _result; }; ReportDao_Repo.prototype.findByUidList = function (uidList) { var _result = this._dao.findByUidList(uidList); return _result; }; function Coroutine$toggleVisibilityReportItems_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityReportItems_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityReportItems_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityReportItems_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityReportItems_cbj1f0$_1; Coroutine$toggleVisibilityReportItems_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityReportItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.toggleVisibilityReportItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityReportItems_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.replaceList = function (entityList) { this._dao.replaceList(entityList); }; ReportDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_146($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_146.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_146.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_146.prototype.constructor = Coroutine$insertAsync_146; Coroutine$insertAsync_146.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_146(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ReportDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ReportDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ReportDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao_Repo', interfaces: [ReportDao]}; function ScheduleDao_JdbcKt(_db) { ScheduleDao.call(this); this._db = _db; this._insertAdapterSchedule_ = new ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral(this._db); } function Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_137($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_137.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_137.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_137.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_137; Coroutine$replicateOnNewNode_s8cxhz$_137.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS schedulePk,\n | ? AS scheduleDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN Schedule\n | ON Schedule.scheduleClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = ?), 0) \n | /*psql ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS schedulePk,\n | ? AS scheduleDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN Schedule\n | ON Schedule.scheduleClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = ?), 0) \n | ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScheduleDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_137(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda; Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_140($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_140.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_140.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_140.prototype.constructor = Coroutine$replicateOnChange_140; Coroutine$replicateOnChange_140.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS scheduleUid,\n | UserSession.usClientNodeId AS scheduleDestination\n | FROM ChangeLog\n | JOIN Schedule\n | ON ChangeLog.chTableId = 21\n | AND Schedule.scheduleUid = ChangeLog.chEntityPk\n | JOIN Clazz\n | ON Clazz.clazzUid = Schedule.scheduleClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS scheduleUid,\n | UserSession.usClientNodeId AS scheduleDestination\n | FROM ChangeLog\n | JOIN Schedule\n | ON ChangeLog.chTableId = 21\n | AND Schedule.scheduleUid = ChangeLog.chEntityPk\n | JOIN Clazz\n | ON Clazz.clazzUid = Schedule.scheduleClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScheduleDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_140(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterSchedule_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda; Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.sceduleStartTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.scheduleEndTime); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.scheduleDay); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$entity.scheduleMonth); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.scheduleFrequency); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.umCalendarUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.scheduleClazzUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.scheduleMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.scheduleLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$entity.scheduleLastChangedBy); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.scheduleLastChangedTime); this.local$_stmt.setBoolean_fzusl$(12, this.local$closure$entity.scheduleActive); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.scheduleUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_y5fcmb$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_y5fcmb$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y5fcmb$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y5fcmb$.prototype.constructor = Coroutine$updateAsync_y5fcmb$; Coroutine$updateAsync_y5fcmb$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScheduleDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.updateAsync_y5fcmb$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y5fcmb$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda(closure$active_0, closure$changeTime_0, closure$scheduleUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$scheduleUid = closure$scheduleUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda; Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$scheduleUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$updateScheduleActivated$lambda(closure$active_0, closure$changeTime_0, closure$scheduleUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda(closure$active_0, closure$changeTime_0, closure$scheduleUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateScheduleActivated_zaz62j$($this, scheduleUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scheduleUid = scheduleUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateScheduleActivated_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateScheduleActivated_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateScheduleActivated_zaz62j$.prototype.constructor = Coroutine$updateScheduleActivated_zaz62j$; Coroutine$updateScheduleActivated_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Schedule \n | SET scheduleActive = ?,\n | scheduleLastChangedTime = ?\n | WHERE scheduleUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Schedule \n | SET scheduleActive = ?,\n | scheduleLastChangedTime = ?\n | WHERE scheduleUid = ?\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScheduleDao_JdbcKt$updateScheduleActivated$lambda(this.local$active, this.local$changeTime, this.local$scheduleUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.updateScheduleActivated_zaz62j$ = function (scheduleUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateScheduleActivated_zaz62j$(this, scheduleUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScheduleDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_scheduleUid = _resultSet.getLong_61zpoe$('scheduleUid'); var tmp_sceduleStartTime = _resultSet.getLong_61zpoe$('sceduleStartTime'); var tmp_scheduleEndTime = _resultSet.getLong_61zpoe$('scheduleEndTime'); var tmp_scheduleDay = _resultSet.getInt_61zpoe$('scheduleDay'); var tmp_scheduleMonth = _resultSet.getInt_61zpoe$('scheduleMonth'); var tmp_scheduleFrequency = _resultSet.getInt_61zpoe$('scheduleFrequency'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_scheduleClazzUid = _resultSet.getLong_61zpoe$('scheduleClazzUid'); var tmp_scheduleMasterChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var tmp_scheduleLocalChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var tmp_scheduleLastChangedBy = _resultSet.getInt_61zpoe$('scheduleLastChangedBy'); var tmp_scheduleLastChangedTime = _resultSet.getLong_61zpoe$('scheduleLastChangedTime'); var tmp_scheduleActive = _resultSet.getBoolean_61zpoe$('scheduleActive'); var _entity = new Schedule(); _entity.scheduleUid = tmp_scheduleUid; _entity.sceduleStartTime = tmp_sceduleStartTime; _entity.scheduleEndTime = tmp_scheduleEndTime; _entity.scheduleDay = tmp_scheduleDay; _entity.scheduleMonth = tmp_scheduleMonth; _entity.scheduleFrequency = tmp_scheduleFrequency; _entity.umCalendarUid = tmp_umCalendarUid; _entity.scheduleClazzUid = tmp_scheduleClazzUid; _entity.scheduleMasterChangeSeqNum = tmp_scheduleMasterChangeSeqNum; _entity.scheduleLocalChangeSeqNum = tmp_scheduleLocalChangeSeqNum; _entity.scheduleLastChangedBy = tmp_scheduleLastChangedBy; _entity.scheduleLastChangedTime = tmp_scheduleLastChangedTime; _entity.scheduleActive = tmp_scheduleActive; closure$_result.v = _entity; }return Unit; }; } function ScheduleDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ScheduleDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ScheduleDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Schedule) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Schedule WHERE scheduleUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScheduleDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; function ScheduleDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_scheduleUid = _resultSet.getLong_61zpoe$('scheduleUid'); var tmp_sceduleStartTime = _resultSet.getLong_61zpoe$('sceduleStartTime'); var tmp_scheduleEndTime = _resultSet.getLong_61zpoe$('scheduleEndTime'); var tmp_scheduleDay = _resultSet.getInt_61zpoe$('scheduleDay'); var tmp_scheduleMonth = _resultSet.getInt_61zpoe$('scheduleMonth'); var tmp_scheduleFrequency = _resultSet.getInt_61zpoe$('scheduleFrequency'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_scheduleClazzUid = _resultSet.getLong_61zpoe$('scheduleClazzUid'); var tmp_scheduleMasterChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var tmp_scheduleLocalChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var tmp_scheduleLastChangedBy = _resultSet.getInt_61zpoe$('scheduleLastChangedBy'); var tmp_scheduleLastChangedTime = _resultSet.getLong_61zpoe$('scheduleLastChangedTime'); var tmp_scheduleActive = _resultSet.getBoolean_61zpoe$('scheduleActive'); var _entity = new Schedule(); _entity.scheduleUid = tmp_scheduleUid; _entity.sceduleStartTime = tmp_sceduleStartTime; _entity.scheduleEndTime = tmp_scheduleEndTime; _entity.scheduleDay = tmp_scheduleDay; _entity.scheduleMonth = tmp_scheduleMonth; _entity.scheduleFrequency = tmp_scheduleFrequency; _entity.umCalendarUid = tmp_umCalendarUid; _entity.scheduleClazzUid = tmp_scheduleClazzUid; _entity.scheduleMasterChangeSeqNum = tmp_scheduleMasterChangeSeqNum; _entity.scheduleLocalChangeSeqNum = tmp_scheduleLocalChangeSeqNum; _entity.scheduleLastChangedBy = tmp_scheduleLastChangedBy; _entity.scheduleLastChangedTime = tmp_scheduleLastChangedTime; _entity.scheduleActive = tmp_scheduleActive; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda; Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_28($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_28.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_28; Coroutine$findByUidAsync_s8cxhz$_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Schedule) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Schedule WHERE scheduleUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScheduleDao_JdbcKt$findByUidAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_28(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral(this$ScheduleDao_JdbcKt, closure$clazzUid) { this.this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; DoorDataSourceFactory.call(this); } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_scheduleUid = _resultSet.getLong_61zpoe$('scheduleUid'); var tmp_sceduleStartTime = _resultSet.getLong_61zpoe$('sceduleStartTime'); var tmp_scheduleEndTime = _resultSet.getLong_61zpoe$('scheduleEndTime'); var tmp_scheduleDay = _resultSet.getInt_61zpoe$('scheduleDay'); var tmp_scheduleMonth = _resultSet.getInt_61zpoe$('scheduleMonth'); var tmp_scheduleFrequency = _resultSet.getInt_61zpoe$('scheduleFrequency'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_scheduleClazzUid = _resultSet.getLong_61zpoe$('scheduleClazzUid'); var tmp_scheduleMasterChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var tmp_scheduleLocalChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var tmp_scheduleLastChangedBy = _resultSet.getInt_61zpoe$('scheduleLastChangedBy'); var tmp_scheduleLastChangedTime = _resultSet.getLong_61zpoe$('scheduleLastChangedTime'); var tmp_scheduleActive = _resultSet.getBoolean_61zpoe$('scheduleActive'); var _entity = new Schedule(); _entity.scheduleUid = tmp_scheduleUid; _entity.sceduleStartTime = tmp_sceduleStartTime; _entity.scheduleEndTime = tmp_scheduleEndTime; _entity.scheduleDay = tmp_scheduleDay; _entity.scheduleMonth = tmp_scheduleMonth; _entity.scheduleFrequency = tmp_scheduleFrequency; _entity.umCalendarUid = tmp_umCalendarUid; _entity.scheduleClazzUid = tmp_scheduleClazzUid; _entity.scheduleMasterChangeSeqNum = tmp_scheduleMasterChangeSeqNum; _entity.scheduleLocalChangeSeqNum = tmp_scheduleLocalChangeSeqNum; _entity.scheduleLastChangedBy = tmp_scheduleLastChangedBy; _entity.scheduleLastChangedTime = tmp_scheduleLastChangedTime; _entity.scheduleActive = tmp_scheduleActive; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM (SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ) LIMIT ? OFFSET ? ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScheduleDao_JdbcKt._db, _stmtConfig, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ScheduleDao_JdbcKt._db, listOf_0('Schedule'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this.this$ScheduleDao_JdbcKt, this.closure$clazzUid, _limit, _offset)); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_liveResult = void 0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ) ', void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScheduleDao_JdbcKt._db, _stmtConfig, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ScheduleDao_JdbcKt._db, listOf_0('Schedule'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this.this$ScheduleDao_JdbcKt, this.closure$clazzUid)); }; ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUid_s8cxhz$ = function (clazzUid) { var _result = new ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral(this, clazzUid); return _result; }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_scheduleUid = _resultSet.getLong_61zpoe$('scheduleUid'); var tmp_sceduleStartTime = _resultSet.getLong_61zpoe$('sceduleStartTime'); var tmp_scheduleEndTime = _resultSet.getLong_61zpoe$('scheduleEndTime'); var tmp_scheduleDay = _resultSet.getInt_61zpoe$('scheduleDay'); var tmp_scheduleMonth = _resultSet.getInt_61zpoe$('scheduleMonth'); var tmp_scheduleFrequency = _resultSet.getInt_61zpoe$('scheduleFrequency'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_scheduleClazzUid = _resultSet.getLong_61zpoe$('scheduleClazzUid'); var tmp_scheduleMasterChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var tmp_scheduleLocalChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var tmp_scheduleLastChangedBy = _resultSet.getInt_61zpoe$('scheduleLastChangedBy'); var tmp_scheduleLastChangedTime = _resultSet.getLong_61zpoe$('scheduleLastChangedTime'); var tmp_scheduleActive = _resultSet.getBoolean_61zpoe$('scheduleActive'); var _entity = new Schedule(); _entity.scheduleUid = tmp_scheduleUid; _entity.sceduleStartTime = tmp_sceduleStartTime; _entity.scheduleEndTime = tmp_scheduleEndTime; _entity.scheduleDay = tmp_scheduleDay; _entity.scheduleMonth = tmp_scheduleMonth; _entity.scheduleFrequency = tmp_scheduleFrequency; _entity.umCalendarUid = tmp_umCalendarUid; _entity.scheduleClazzUid = tmp_scheduleClazzUid; _entity.scheduleMasterChangeSeqNum = tmp_scheduleMasterChangeSeqNum; _entity.scheduleLocalChangeSeqNum = tmp_scheduleLocalChangeSeqNum; _entity.scheduleLastChangedBy = tmp_scheduleLastChangedBy; _entity.scheduleLastChangedTime = tmp_scheduleLastChangedTime; _entity.scheduleActive = tmp_scheduleActive; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda(closure$clazzUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$clazzUid); useResults(_stmt.executeQuery(), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda$lambda(closure$_result)); return Unit; }; } ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUidAsList_s8cxhz$ = function (clazzUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda(clazzUid, _result)); return _result.v; }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_scheduleUid = _resultSet.getLong_61zpoe$('scheduleUid'); var tmp_sceduleStartTime = _resultSet.getLong_61zpoe$('sceduleStartTime'); var tmp_scheduleEndTime = _resultSet.getLong_61zpoe$('scheduleEndTime'); var tmp_scheduleDay = _resultSet.getInt_61zpoe$('scheduleDay'); var tmp_scheduleMonth = _resultSet.getInt_61zpoe$('scheduleMonth'); var tmp_scheduleFrequency = _resultSet.getInt_61zpoe$('scheduleFrequency'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_scheduleClazzUid = _resultSet.getLong_61zpoe$('scheduleClazzUid'); var tmp_scheduleMasterChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var tmp_scheduleLocalChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var tmp_scheduleLastChangedBy = _resultSet.getInt_61zpoe$('scheduleLastChangedBy'); var tmp_scheduleLastChangedTime = _resultSet.getLong_61zpoe$('scheduleLastChangedTime'); var tmp_scheduleActive = _resultSet.getBoolean_61zpoe$('scheduleActive'); var _entity = new Schedule(); _entity.scheduleUid = tmp_scheduleUid; _entity.sceduleStartTime = tmp_sceduleStartTime; _entity.scheduleEndTime = tmp_scheduleEndTime; _entity.scheduleDay = tmp_scheduleDay; _entity.scheduleMonth = tmp_scheduleMonth; _entity.scheduleFrequency = tmp_scheduleFrequency; _entity.umCalendarUid = tmp_umCalendarUid; _entity.scheduleClazzUid = tmp_scheduleClazzUid; _entity.scheduleMasterChangeSeqNum = tmp_scheduleMasterChangeSeqNum; _entity.scheduleLocalChangeSeqNum = tmp_scheduleLocalChangeSeqNum; _entity.scheduleLastChangedBy = tmp_scheduleLastChangedBy; _entity.scheduleLastChangedTime = tmp_scheduleLastChangedTime; _entity.scheduleActive = tmp_scheduleActive; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(closure$clazzUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_liveResult = void 0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScheduleDao_JdbcKt._db, _stmtConfig, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(this.local$closure$clazzUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUidAsLiveList_s8cxhz$ = function (clazzUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('Schedule'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this, clazzUid)); return _result; }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_scheduleUid = _resultSet.getLong_61zpoe$('scheduleUid'); var tmp_sceduleStartTime = _resultSet.getLong_61zpoe$('sceduleStartTime'); var tmp_scheduleEndTime = _resultSet.getLong_61zpoe$('scheduleEndTime'); var tmp_scheduleDay = _resultSet.getInt_61zpoe$('scheduleDay'); var tmp_scheduleMonth = _resultSet.getInt_61zpoe$('scheduleMonth'); var tmp_scheduleFrequency = _resultSet.getInt_61zpoe$('scheduleFrequency'); var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); var tmp_scheduleClazzUid = _resultSet.getLong_61zpoe$('scheduleClazzUid'); var tmp_scheduleMasterChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var tmp_scheduleLocalChangeSeqNum = _resultSet.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var tmp_scheduleLastChangedBy = _resultSet.getInt_61zpoe$('scheduleLastChangedBy'); var tmp_scheduleLastChangedTime = _resultSet.getLong_61zpoe$('scheduleLastChangedTime'); var tmp_scheduleActive = _resultSet.getBoolean_61zpoe$('scheduleActive'); var _entity = new Schedule(); _entity.scheduleUid = tmp_scheduleUid; _entity.sceduleStartTime = tmp_sceduleStartTime; _entity.scheduleEndTime = tmp_scheduleEndTime; _entity.scheduleDay = tmp_scheduleDay; _entity.scheduleMonth = tmp_scheduleMonth; _entity.scheduleFrequency = tmp_scheduleFrequency; _entity.umCalendarUid = tmp_umCalendarUid; _entity.scheduleClazzUid = tmp_scheduleClazzUid; _entity.scheduleMasterChangeSeqNum = tmp_scheduleMasterChangeSeqNum; _entity.scheduleLocalChangeSeqNum = tmp_scheduleLocalChangeSeqNum; _entity.scheduleLastChangedBy = tmp_scheduleLastChangedBy; _entity.scheduleLastChangedTime = tmp_scheduleLastChangedTime; _entity.scheduleActive = tmp_scheduleActive; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(closure$clazzUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUid = clazzUid_0; } Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$; Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(this.local$clazzUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_149($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_149.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_149.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_149.prototype.constructor = Coroutine$insertAsync_149; Coroutine$insertAsync_149.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchedule_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_149(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterSchedule_.insertList_4ezy5m$(entityList); }; function ScheduleDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.sceduleStartTime); _stmt.setLong_6svq3l$(2, _entity.scheduleEndTime); _stmt.setInt_vux9f0$(3, _entity.scheduleDay); _stmt.setInt_vux9f0$(4, _entity.scheduleMonth); _stmt.setInt_vux9f0$(5, _entity.scheduleFrequency); _stmt.setLong_6svq3l$(6, _entity.umCalendarUid); _stmt.setLong_6svq3l$(7, _entity.scheduleClazzUid); _stmt.setLong_6svq3l$(8, _entity.scheduleMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, _entity.scheduleLocalChangeSeqNum); _stmt.setInt_vux9f0$(10, _entity.scheduleLastChangedBy); _stmt.setLong_6svq3l$(11, _entity.scheduleLastChangedTime); _stmt.setBoolean_fzusl$(12, _entity.scheduleActive); _stmt.setLong_6svq3l$(13, _entity.scheduleUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ScheduleDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScheduleDao_JdbcKt$updateList$lambda(entityList)); }; function ScheduleDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.sceduleStartTime); _stmt.setLong_6svq3l$(2, closure$entity.scheduleEndTime); _stmt.setInt_vux9f0$(3, closure$entity.scheduleDay); _stmt.setInt_vux9f0$(4, closure$entity.scheduleMonth); _stmt.setInt_vux9f0$(5, closure$entity.scheduleFrequency); _stmt.setLong_6svq3l$(6, closure$entity.umCalendarUid); _stmt.setLong_6svq3l$(7, closure$entity.scheduleClazzUid); _stmt.setLong_6svq3l$(8, closure$entity.scheduleMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, closure$entity.scheduleLocalChangeSeqNum); _stmt.setInt_vux9f0$(10, closure$entity.scheduleLastChangedBy); _stmt.setLong_6svq3l$(11, closure$entity.scheduleLastChangedTime); _stmt.setBoolean_fzusl$(12, closure$entity.scheduleActive); _stmt.setLong_6svq3l$(13, closure$entity.scheduleUid); return _stmt.executeUpdate(); }; } ScheduleDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScheduleDao_JdbcKt$update$lambda(entity)); }; function Coroutine$insertListAsync_4ezy5m$_20($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_20.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_20; Coroutine$insertListAsync_4ezy5m$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchedule_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_20(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda; Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.sceduleStartTime); this.local$_stmt.setLong_6svq3l$(2, _entity.scheduleEndTime); this.local$_stmt.setInt_vux9f0$(3, _entity.scheduleDay); this.local$_stmt.setInt_vux9f0$(4, _entity.scheduleMonth); this.local$_stmt.setInt_vux9f0$(5, _entity.scheduleFrequency); this.local$_stmt.setLong_6svq3l$(6, _entity.umCalendarUid); this.local$_stmt.setLong_6svq3l$(7, _entity.scheduleClazzUid); this.local$_stmt.setLong_6svq3l$(8, _entity.scheduleMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(9, _entity.scheduleLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(10, _entity.scheduleLastChangedBy); this.local$_stmt.setLong_6svq3l$(11, _entity.scheduleLastChangedTime); this.local$_stmt.setBoolean_fzusl$(12, _entity.scheduleActive); this.local$_stmt.setLong_6svq3l$(13, _entity.scheduleUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_20($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_20.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_20; Coroutine$updateListAsync_4ezy5m$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScheduleDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_20(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Schedule (scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING scheduleUid'; } else tmp$ = ''; return "INSERT INTO Schedule (scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES(COALESCE(?,nextval('Schedule_scheduleUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.scheduleUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.scheduleUid); } stmt.setLong_6svq3l$(2, entity.sceduleStartTime); stmt.setLong_6svq3l$(3, entity.scheduleEndTime); stmt.setInt_vux9f0$(4, entity.scheduleDay); stmt.setInt_vux9f0$(5, entity.scheduleMonth); stmt.setInt_vux9f0$(6, entity.scheduleFrequency); stmt.setLong_6svq3l$(7, entity.umCalendarUid); stmt.setLong_6svq3l$(8, entity.scheduleClazzUid); stmt.setLong_6svq3l$(9, entity.scheduleMasterChangeSeqNum); stmt.setLong_6svq3l$(10, entity.scheduleLocalChangeSeqNum); stmt.setInt_vux9f0$(11, entity.scheduleLastChangedBy); stmt.setLong_6svq3l$(12, entity.scheduleLastChangedTime); stmt.setBoolean_fzusl$(13, entity.scheduleActive); }; ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScheduleDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao_JdbcKt', interfaces: [ScheduleDao]}; function ScheduleDao_ReplicateWrapper(_db, _dao) { ScheduleDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_138($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_138.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_138.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_138.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_138; Coroutine$replicateOnNewNode_s8cxhz$_138.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_138(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_141($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_141.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_141.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_141.prototype.constructor = Coroutine$replicateOnChange_141; Coroutine$replicateOnChange_141.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_141(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.updateAsync_y5fcmb$ = function (entity, continuation) { entity.scheduleLastChangedTime = systemTimeInMillis(); return this._dao_0.updateAsync_y5fcmb$(entity, continuation); }; function Coroutine$updateScheduleActivated_zaz62j$_0($this, scheduleUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scheduleUid = scheduleUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateScheduleActivated_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateScheduleActivated_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateScheduleActivated_zaz62j$_0.prototype.constructor = Coroutine$updateScheduleActivated_zaz62j$_0; Coroutine$updateScheduleActivated_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateScheduleActivated_zaz62j$(this.local$scheduleUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.updateScheduleActivated_zaz62j$ = function (scheduleUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateScheduleActivated_zaz62j$_0(this, scheduleUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUid_s8cxhz$ = function (clazzUid) { return this._dao_0.findAllSchedulesByClazzUid_s8cxhz$(clazzUid); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUidAsList_s8cxhz$ = function (clazzUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUidAsLiveList_s8cxhz$ = function (clazzUid) { return this._dao_0.findAllSchedulesByClazzUidAsLiveList_s8cxhz$(clazzUid); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.findAllSchedulesByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; function Coroutine$insertAsync_150($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_150.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_150.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_150.prototype.constructor = Coroutine$insertAsync_150; Coroutine$insertAsync_150.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.scheduleUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(21, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.scheduleUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.scheduleLastChangedTime = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.scheduleUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_150(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_21($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_21.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_21; Coroutine$insertListAsync_4ezy5m$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.scheduleUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(21, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.scheduleUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.scheduleLastChangedTime = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_21(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_21($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_21.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_21; Coroutine$updateListAsync_4ezy5m$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.scheduleLastChangedTime = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_21(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao_ReplicateWrapper', interfaces: [ScheduleDao]}; function ScheduleDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ScheduleDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_139($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_139.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_139.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_139.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_139; Coroutine$replicateOnNewNode_s8cxhz$_139.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_139(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_142($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_142.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_142.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_142.prototype.constructor = Coroutine$replicateOnChange_142; Coroutine$replicateOnChange_142.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_142(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$updateAsync_y5fcmb$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_y5fcmb$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y5fcmb$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y5fcmb$_0.prototype.constructor = Coroutine$updateAsync_y5fcmb$_0; Coroutine$updateAsync_y5fcmb$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_y5fcmb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.updateAsync_y5fcmb$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y5fcmb$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateScheduleActivated_zaz62j$_1($this, scheduleUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scheduleUid = scheduleUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateScheduleActivated_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateScheduleActivated_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateScheduleActivated_zaz62j$_1.prototype.constructor = Coroutine$updateScheduleActivated_zaz62j$_1; Coroutine$updateScheduleActivated_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateScheduleActivated_zaz62j$(this.local$scheduleUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.updateScheduleActivated_zaz62j$ = function (scheduleUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateScheduleActivated_zaz62j$_1(this, scheduleUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_29($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_29.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_29; Coroutine$findByUidAsync_s8cxhz$_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_29(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUid_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllSchedulesByClazzUid_s8cxhz$(clazzUid); return _result; }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUidAsList_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllSchedulesByClazzUidAsList_s8cxhz$(clazzUid); return _result; }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUidAsLiveList_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllSchedulesByClazzUidAsLiveList_s8cxhz$(clazzUid); return _result; }; function Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0; Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllSchedulesByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$_0(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_151($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_151.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_151.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_151.prototype.constructor = Coroutine$insertAsync_151; Coroutine$insertAsync_151.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_151(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ScheduleDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ScheduleDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_22($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_22.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_22; Coroutine$insertListAsync_4ezy5m$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_22(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_22($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_22.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_22; Coroutine$updateListAsync_4ezy5m$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_22(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao_Repo', interfaces: [ScheduleDao]}; function ScheduledCheckDao_JdbcKt(_db) { ScheduledCheckDao.call(this); this._db = _db; this._insertAdapterScheduledCheck_ = new ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral(this._db); } function ScheduledCheckDao_JdbcKt$deleteCheck$lambda(closure$scheduledCheck, closure$_numChanges) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$scheduledCheck.scheduledCheckUid); closure$_numChanges.v = closure$_numChanges.v + _stmt.executeUpdate() | 0; return Unit; }; } ScheduledCheckDao_JdbcKt.prototype.deleteCheck_5xomu9$ = function (scheduledCheck) { var _numChanges = {v: 0}; prepareAndUseStatement_0(this._db, 'DELETE FROM ScheduledCheck WHERE scheduledCheckUid = ?', ScheduledCheckDao_JdbcKt$deleteCheck$lambda(scheduledCheck, _numChanges)); }; function ScheduledCheckDao_JdbcKt$findPendingLogsWithoutScheduledCheck$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_clazzLogUid = _resultSet.getLong_61zpoe$('clazzLogUid'); var tmp_clazzLogClazzUid = _resultSet.getLong_61zpoe$('clazzLogClazzUid'); var tmp_logDate = _resultSet.getLong_61zpoe$('logDate'); var tmp_timeRecorded = _resultSet.getLong_61zpoe$('timeRecorded'); var tmp_clazzLogDone = _resultSet.getBoolean_61zpoe$('clazzLogDone'); var tmp_cancellationNote = _resultSet.getString_61zpoe$('cancellationNote'); var tmp_clazzLogCancelled = _resultSet.getBoolean_61zpoe$('clazzLogCancelled'); var tmp_clazzLogNumPresent = _resultSet.getInt_61zpoe$('clazzLogNumPresent'); var tmp_clazzLogNumAbsent = _resultSet.getInt_61zpoe$('clazzLogNumAbsent'); var tmp_clazzLogNumPartial = _resultSet.getInt_61zpoe$('clazzLogNumPartial'); var tmp_clazzLogScheduleUid = _resultSet.getLong_61zpoe$('clazzLogScheduleUid'); var tmp_clazzLogStatusFlag = _resultSet.getInt_61zpoe$('clazzLogStatusFlag'); var tmp_clazzLogMSQN = _resultSet.getLong_61zpoe$('clazzLogMSQN'); var tmp_clazzLogLCSN = _resultSet.getLong_61zpoe$('clazzLogLCSN'); var tmp_clazzLogLCB = _resultSet.getInt_61zpoe$('clazzLogLCB'); var tmp_clazzLogLastChangedTime = _resultSet.getLong_61zpoe$('clazzLogLastChangedTime'); var _entity = new ClazzLog(); _entity.clazzLogUid = tmp_clazzLogUid; _entity.clazzLogClazzUid = tmp_clazzLogClazzUid; _entity.logDate = tmp_logDate; _entity.timeRecorded = tmp_timeRecorded; _entity.clazzLogDone = tmp_clazzLogDone; _entity.cancellationNote = tmp_cancellationNote; _entity.clazzLogCancelled = tmp_clazzLogCancelled; _entity.clazzLogNumPresent = tmp_clazzLogNumPresent; _entity.clazzLogNumAbsent = tmp_clazzLogNumAbsent; _entity.clazzLogNumPartial = tmp_clazzLogNumPartial; _entity.clazzLogScheduleUid = tmp_clazzLogScheduleUid; _entity.clazzLogStatusFlag = tmp_clazzLogStatusFlag; _entity.clazzLogMSQN = tmp_clazzLogMSQN; _entity.clazzLogLCSN = tmp_clazzLogLCSN; _entity.clazzLogLCB = tmp_clazzLogLCB; _entity.clazzLogLastChangedTime = tmp_clazzLogLastChangedTime; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ScheduledCheckDao_JdbcKt$findPendingLogsWithoutScheduledCheck$lambda(closure$checkType, closure$fromDate, closure$_result) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$checkType); _stmt.setLong_6svq3l$(2, closure$fromDate); useResults(_stmt.executeQuery(), ScheduledCheckDao_JdbcKt$findPendingLogsWithoutScheduledCheck$lambda$lambda(closure$_result)); return Unit; }; } ScheduledCheckDao_JdbcKt.prototype.findPendingLogsWithoutScheduledCheck_6svq3l$ = function (checkType, fromDate) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT ClazzLog.* FROM ClazzLog WHERE NOT EXISTS(SELECT scClazzLogUid FROM ScheduledCheck WHERE scClazzLogUid = ClazzLog.clazzLogUid AND ScheduledCheck.checkType = ?) AND ClazzLog.logDate >= ?', void 0, void 0, void 0, trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog WHERE NOT EXISTS(SELECT scClazzLogUid FROM ScheduledCheck WHERE scClazzLogUid = ClazzLog.clazzLogUid AND ScheduledCheck.checkType = ?) AND ClazzLog.logDate >= ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScheduledCheckDao_JdbcKt$findPendingLogsWithoutScheduledCheck$lambda(checkType, fromDate, _result)); return _result.v; }; function ScheduledCheckDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_scheduledCheckUid = _resultSet.getLong_61zpoe$('scheduledCheckUid'); var tmp_checkTime = _resultSet.getLong_61zpoe$('checkTime'); var tmp_checkType = _resultSet.getInt_61zpoe$('checkType'); var tmp_checkUuid = _resultSet.getString_61zpoe$('checkUuid'); var tmp_checkParameters = _resultSet.getString_61zpoe$('checkParameters'); var tmp_scClazzLogUid = _resultSet.getLong_61zpoe$('scClazzLogUid'); var tmp_scheduledCheckMasterCsn = _resultSet.getLong_61zpoe$('scheduledCheckMasterCsn'); var tmp_scheduledCheckLocalCsn = _resultSet.getLong_61zpoe$('scheduledCheckLocalCsn'); var tmp_scheduledCheckLastChangedBy = _resultSet.getInt_61zpoe$('scheduledCheckLastChangedBy'); var tmp_scheduledCheckLct = _resultSet.getLong_61zpoe$('scheduledCheckLct'); var _entity = new ScheduledCheck(); _entity.scheduledCheckUid = tmp_scheduledCheckUid; _entity.checkTime = tmp_checkTime; _entity.checkType = tmp_checkType; _entity.checkUuid = tmp_checkUuid; _entity.checkParameters = tmp_checkParameters; _entity.scClazzLogUid = tmp_scClazzLogUid; _entity.scheduledCheckMasterCsn = tmp_scheduledCheckMasterCsn; _entity.scheduledCheckLocalCsn = tmp_scheduledCheckLocalCsn; _entity.scheduledCheckLastChangedBy = tmp_scheduledCheckLastChangedBy; _entity.scheduledCheckLct = tmp_scheduledCheckLct; closure$_result.v = _entity; }return Unit; }; } function ScheduledCheckDao_JdbcKt$findByUid$lambda(closure$uid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); useResults(_stmt.executeQuery(), ScheduledCheckDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ScheduledCheckDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ScheduledCheck) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ScheduledCheck WHERE scheduledCheckUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ScheduledCheck WHERE scheduledCheckUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScheduledCheckDao_JdbcKt$findByUid$lambda(uid, _result)); return _result.v; }; ScheduledCheckDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterScheduledCheck_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_152($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_152.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_152.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_152.prototype.constructor = Coroutine$insertAsync_152; Coroutine$insertAsync_152.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScheduledCheck_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduledCheckDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_152(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduledCheckDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterScheduledCheck_.insertList_4ezy5m$(entityList); }; function ScheduledCheckDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.checkTime); _stmt.setInt_vux9f0$(2, _entity.checkType); _stmt.setString_vqvrqt$(3, _entity.checkUuid); _stmt.setString_vqvrqt$(4, _entity.checkParameters); _stmt.setLong_6svq3l$(5, _entity.scClazzLogUid); _stmt.setLong_6svq3l$(6, _entity.scheduledCheckMasterCsn); _stmt.setLong_6svq3l$(7, _entity.scheduledCheckLocalCsn); _stmt.setInt_vux9f0$(8, _entity.scheduledCheckLastChangedBy); _stmt.setLong_6svq3l$(9, _entity.scheduledCheckLct); _stmt.setLong_6svq3l$(10, _entity.scheduledCheckUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ScheduledCheckDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ScheduledCheck SET checkTime = ?, checkType = ?, checkUuid = ?, checkParameters = ?, scClazzLogUid = ?, scheduledCheckMasterCsn = ?, scheduledCheckLocalCsn = ?, scheduledCheckLastChangedBy = ?, scheduledCheckLct = ? WHERE scheduledCheckUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScheduledCheckDao_JdbcKt$updateList$lambda(entityList)); }; function ScheduledCheckDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.checkTime); _stmt.setInt_vux9f0$(2, closure$entity.checkType); _stmt.setString_vqvrqt$(3, closure$entity.checkUuid); _stmt.setString_vqvrqt$(4, closure$entity.checkParameters); _stmt.setLong_6svq3l$(5, closure$entity.scClazzLogUid); _stmt.setLong_6svq3l$(6, closure$entity.scheduledCheckMasterCsn); _stmt.setLong_6svq3l$(7, closure$entity.scheduledCheckLocalCsn); _stmt.setInt_vux9f0$(8, closure$entity.scheduledCheckLastChangedBy); _stmt.setLong_6svq3l$(9, closure$entity.scheduledCheckLct); _stmt.setLong_6svq3l$(10, closure$entity.scheduledCheckUid); return _stmt.executeUpdate(); }; } ScheduledCheckDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ScheduledCheck SET checkTime = ?, checkType = ?, checkUuid = ?, checkParameters = ?, scClazzLogUid = ?, scheduledCheckMasterCsn = ?, scheduledCheckLocalCsn = ?, scheduledCheckLastChangedBy = ?, scheduledCheckLct = ? WHERE scheduledCheckUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScheduledCheckDao_JdbcKt$update$lambda(entity)); }; function ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ScheduledCheck (scheduledCheckUid, checkTime, checkType, checkUuid, checkParameters, scClazzLogUid, scheduledCheckMasterCsn, scheduledCheckLocalCsn, scheduledCheckLastChangedBy, scheduledCheckLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING scheduledCheckUid'; } else tmp$ = ''; return "INSERT INTO ScheduledCheck (scheduledCheckUid, checkTime, checkType, checkUuid, checkParameters, scClazzLogUid, scheduledCheckMasterCsn, scheduledCheckLocalCsn, scheduledCheckLastChangedBy, scheduledCheckLct) VALUES(COALESCE(?,nextval('ScheduledCheck_scheduledCheckUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.scheduledCheckUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.scheduledCheckUid); } stmt.setLong_6svq3l$(2, entity.checkTime); stmt.setInt_vux9f0$(3, entity.checkType); stmt.setString_vqvrqt$(4, entity.checkUuid); stmt.setString_vqvrqt$(5, entity.checkParameters); stmt.setLong_6svq3l$(6, entity.scClazzLogUid); stmt.setLong_6svq3l$(7, entity.scheduledCheckMasterCsn); stmt.setLong_6svq3l$(8, entity.scheduledCheckLocalCsn); stmt.setInt_vux9f0$(9, entity.scheduledCheckLastChangedBy); stmt.setLong_6svq3l$(10, entity.scheduledCheckLct); }; ScheduledCheckDao_JdbcKt$_insertAdapterScheduledCheck_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScheduledCheckDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduledCheckDao_JdbcKt', interfaces: [ScheduledCheckDao]}; function SchoolDao_JdbcKt(_db) { SchoolDao.call(this); this._db = _db; this._insertAdapterSchool_ = new SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral(this._db); } function Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_140($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_140.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_140.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_140.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_140; Coroutine$replicateOnNewNode_s8cxhz$_140.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolPk,\n | ? AS schoolDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = ?), 0) \n | /*psql ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolPk,\n | ? AS schoolDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = ?), 0) \n | ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_140(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda; Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_143($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_143.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_143.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_143.prototype.constructor = Coroutine$replicateOnChange_143; Coroutine$replicateOnChange_143.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolUid,\n | UserSession.usClientNodeId AS schoolDestination\n | FROM ChangeLog\n | JOIN School\n | ON ChangeLog.chTableId = 164\n | AND ChangeLog.chEntityPk = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolUid,\n | UserSession.usClientNodeId AS schoolDestination\n | FROM ChangeLog\n | JOIN School\n | ON ChangeLog.chTableId = 164\n | AND ChangeLog.chEntityPk = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_143(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); var _entity = new School(); _entity.schoolUid = tmp_schoolUid; _entity.schoolName = tmp_schoolName; _entity.schoolDesc = tmp_schoolDesc; _entity.schoolAddress = tmp_schoolAddress; _entity.schoolActive = tmp_schoolActive; _entity.schoolPhoneNumber = tmp_schoolPhoneNumber; _entity.schoolGender = tmp_schoolGender; _entity.schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; _entity.schoolFeatures = tmp_schoolFeatures; _entity.schoolLocationLong = tmp_schoolLocationLong; _entity.schoolLocationLatt = tmp_schoolLocationLatt; _entity.schoolEmailAddress = tmp_schoolEmailAddress; _entity.schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; _entity.schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; _entity.schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; _entity.schoolCode = tmp_schoolCode; _entity.schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; _entity.schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; _entity.schoolLastChangedBy = tmp_schoolLastChangedBy; _entity.schoolLct = tmp_schoolLct; _entity.schoolTimeZone = tmp_schoolTimeZone; closure$_result.v = _entity; }return Unit; }; } function Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda(closure$schoolUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda; Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findByUidAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findByUidAsync$lambda(closure$schoolUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda(closure$schoolUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidAsync_s8cxhz$_30($this, schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$schoolUid = schoolUid_0; } Coroutine$findByUidAsync_s8cxhz$_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_30.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_30; Coroutine$findByUidAsync_s8cxhz$_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, School) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM School WHERE schoolUid = ? AND CAST(schoolActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM School WHERE schoolUid = ? AND CAST(schoolActive AS INTEGER) = 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$findByUidAsync$lambda(this.local$schoolUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (schoolUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_30(this, schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); var _entity = new SchoolWithHolidayCalendar(); _entity.schoolUid = tmp_schoolUid; _entity.schoolName = tmp_schoolName; _entity.schoolDesc = tmp_schoolDesc; _entity.schoolAddress = tmp_schoolAddress; _entity.schoolActive = tmp_schoolActive; _entity.schoolPhoneNumber = tmp_schoolPhoneNumber; _entity.schoolGender = tmp_schoolGender; _entity.schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; _entity.schoolFeatures = tmp_schoolFeatures; _entity.schoolLocationLong = tmp_schoolLocationLong; _entity.schoolLocationLatt = tmp_schoolLocationLatt; _entity.schoolEmailAddress = tmp_schoolEmailAddress; _entity.schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; _entity.schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; _entity.schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; _entity.schoolCode = tmp_schoolCode; _entity.schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; _entity.schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; _entity.schoolLastChangedBy = tmp_schoolLastChangedBy; _entity.schoolLct = tmp_schoolLct; _entity.schoolTimeZone = tmp_schoolTimeZone; var _holidayCalendar_nullFieldCount = 0; var tmp_umCalendarUid = _resultSet.getLong_61zpoe$('umCalendarUid'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarName = _resultSet.getString_61zpoe$('umCalendarName'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarCategory = _resultSet.getInt_61zpoe$('umCalendarCategory'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarActive = _resultSet.getBoolean_61zpoe$('umCalendarActive'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarMasterChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLocalChangeSeqNum = _resultSet.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLastChangedBy = _resultSet.getInt_61zpoe$('umCalendarLastChangedBy'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }var tmp_umCalendarLct = _resultSet.getLong_61zpoe$('umCalendarLct'); if (_resultSet.wasNull()) { _holidayCalendar_nullFieldCount = _holidayCalendar_nullFieldCount + 1 | 0; }if (_holidayCalendar_nullFieldCount < 8) { if (_entity.holidayCalendar == null) { _entity.holidayCalendar = new HolidayCalendar(); }ensureNotNull(_entity.holidayCalendar).umCalendarUid = tmp_umCalendarUid; ensureNotNull(_entity.holidayCalendar).umCalendarName = tmp_umCalendarName; ensureNotNull(_entity.holidayCalendar).umCalendarCategory = tmp_umCalendarCategory; ensureNotNull(_entity.holidayCalendar).umCalendarActive = tmp_umCalendarActive; ensureNotNull(_entity.holidayCalendar).umCalendarMasterChangeSeqNum = tmp_umCalendarMasterChangeSeqNum; ensureNotNull(_entity.holidayCalendar).umCalendarLocalChangeSeqNum = tmp_umCalendarLocalChangeSeqNum; ensureNotNull(_entity.holidayCalendar).umCalendarLastChangedBy = tmp_umCalendarLastChangedBy; ensureNotNull(_entity.holidayCalendar).umCalendarLct = tmp_umCalendarLct; }closure$_result.v = _entity; }return Unit; }; } function Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda; Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uid = uid_0; } Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1.prototype.constructor = Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, SchoolWithHolidayCalendar) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT School.*, HolidayCalendar.* FROM School \n | LEFT JOIN HolidayCalendar ON School.schoolHolidayCalendarUid = HolidayCalendar.umCalendarUid\n | WHERE School.schoolUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |SELECT School.*, HolidayCalendar.* FROM School \n | LEFT JOIN HolidayCalendar ON School.schoolHolidayCalendarUid = HolidayCalendar.umCalendarUid\n | WHERE School.schoolUid = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(this.local$uid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_1(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$findBySchoolCode$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); var _entity = new School(); _entity.schoolUid = tmp_schoolUid; _entity.schoolName = tmp_schoolName; _entity.schoolDesc = tmp_schoolDesc; _entity.schoolAddress = tmp_schoolAddress; _entity.schoolActive = tmp_schoolActive; _entity.schoolPhoneNumber = tmp_schoolPhoneNumber; _entity.schoolGender = tmp_schoolGender; _entity.schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; _entity.schoolFeatures = tmp_schoolFeatures; _entity.schoolLocationLong = tmp_schoolLocationLong; _entity.schoolLocationLatt = tmp_schoolLocationLatt; _entity.schoolEmailAddress = tmp_schoolEmailAddress; _entity.schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; _entity.schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; _entity.schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; _entity.schoolCode = tmp_schoolCode; _entity.schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; _entity.schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; _entity.schoolLastChangedBy = tmp_schoolLastChangedBy; _entity.schoolLct = tmp_schoolLct; _entity.schoolTimeZone = tmp_schoolTimeZone; closure$_result.v = _entity; }return Unit; }; } function Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda; Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findBySchoolCode$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findBySchoolCode$lambda(closure$code_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findBySchoolCode_61zpoe$($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$code = code_0; } Coroutine$findBySchoolCode_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolCode_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolCode_61zpoe$.prototype.constructor = Coroutine$findBySchoolCode_61zpoe$; Coroutine$findBySchoolCode_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, School) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM School WHERE schoolCode = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM School WHERE schoolCode = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$findBySchoolCode$lambda(this.local$code, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.findBySchoolCode_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolCode_61zpoe$(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); var _entity = new School(); _entity.schoolUid = tmp_schoolUid; _entity.schoolName = tmp_schoolName; _entity.schoolDesc = tmp_schoolDesc; _entity.schoolAddress = tmp_schoolAddress; _entity.schoolActive = tmp_schoolActive; _entity.schoolPhoneNumber = tmp_schoolPhoneNumber; _entity.schoolGender = tmp_schoolGender; _entity.schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; _entity.schoolFeatures = tmp_schoolFeatures; _entity.schoolLocationLong = tmp_schoolLocationLong; _entity.schoolLocationLatt = tmp_schoolLocationLatt; _entity.schoolEmailAddress = tmp_schoolEmailAddress; _entity.schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; _entity.schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; _entity.schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; _entity.schoolCode = tmp_schoolCode; _entity.schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; _entity.schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; _entity.schoolLastChangedBy = tmp_schoolLastChangedBy; _entity.schoolLct = tmp_schoolLct; _entity.schoolTimeZone = tmp_schoolTimeZone; closure$_result.v = _entity; }return Unit; }; } function Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda; Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(closure$code_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(closure$code_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findBySchoolCodeFromWeb_61zpoe$($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$code = code_0; } Coroutine$findBySchoolCodeFromWeb_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolCodeFromWeb_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolCodeFromWeb_61zpoe$.prototype.constructor = Coroutine$findBySchoolCodeFromWeb_61zpoe$; Coroutine$findBySchoolCodeFromWeb_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, School) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM School WHERE schoolCode = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM School WHERE schoolCode = ?\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(this.local$code, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.findBySchoolCodeFromWeb_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolCodeFromWeb_61zpoe$(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getBoolean_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(closure$permission_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda; Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(closure$permission_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(closure$permission_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$personHasPermissionWithSchool_b9bd0d$($this, accountPersonUid_0, schoolUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$schoolUid = schoolUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithSchool_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithSchool_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithSchool_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionWithSchool_b9bd0d$; Coroutine$personHasPermissionWithSchool_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: false}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | Select EXISTS(\n | SELECT School.schoolUid \n | FROM School\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | ?) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | AND PrsGrpMbr.groupMemberPersonUid = ?\n | WHERE School.schoolUid = ?) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | Select EXISTS(\n | SELECT School.schoolUid \n | FROM School\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | ?) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | AND PrsGrpMbr.groupMemberPersonUid = ?\n | WHERE School.schoolUid = ?) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(this.local$permission, this.local$accountPersonUid, this.local$schoolUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.personHasPermissionWithSchool_b9bd0d$ = function (accountPersonUid_0, schoolUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithSchool_b9bd0d$(this, accountPersonUid_0, schoolUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral(this$SchoolDao_JdbcKt, closure$permission, closure$personUid, closure$searchBit, closure$sortOrder) { this.this$SchoolDao_JdbcKt = this$SchoolDao_JdbcKt; this.closure$permission = closure$permission; this.closure$personUid = closure$personUid; this.closure$searchBit = closure$searchBit; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_numStudents = _resultSet.getInt_61zpoe$('numStudents'); var tmp_numTeachers = _resultSet.getInt_61zpoe$('numTeachers'); var tmp_locationName = _resultSet.getString_61zpoe$('locationName'); var tmp_clazzCount = _resultSet.getInt_61zpoe$('clazzCount'); var tmp_schoolUid = _resultSet.getLong_61zpoe$('schoolUid'); var tmp_schoolName = _resultSet.getString_61zpoe$('schoolName'); var tmp_schoolDesc = _resultSet.getString_61zpoe$('schoolDesc'); var tmp_schoolAddress = _resultSet.getString_61zpoe$('schoolAddress'); var tmp_schoolActive = _resultSet.getBoolean_61zpoe$('schoolActive'); var tmp_schoolPhoneNumber = _resultSet.getString_61zpoe$('schoolPhoneNumber'); var tmp_schoolGender = _resultSet.getInt_61zpoe$('schoolGender'); var tmp_schoolHolidayCalendarUid = _resultSet.getLong_61zpoe$('schoolHolidayCalendarUid'); var tmp_schoolFeatures = _resultSet.getLong_61zpoe$('schoolFeatures'); var tmp_schoolLocationLong = _resultSet.getDouble_61zpoe$('schoolLocationLong'); var tmp_schoolLocationLatt = _resultSet.getDouble_61zpoe$('schoolLocationLatt'); var tmp_schoolEmailAddress = _resultSet.getString_61zpoe$('schoolEmailAddress'); var tmp_schoolTeachersPersonGroupUid = _resultSet.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var tmp_schoolStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var tmp_schoolPendingStudentsPersonGroupUid = _resultSet.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var tmp_schoolCode = _resultSet.getString_61zpoe$('schoolCode'); var tmp_schoolMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMasterChangeSeqNum'); var tmp_schoolLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolLocalChangeSeqNum'); var tmp_schoolLastChangedBy = _resultSet.getInt_61zpoe$('schoolLastChangedBy'); var tmp_schoolLct = _resultSet.getLong_61zpoe$('schoolLct'); var tmp_schoolTimeZone = _resultSet.getString_61zpoe$('schoolTimeZone'); var _entity = new SchoolWithMemberCountAndLocation(); _entity.numStudents = tmp_numStudents; _entity.numTeachers = tmp_numTeachers; _entity.locationName = tmp_locationName; _entity.clazzCount = tmp_clazzCount; _entity.schoolUid = tmp_schoolUid; _entity.schoolName = tmp_schoolName; _entity.schoolDesc = tmp_schoolDesc; _entity.schoolAddress = tmp_schoolAddress; _entity.schoolActive = tmp_schoolActive; _entity.schoolPhoneNumber = tmp_schoolPhoneNumber; _entity.schoolGender = tmp_schoolGender; _entity.schoolHolidayCalendarUid = tmp_schoolHolidayCalendarUid; _entity.schoolFeatures = tmp_schoolFeatures; _entity.schoolLocationLong = tmp_schoolLocationLong; _entity.schoolLocationLatt = tmp_schoolLocationLatt; _entity.schoolEmailAddress = tmp_schoolEmailAddress; _entity.schoolTeachersPersonGroupUid = tmp_schoolTeachersPersonGroupUid; _entity.schoolStudentsPersonGroupUid = tmp_schoolStudentsPersonGroupUid; _entity.schoolPendingStudentsPersonGroupUid = tmp_schoolPendingStudentsPersonGroupUid; _entity.schoolCode = tmp_schoolCode; _entity.schoolMasterChangeSeqNum = tmp_schoolMasterChangeSeqNum; _entity.schoolLocalChangeSeqNum = tmp_schoolLocalChangeSeqNum; _entity.schoolLastChangedBy = tmp_schoolLastChangedBy; _entity.schoolLct = tmp_schoolLct; _entity.schoolTimeZone = tmp_schoolTimeZone; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolDao_JdbcKt = this$SchoolDao_JdbcKt_0; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT School.*, \n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1003) as numStudents,\n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1004) as numTeachers, \n | '' as locationName,\n | (SELECT COUNT(*) \n | FROM Clazz \n | WHERE Clazz.clazzSchoolUid = School.schoolUid \n | AND CAST(Clazz.clazzUid AS INTEGER) = 1 ) as clazzCount\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | ?\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(schoolActive AS INTEGER) = 1\n | AND schoolName LIKE ?\n | GROUP BY School.schoolUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN School.schoolName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN School.schoolName\n | ELSE ''\n | END DESC) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT School.*, \n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1003) as numStudents,\n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1004) as numTeachers, \n | '' as locationName,\n | (SELECT COUNT(*) \n | FROM Clazz \n | WHERE Clazz.clazzSchoolUid = School.schoolUid \n | AND CAST(Clazz.clazzUid AS INTEGER) = 1 ) as clazzCount\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | ?\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(schoolActive AS INTEGER) = 1\n | AND schoolName LIKE ?\n | GROUP BY School.schoolUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN School.schoolName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN School.schoolName\n | ELSE ''\n | END DESC) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolDao_JdbcKt._db, _stmtConfig, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(this.local$closure$permission, this.local$closure$personUid, this.local$closure$searchBit, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$SchoolDao_JdbcKt._db, listOf(['SchoolMember', 'Clazz', 'PersonGroupMember', 'ScopedGrant', 'School']), SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this.this$SchoolDao_JdbcKt, this.closure$permission, this.closure$personUid, this.closure$searchBit, this.closure$sortOrder, _limit, _offset)); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolDao_JdbcKt = this$SchoolDao_JdbcKt_0; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT School.*, \n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1003) as numStudents,\n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1004) as numTeachers, \n | '' as locationName,\n | (SELECT COUNT(*) \n | FROM Clazz \n | WHERE Clazz.clazzSchoolUid = School.schoolUid \n | AND CAST(Clazz.clazzUid AS INTEGER) = 1 ) as clazzCount\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | ?\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(schoolActive AS INTEGER) = 1\n | AND schoolName LIKE ?\n | GROUP BY School.schoolUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN School.schoolName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN School.schoolName\n | ELSE ''\n | END DESC) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT School.*, \n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1003) as numStudents,\n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1004) as numTeachers, \n | '' as locationName,\n | (SELECT COUNT(*) \n | FROM Clazz \n | WHERE Clazz.clazzSchoolUid = School.schoolUid \n | AND CAST(Clazz.clazzUid AS INTEGER) = 1 ) as clazzCount\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | ?\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(schoolActive AS INTEGER) = 1\n | AND schoolName LIKE ?\n | GROUP BY School.schoolUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN School.schoolName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN School.schoolName\n | ELSE ''\n | END DESC) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolDao_JdbcKt._db, _stmtConfig, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(this.local$closure$permission, this.local$closure$personUid, this.local$closure$searchBit, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$SchoolDao_JdbcKt._db, listOf(['SchoolMember', 'Clazz', 'PersonGroupMember', 'ScopedGrant', 'School']), SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this.this$SchoolDao_JdbcKt, this.closure$permission, this.closure$personUid, this.closure$searchBit, this.closure$sortOrder)); }; SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; SchoolDao_JdbcKt.prototype.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$ = function (searchBit, personUid, permission, sortOrder) { var _result = new SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral(this, permission, personUid, searchBit, sortOrder); return _result; }; function Coroutine$SchoolDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$updateAsync$lambda; Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.schoolName); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.schoolDesc); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.schoolAddress); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$entity.schoolActive); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.schoolPhoneNumber); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.schoolGender); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.schoolHolidayCalendarUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.schoolFeatures); this.local$_stmt.setDouble_5wr77w$(9, this.local$closure$entity.schoolLocationLong); this.local$_stmt.setDouble_5wr77w$(10, this.local$closure$entity.schoolLocationLatt); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$entity.schoolEmailAddress); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$entity.schoolTeachersPersonGroupUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.schoolStudentsPersonGroupUid); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.schoolPendingStudentsPersonGroupUid); this.local$_stmt.setString_vqvrqt$(15, this.local$closure$entity.schoolCode); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$entity.schoolMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.schoolLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$entity.schoolLastChangedBy); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.schoolLct); this.local$_stmt.setString_vqvrqt$(20, this.local$closure$entity.schoolTimeZone); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.schoolUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_7q4b7e$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_7q4b7e$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7q4b7e$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7q4b7e$.prototype.constructor = Coroutine$updateAsync_7q4b7e$; Coroutine$updateAsync_7q4b7e$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE School SET schoolName = ?, schoolDesc = ?, schoolAddress = ?, schoolActive = ?, schoolPhoneNumber = ?, schoolGender = ?, schoolHolidayCalendarUid = ?, schoolFeatures = ?, schoolLocationLong = ?, schoolLocationLatt = ?, schoolEmailAddress = ?, schoolTeachersPersonGroupUid = ?, schoolStudentsPersonGroupUid = ?, schoolPendingStudentsPersonGroupUid = ?, schoolCode = ?, schoolMasterChangeSeqNum = ?, schoolLocalChangeSeqNum = ?, schoolLastChangedBy = ?, schoolLct = ?, schoolTimeZone = ? WHERE schoolUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SchoolDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.updateAsync_7q4b7e$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7q4b7e$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterSchool_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_153($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_153.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_153.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_153.prototype.constructor = Coroutine$insertAsync_153; Coroutine$insertAsync_153.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchool_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_153(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterSchool_.insertList_4ezy5m$(entityList); }; function SchoolDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.schoolName); _stmt.setString_vqvrqt$(2, _entity.schoolDesc); _stmt.setString_vqvrqt$(3, _entity.schoolAddress); _stmt.setBoolean_fzusl$(4, _entity.schoolActive); _stmt.setString_vqvrqt$(5, _entity.schoolPhoneNumber); _stmt.setInt_vux9f0$(6, _entity.schoolGender); _stmt.setLong_6svq3l$(7, _entity.schoolHolidayCalendarUid); _stmt.setLong_6svq3l$(8, _entity.schoolFeatures); _stmt.setDouble_5wr77w$(9, _entity.schoolLocationLong); _stmt.setDouble_5wr77w$(10, _entity.schoolLocationLatt); _stmt.setString_vqvrqt$(11, _entity.schoolEmailAddress); _stmt.setLong_6svq3l$(12, _entity.schoolTeachersPersonGroupUid); _stmt.setLong_6svq3l$(13, _entity.schoolStudentsPersonGroupUid); _stmt.setLong_6svq3l$(14, _entity.schoolPendingStudentsPersonGroupUid); _stmt.setString_vqvrqt$(15, _entity.schoolCode); _stmt.setLong_6svq3l$(16, _entity.schoolMasterChangeSeqNum); _stmt.setLong_6svq3l$(17, _entity.schoolLocalChangeSeqNum); _stmt.setInt_vux9f0$(18, _entity.schoolLastChangedBy); _stmt.setLong_6svq3l$(19, _entity.schoolLct); _stmt.setString_vqvrqt$(20, _entity.schoolTimeZone); _stmt.setLong_6svq3l$(21, _entity.schoolUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } SchoolDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE School SET schoolName = ?, schoolDesc = ?, schoolAddress = ?, schoolActive = ?, schoolPhoneNumber = ?, schoolGender = ?, schoolHolidayCalendarUid = ?, schoolFeatures = ?, schoolLocationLong = ?, schoolLocationLatt = ?, schoolEmailAddress = ?, schoolTeachersPersonGroupUid = ?, schoolStudentsPersonGroupUid = ?, schoolPendingStudentsPersonGroupUid = ?, schoolCode = ?, schoolMasterChangeSeqNum = ?, schoolLocalChangeSeqNum = ?, schoolLastChangedBy = ?, schoolLct = ?, schoolTimeZone = ? WHERE schoolUid = ?'; prepareAndUseStatement_0(this._db, _sql, SchoolDao_JdbcKt$updateList$lambda(entityList)); }; function SchoolDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.schoolName); _stmt.setString_vqvrqt$(2, closure$entity.schoolDesc); _stmt.setString_vqvrqt$(3, closure$entity.schoolAddress); _stmt.setBoolean_fzusl$(4, closure$entity.schoolActive); _stmt.setString_vqvrqt$(5, closure$entity.schoolPhoneNumber); _stmt.setInt_vux9f0$(6, closure$entity.schoolGender); _stmt.setLong_6svq3l$(7, closure$entity.schoolHolidayCalendarUid); _stmt.setLong_6svq3l$(8, closure$entity.schoolFeatures); _stmt.setDouble_5wr77w$(9, closure$entity.schoolLocationLong); _stmt.setDouble_5wr77w$(10, closure$entity.schoolLocationLatt); _stmt.setString_vqvrqt$(11, closure$entity.schoolEmailAddress); _stmt.setLong_6svq3l$(12, closure$entity.schoolTeachersPersonGroupUid); _stmt.setLong_6svq3l$(13, closure$entity.schoolStudentsPersonGroupUid); _stmt.setLong_6svq3l$(14, closure$entity.schoolPendingStudentsPersonGroupUid); _stmt.setString_vqvrqt$(15, closure$entity.schoolCode); _stmt.setLong_6svq3l$(16, closure$entity.schoolMasterChangeSeqNum); _stmt.setLong_6svq3l$(17, closure$entity.schoolLocalChangeSeqNum); _stmt.setInt_vux9f0$(18, closure$entity.schoolLastChangedBy); _stmt.setLong_6svq3l$(19, closure$entity.schoolLct); _stmt.setString_vqvrqt$(20, closure$entity.schoolTimeZone); _stmt.setLong_6svq3l$(21, closure$entity.schoolUid); return _stmt.executeUpdate(); }; } SchoolDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE School SET schoolName = ?, schoolDesc = ?, schoolAddress = ?, schoolActive = ?, schoolPhoneNumber = ?, schoolGender = ?, schoolHolidayCalendarUid = ?, schoolFeatures = ?, schoolLocationLong = ?, schoolLocationLatt = ?, schoolEmailAddress = ?, schoolTeachersPersonGroupUid = ?, schoolStudentsPersonGroupUid = ?, schoolPendingStudentsPersonGroupUid = ?, schoolCode = ?, schoolMasterChangeSeqNum = ?, schoolLocalChangeSeqNum = ?, schoolLastChangedBy = ?, schoolLct = ?, schoolTimeZone = ? WHERE schoolUid = ?'; prepareAndUseStatement_0(this._db, _sql, SchoolDao_JdbcKt$update$lambda(entity)); }; function SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO School (schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING schoolUid'; } else tmp$ = ''; return "INSERT INTO School (schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES(COALESCE(?,nextval('School_schoolUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.schoolUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.schoolUid); } stmt.setString_vqvrqt$(2, entity.schoolName); stmt.setString_vqvrqt$(3, entity.schoolDesc); stmt.setString_vqvrqt$(4, entity.schoolAddress); stmt.setBoolean_fzusl$(5, entity.schoolActive); stmt.setString_vqvrqt$(6, entity.schoolPhoneNumber); stmt.setInt_vux9f0$(7, entity.schoolGender); stmt.setLong_6svq3l$(8, entity.schoolHolidayCalendarUid); stmt.setLong_6svq3l$(9, entity.schoolFeatures); stmt.setDouble_5wr77w$(10, entity.schoolLocationLong); stmt.setDouble_5wr77w$(11, entity.schoolLocationLatt); stmt.setString_vqvrqt$(12, entity.schoolEmailAddress); stmt.setLong_6svq3l$(13, entity.schoolTeachersPersonGroupUid); stmt.setLong_6svq3l$(14, entity.schoolStudentsPersonGroupUid); stmt.setLong_6svq3l$(15, entity.schoolPendingStudentsPersonGroupUid); stmt.setString_vqvrqt$(16, entity.schoolCode); stmt.setLong_6svq3l$(17, entity.schoolMasterChangeSeqNum); stmt.setLong_6svq3l$(18, entity.schoolLocalChangeSeqNum); stmt.setInt_vux9f0$(19, entity.schoolLastChangedBy); stmt.setLong_6svq3l$(20, entity.schoolLct); stmt.setString_vqvrqt$(21, entity.schoolTimeZone); }; SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SchoolDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao_JdbcKt', interfaces: [SchoolDao]}; function SchoolDao_ReplicateWrapper(_db, _dao) { SchoolDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_141($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_141.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_141.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_141.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_141; Coroutine$replicateOnNewNode_s8cxhz$_141.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_141(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_144($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_144.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_144.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_144.prototype.constructor = Coroutine$replicateOnChange_144; Coroutine$replicateOnChange_144.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_144(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (schoolUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(schoolUid, continuation); }; SchoolDao_ReplicateWrapper.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithHolidayCalendarAsync_s8cxhz$(uid, continuation); }; SchoolDao_ReplicateWrapper.prototype.findBySchoolCode_61zpoe$ = function (code, continuation) { return this._dao_0.findBySchoolCode_61zpoe$(code, continuation); }; SchoolDao_ReplicateWrapper.prototype.findBySchoolCodeFromWeb_61zpoe$ = function (code, continuation) { return this._dao_0.findBySchoolCodeFromWeb_61zpoe$(code, continuation); }; SchoolDao_ReplicateWrapper.prototype.personHasPermissionWithSchool_b9bd0d$ = function (accountPersonUid, schoolUid, permission, continuation) { return this._dao_0.personHasPermissionWithSchool_b9bd0d$(accountPersonUid, schoolUid, permission, continuation); }; SchoolDao_ReplicateWrapper.prototype.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$ = function (searchBit, personUid, permission, sortOrder) { return this._dao_0.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$(searchBit, personUid, permission, sortOrder); }; SchoolDao_ReplicateWrapper.prototype.updateAsync_7q4b7e$ = function (entity, continuation) { entity.schoolLct = systemTimeInMillis(); return this._dao_0.updateAsync_7q4b7e$(entity, continuation); }; SchoolDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_154($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_154.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_154.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_154.prototype.constructor = Coroutine$insertAsync_154; Coroutine$insertAsync_154.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.schoolUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(164, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.schoolUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.schoolLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.schoolUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_154(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao_ReplicateWrapper', interfaces: [SchoolDao]}; var receiveOrNull$lambda_2 = wrapFunction(function () { var throwCCE = Kotlin.throwCCE; var reflect = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect; var getKClass = Kotlin.getKClass; var typeInfoImpl = $module$door_door_runtime.$$importsForInline$$['ktor-ktor-client-core-js-legacy'].$$importsForInline$$['ktor-ktor-utils-js-legacy'].io.ktor.util.reflect.typeInfoImpl_1lvkm8$; function Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$typeClosure$T = typeClosure$T_0; this.local$isT = isT_0; this.local$isT_0 = void 0; this.local$it = it_0; } Coroutine$receiveOrNull$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$receiveOrNull$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$receiveOrNull$lambda.prototype.constructor = Coroutine$receiveOrNull$lambda; Coroutine$receiveOrNull$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; if ((tmp$ = this.local$it.status) != null ? tmp$.equals(HttpStatusCode.Companion.NoContent) : null) { return null; } else { var T_0 = this.local$typeClosure$T; this.local$isT_0 = this.local$isT; var tmp$_1; var tmp$_2 = this.local$it.call; var typeInfo$result_0; typeInfo$break: do { try { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), getReifiedTypeParameterKType(this.local$typeClosure$T)); } catch (_) { typeInfo$result_0 = typeInfoImpl(reflect.JsType, getKClass(T_0), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_2.receive_qi9ur9$(typeInfo$result_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } case 1: throw this.exception_0; case 2: this.result_0 = this.local$isT_0(tmp$_1 = this.result_0) ? tmp$_1 : throwCCE(); return this.result_0; case 3: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; return function (typeClosure$T_0, isT_0) { return function (it_0, continuation_0, suspended) { var instance = new Coroutine$receiveOrNull$lambda(typeClosure$T_0, isT_0, it_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; }; }); function getOrNull$lambda_0_2(closure$block) { return function ($receiver) { closure$block($receiver); return Unit; }; } function SchoolDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SchoolDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_142($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_142.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_142.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_142.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_142; Coroutine$replicateOnNewNode_s8cxhz$_142.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_142(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_145($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_145.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_145.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_145.prototype.constructor = Coroutine$replicateOnChange_145; Coroutine$replicateOnChange_145.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_145(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_31($this, schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; } Coroutine$findByUidAsync_s8cxhz$_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_31.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_31; Coroutine$findByUidAsync_s8cxhz$_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$schoolUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (schoolUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_31(this, schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2.prototype.constructor = Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithHolidayCalendarAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_2(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findBySchoolCode_61zpoe$_0($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$code = code_0; } Coroutine$findBySchoolCode_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolCode_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolCode_61zpoe$_0.prototype.constructor = Coroutine$findBySchoolCode_61zpoe$_0; Coroutine$findBySchoolCode_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findBySchoolCode_61zpoe$(this.local$code, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findBySchoolCode_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolCode_61zpoe$_0(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_Repo$findBySchoolCodeFromWeb$lambda$lambda(this$SchoolDao_Repo) { return function ($receiver, it) { takeFrom($receiver, this$SchoolDao_Repo._endpoint); $receiver.encodedPath = $receiver.encodedPath + 'SchoolDao/findBySchoolCodeFromWeb'; return Unit; }; } function SchoolDao_Repo$findBySchoolCodeFromWeb$lambda(this$SchoolDao_Repo, closure$code) { return function ($receiver) { $receiver.url_6yzzjr$(SchoolDao_Repo$findBySchoolCodeFromWeb$lambda$lambda(this$SchoolDao_Repo)); doorNodeAndVersionHeaders($receiver, this$SchoolDao_Repo._repo); header($receiver, 'x-nid', this$SchoolDao_Repo._clientId); parameter($receiver, 'code', closure$code); return Unit; }; } function Coroutine$findBySchoolCodeFromWeb_61zpoe$_0($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.$this = $this; this.local$response = void 0; this.local$code = code_0; } Coroutine$findBySchoolCodeFromWeb_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolCodeFromWeb_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolCodeFromWeb_61zpoe$_0.prototype.constructor = Coroutine$findBySchoolCodeFromWeb_61zpoe$_0; Coroutine$findBySchoolCodeFromWeb_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var $receiver = this.$this._httpClient; var host_0; var body_0; host_0 = 'localhost'; body_0 = utils.EmptyContent; var $receiver_1_0 = new HttpRequestBuilder_init(); url($receiver_1_0, 'http', host_0, 0, '/'); $receiver_1_0.method = HttpMethod.Companion.Get; $receiver_1_0.body = body_0; getOrNull$lambda_0_2(SchoolDao_Repo$findBySchoolCodeFromWeb$lambda(this.$this, this.local$code))($receiver_1_0); var $this_0_0 = new HttpStatement($receiver_1_0, $receiver); var tmp$_4_0, tmp$_5_0, tmp$_6_0; tmp$_4_0 = getKClass(HttpStatement); if (equals(tmp$_4_0, getKClass(HttpStatement))) { this.result_0 = Kotlin.isType(tmp$_5_0 = $this_0_0, HttpStatement) ? tmp$_5_0 : throwCCE(); this.state_0 = 9; continue; } else { if (equals(tmp$_4_0, getKClass(HttpResponse))) { this.state_0 = 7; this.result_0 = $this_0_0.execute(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 1; this.result_0 = $this_0_0.executeUnsafe(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } } case 1: this.local$response = this.result_0; this.exceptionState_0 = 4; var tmp$_7_0; var tmp$_8_0 = this.local$response.call; var typeInfo$result_0_0; typeInfo$break: do { try { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), createKType(getKClass(HttpStatement), [], false)); } catch (_) { typeInfo$result_0_0 = typeInfoImpl(reflect.JsType, getKClass(HttpStatement), null); break typeInfo$break; } } while (false); this.state_0 = 2; this.result_0 = tmp$_8_0.receive_qi9ur9$(typeInfo$result_0_0, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 2: this.result_0 = Kotlin.isType(tmp$_7_0 = this.result_0, HttpStatement) ? tmp$_7_0 : throwCCE(); this.exceptionState_0 = 6; this.finallyPath_0 = [3]; this.state_0 = 5; continue; case 3: this.state_0 = 8; continue; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; complete(this.local$response); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; case 7: this.result_0 = Kotlin.isType(tmp$_6_0 = this.result_0, HttpStatement) ? tmp$_6_0 : throwCCE(); this.state_0 = 8; continue; case 8: this.state_0 = 9; continue; case 9: this.result_0; var httpStatement_0 = this.result_0; this.state_0 = 10; this.result_0 = httpStatement_0.execute_2rh6on$(receiveOrNull$lambda_2(School, Kotlin.orNull(Kotlin.isInstanceOf(School))), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 10: this.result_0; return this.result_0; default:this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findBySchoolCodeFromWeb_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolCodeFromWeb_61zpoe$_0(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$personHasPermissionWithSchool_b9bd0d$_0($this, accountPersonUid_0, schoolUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$schoolUid = schoolUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithSchool_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithSchool_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithSchool_b9bd0d$_0.prototype.constructor = Coroutine$personHasPermissionWithSchool_b9bd0d$_0; Coroutine$personHasPermissionWithSchool_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionWithSchool_b9bd0d$(this.local$accountPersonUid, this.local$schoolUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.personHasPermissionWithSchool_b9bd0d$ = function (accountPersonUid_0, schoolUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithSchool_b9bd0d$_0(this, accountPersonUid_0, schoolUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$ = function (searchBit, personUid, permission, sortOrder) { var _result = this._dao.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$(searchBit, personUid, permission, sortOrder); return _result; }; function Coroutine$updateAsync_7q4b7e$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7q4b7e$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7q4b7e$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7q4b7e$_0.prototype.constructor = Coroutine$updateAsync_7q4b7e$_0; Coroutine$updateAsync_7q4b7e$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_7q4b7e$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.updateAsync_7q4b7e$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7q4b7e$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_155($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_155.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_155.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_155.prototype.constructor = Coroutine$insertAsync_155; Coroutine$insertAsync_155.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_155(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; SchoolDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; SchoolDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; SchoolDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao_Repo', interfaces: [SchoolDao]}; function SchoolMemberDao_JdbcKt(_db) { SchoolMemberDao.call(this); this._db = _db; this._insertAdapterSchoolMember_ = new SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral(this._db); } function Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_143($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_143.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_143.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_143.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_143; Coroutine$replicateOnNewNode_s8cxhz$_143.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smPk,\n | ? AS smDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64) > 0\n | JOIN SchoolMember\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = ?), 0) \n | /*psql ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smPk,\n | ? AS smDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64) > 0\n | JOIN SchoolMember\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = ?), 0) \n | ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_143(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_146($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_146.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_146.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_146.prototype.constructor = Coroutine$replicateOnChange_146; Coroutine$replicateOnChange_146.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smUid,\n | UserSession.usClientNodeId AS smDestination\n | FROM ChangeLog\n | JOIN SchoolMember\n | ON ChangeLog.chTableId = 200\n | AND ChangeLog.chEntityPk = SchoolMember.schoolMemberUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions &\n | \n | 64\n | \n | ) > 0 \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus =1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smUid,\n | UserSession.usClientNodeId AS smDestination\n | FROM ChangeLog\n | JOIN SchoolMember\n | ON ChangeLog.chTableId = 200\n | AND ChangeLog.chEntityPk = SchoolMember.schoolMemberUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions &\n | \n | 64\n | \n | ) > 0 \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus =1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_146(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolMemberDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_schoolMemberUid = _resultSet.getLong_61zpoe$('schoolMemberUid'); var tmp_schoolMemberPersonUid = _resultSet.getLong_61zpoe$('schoolMemberPersonUid'); var tmp_schoolMemberSchoolUid = _resultSet.getLong_61zpoe$('schoolMemberSchoolUid'); var tmp_schoolMemberJoinDate = _resultSet.getLong_61zpoe$('schoolMemberJoinDate'); var tmp_schoolMemberLeftDate = _resultSet.getLong_61zpoe$('schoolMemberLeftDate'); var tmp_schoolMemberRole = _resultSet.getInt_61zpoe$('schoolMemberRole'); var tmp_schoolMemberActive = _resultSet.getBoolean_61zpoe$('schoolMemberActive'); var tmp_schoolMemberLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var tmp_schoolMemberMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var tmp_schoolMemberLastChangedBy = _resultSet.getInt_61zpoe$('schoolMemberLastChangedBy'); var tmp_schoolMemberLct = _resultSet.getLong_61zpoe$('schoolMemberLct'); var _entity = SchoolMember_init(); _entity.schoolMemberUid = tmp_schoolMemberUid; _entity.schoolMemberPersonUid = tmp_schoolMemberPersonUid; _entity.schoolMemberSchoolUid = tmp_schoolMemberSchoolUid; _entity.schoolMemberJoinDate = tmp_schoolMemberJoinDate; _entity.schoolMemberLeftDate = tmp_schoolMemberLeftDate; _entity.schoolMemberRole = tmp_schoolMemberRole; _entity.schoolMemberActive = tmp_schoolMemberActive; _entity.schoolMemberLocalChangeSeqNum = tmp_schoolMemberLocalChangeSeqNum; _entity.schoolMemberMasterChangeSeqNum = tmp_schoolMemberMasterChangeSeqNum; _entity.schoolMemberLastChangedBy = tmp_schoolMemberLastChangedBy; _entity.schoolMemberLct = tmp_schoolMemberLct; closure$_result.v = _entity; }return Unit; }; } function SchoolMemberDao_JdbcKt$findByUidAsync$lambda(closure$schoolMemberUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$schoolMemberUid); useResults(_stmt.executeQuery(), SchoolMemberDao_JdbcKt$findByUidAsync$lambda$lambda(closure$_result)); return Unit; }; } SchoolMemberDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (schoolMemberUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, SchoolMember) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM SchoolMember WHERE schoolMemberUid = ? AND CAST(schoolMemberActive AS INTEGER) = 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM SchoolMember WHERE schoolMemberUid = ? AND CAST(schoolMemberActive AS INTEGER) = 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, SchoolMemberDao_JdbcKt$findByUidAsync$lambda(schoolMemberUid, _result)); return _result.v; }; function Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda; Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.schoolMemberPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.schoolMemberSchoolUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.schoolMemberJoinDate); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.schoolMemberLeftDate); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.schoolMemberRole); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.schoolMemberActive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.schoolMemberLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.schoolMemberMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.schoolMemberLastChangedBy); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.schoolMemberLct); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.schoolMemberUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_nzwwdw$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_nzwwdw$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_nzwwdw$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_nzwwdw$.prototype.constructor = Coroutine$updateAsync_nzwwdw$; Coroutine$updateAsync_nzwwdw$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE SchoolMember SET schoolMemberPersonUid = ?, schoolMemberSchoolUid = ?, schoolMemberJoinDate = ?, schoolMemberLeftDate = ?, schoolMemberRole = ?, schoolMemberActive = ?, schoolMemberLocalChangeSeqNum = ?, schoolMemberMasterChangeSeqNum = ?, schoolMemberLastChangedBy = ?, schoolMemberLct = ? WHERE schoolMemberUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SchoolMemberDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.updateAsync_nzwwdw$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_nzwwdw$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_schoolMemberUid = _resultSet.getLong_61zpoe$('schoolMemberUid'); var tmp_schoolMemberPersonUid = _resultSet.getLong_61zpoe$('schoolMemberPersonUid'); var tmp_schoolMemberSchoolUid = _resultSet.getLong_61zpoe$('schoolMemberSchoolUid'); var tmp_schoolMemberJoinDate = _resultSet.getLong_61zpoe$('schoolMemberJoinDate'); var tmp_schoolMemberLeftDate = _resultSet.getLong_61zpoe$('schoolMemberLeftDate'); var tmp_schoolMemberRole = _resultSet.getInt_61zpoe$('schoolMemberRole'); var tmp_schoolMemberActive = _resultSet.getBoolean_61zpoe$('schoolMemberActive'); var tmp_schoolMemberLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var tmp_schoolMemberMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var tmp_schoolMemberLastChangedBy = _resultSet.getInt_61zpoe$('schoolMemberLastChangedBy'); var tmp_schoolMemberLct = _resultSet.getLong_61zpoe$('schoolMemberLct'); var _entity = SchoolMember_init(); _entity.schoolMemberUid = tmp_schoolMemberUid; _entity.schoolMemberPersonUid = tmp_schoolMemberPersonUid; _entity.schoolMemberSchoolUid = tmp_schoolMemberSchoolUid; _entity.schoolMemberJoinDate = tmp_schoolMemberJoinDate; _entity.schoolMemberLeftDate = tmp_schoolMemberLeftDate; _entity.schoolMemberRole = tmp_schoolMemberRole; _entity.schoolMemberActive = tmp_schoolMemberActive; _entity.schoolMemberLocalChangeSeqNum = tmp_schoolMemberLocalChangeSeqNum; _entity.schoolMemberMasterChangeSeqNum = tmp_schoolMemberMasterChangeSeqNum; _entity.schoolMemberLastChangedBy = tmp_schoolMemberLastChangedBy; _entity.schoolMemberLct = tmp_schoolMemberLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(closure$schoolUid_0, closure$personUid_0, closure$role_0, closure$timeFilter_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$role = closure$role_0; this.local$closure$timeFilter = closure$timeFilter_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda; Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$role); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$role); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$timeFilter); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$timeFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(closure$schoolUid_0, closure$personUid_0, closure$role_0, closure$timeFilter_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(closure$schoolUid_0, closure$personUid_0, closure$role_0, closure$timeFilter_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default($this, schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$schoolUid = schoolUid_0; this.local$personUid = personUid_0; this.local$role = role_0; this.local$timeFilter = timeFilter_0; } Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.prototype.constructor = Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default; Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * FROM SchoolMember WHERE schoolMemberSchoolUid = ?\n | AND schoolMemberPersonUid = ?\n | AND (? = 0 OR schoolMemberRole = ?)\n | AND (? = 0 OR ? BETWEEN SchoolMember.schoolMemberJoinDate AND SchoolMember.schoolMemberLeftDate) \n | AND CAST(schoolMemberActive AS INTEGER) = 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * FROM SchoolMember WHERE schoolMemberSchoolUid = ?\n | AND schoolMemberPersonUid = ?\n | AND (? = 0 OR schoolMemberRole = ?)\n | AND (? = 0 OR ? BETWEEN SchoolMember.schoolMemberJoinDate AND SchoolMember.schoolMemberLeftDate) \n | AND CAST(schoolMemberActive AS INTEGER) = 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(this.local$schoolUid, this.local$personUid, this.local$role, this.local$timeFilter, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.findBySchoolAndPersonAndRole_6qtc6d$$default = function (schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default(this, schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral(this$SchoolMemberDao_JdbcKt, closure$accountPersonUid, closure$schoolUid, closure$role, closure$searchQuery, closure$sortOrder) { this.this$SchoolMemberDao_JdbcKt = this$SchoolMemberDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$schoolUid = closure$schoolUid; this.closure$role = closure$role; this.closure$searchQuery = closure$searchQuery; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_schoolMemberUid = _resultSet.getLong_61zpoe$('schoolMemberUid'); var tmp_schoolMemberPersonUid = _resultSet.getLong_61zpoe$('schoolMemberPersonUid'); var tmp_schoolMemberSchoolUid = _resultSet.getLong_61zpoe$('schoolMemberSchoolUid'); var tmp_schoolMemberJoinDate = _resultSet.getLong_61zpoe$('schoolMemberJoinDate'); var tmp_schoolMemberLeftDate = _resultSet.getLong_61zpoe$('schoolMemberLeftDate'); var tmp_schoolMemberRole = _resultSet.getInt_61zpoe$('schoolMemberRole'); var tmp_schoolMemberActive = _resultSet.getBoolean_61zpoe$('schoolMemberActive'); var tmp_schoolMemberLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var tmp_schoolMemberMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var tmp_schoolMemberLastChangedBy = _resultSet.getInt_61zpoe$('schoolMemberLastChangedBy'); var tmp_schoolMemberLct = _resultSet.getLong_61zpoe$('schoolMemberLct'); var _entity = new SchoolMemberWithPerson(); _entity.schoolMemberUid = tmp_schoolMemberUid; _entity.schoolMemberPersonUid = tmp_schoolMemberPersonUid; _entity.schoolMemberSchoolUid = tmp_schoolMemberSchoolUid; _entity.schoolMemberJoinDate = tmp_schoolMemberJoinDate; _entity.schoolMemberLeftDate = tmp_schoolMemberLeftDate; _entity.schoolMemberRole = tmp_schoolMemberRole; _entity.schoolMemberActive = tmp_schoolMemberActive; _entity.schoolMemberLocalChangeSeqNum = tmp_schoolMemberLocalChangeSeqNum; _entity.schoolMemberMasterChangeSeqNum = tmp_schoolMemberMasterChangeSeqNum; _entity.schoolMemberLastChangedBy = tmp_schoolMemberLastChangedBy; _entity.schoolMemberLct = tmp_schoolMemberLct; var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$role); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$searchQuery); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolMemberDao_JdbcKt = this$SchoolMemberDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT SchoolMember.*, Person.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64 \n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN SchoolMember ON Person.personUid = SchoolMember.schoolMemberPersonUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND SchoolMember.schoolMemberActive\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND Person.active\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | GROUP BY Person.personUid, SchoolMember.schoolMemberUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT SchoolMember.*, Person.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64 \n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN SchoolMember ON Person.personUid = SchoolMember.schoolMemberPersonUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND SchoolMember.schoolMemberActive\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND Person.active\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | GROUP BY Person.personUid, SchoolMember.schoolMemberUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolMemberDao_JdbcKt._db, _stmtConfig, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$schoolUid, this.local$closure$role, this.local$closure$searchQuery, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$SchoolMemberDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'SchoolMember']), SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this.this$SchoolMemberDao_JdbcKt, this.closure$accountPersonUid, this.closure$schoolUid, this.closure$role, this.closure$searchQuery, this.closure$sortOrder, _limit, _offset)); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$role); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$searchQuery); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolMemberDao_JdbcKt = this$SchoolMemberDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT SchoolMember.*, Person.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64 \n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN SchoolMember ON Person.personUid = SchoolMember.schoolMemberPersonUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND SchoolMember.schoolMemberActive\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND Person.active\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | GROUP BY Person.personUid, SchoolMember.schoolMemberUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT SchoolMember.*, Person.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64 \n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN SchoolMember ON Person.personUid = SchoolMember.schoolMemberPersonUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND SchoolMember.schoolMemberActive\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND Person.active\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | GROUP BY Person.personUid, SchoolMember.schoolMemberUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolMemberDao_JdbcKt._db, _stmtConfig, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$schoolUid, this.local$closure$role, this.local$closure$searchQuery, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$SchoolMemberDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'SchoolMember']), SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this.this$SchoolMemberDao_JdbcKt, this.closure$accountPersonUid, this.closure$schoolUid, this.closure$role, this.closure$searchQuery, this.closure$sortOrder)); }; SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; SchoolMemberDao_JdbcKt.prototype.findAllActiveMembersBySchoolAndRoleUid_de0qyg$ = function (schoolUid, role, sortOrder, searchQuery, accountPersonUid) { var _result = new SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral(this, accountPersonUid, schoolUid, role, searchQuery, sortOrder); return _result; }; function SchoolMemberDao_JdbcKt$findAllTest$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_schoolMemberUid = _resultSet.getLong_61zpoe$('schoolMemberUid'); var tmp_schoolMemberPersonUid = _resultSet.getLong_61zpoe$('schoolMemberPersonUid'); var tmp_schoolMemberSchoolUid = _resultSet.getLong_61zpoe$('schoolMemberSchoolUid'); var tmp_schoolMemberJoinDate = _resultSet.getLong_61zpoe$('schoolMemberJoinDate'); var tmp_schoolMemberLeftDate = _resultSet.getLong_61zpoe$('schoolMemberLeftDate'); var tmp_schoolMemberRole = _resultSet.getInt_61zpoe$('schoolMemberRole'); var tmp_schoolMemberActive = _resultSet.getBoolean_61zpoe$('schoolMemberActive'); var tmp_schoolMemberLocalChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var tmp_schoolMemberMasterChangeSeqNum = _resultSet.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var tmp_schoolMemberLastChangedBy = _resultSet.getInt_61zpoe$('schoolMemberLastChangedBy'); var tmp_schoolMemberLct = _resultSet.getLong_61zpoe$('schoolMemberLct'); var _entity = new SchoolMemberWithPerson(); _entity.schoolMemberUid = tmp_schoolMemberUid; _entity.schoolMemberPersonUid = tmp_schoolMemberPersonUid; _entity.schoolMemberSchoolUid = tmp_schoolMemberSchoolUid; _entity.schoolMemberJoinDate = tmp_schoolMemberJoinDate; _entity.schoolMemberLeftDate = tmp_schoolMemberLeftDate; _entity.schoolMemberRole = tmp_schoolMemberRole; _entity.schoolMemberActive = tmp_schoolMemberActive; _entity.schoolMemberLocalChangeSeqNum = tmp_schoolMemberLocalChangeSeqNum; _entity.schoolMemberMasterChangeSeqNum = tmp_schoolMemberMasterChangeSeqNum; _entity.schoolMemberLastChangedBy = tmp_schoolMemberLastChangedBy; _entity.schoolMemberLct = tmp_schoolMemberLct; var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda(closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$role); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchQuery); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findAllTest$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllTest$lambda(closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda(closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllTest_jnr38p$($this, schoolUid_0, role_0, searchQuery_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$schoolUid = schoolUid_0; this.local$role = role_0; this.local$searchQuery = searchQuery_0; } Coroutine$findAllTest_jnr38p$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllTest_jnr38p$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllTest_jnr38p$.prototype.constructor = Coroutine$findAllTest_jnr38p$; Coroutine$findAllTest_jnr38p$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT SchoolMember.*, Person.* FROM SchoolMember\n | LEFT JOIN Person ON Person.personUid = SchoolMember.schoolMemberPersonUid\n | WHERE CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND CAST(Person.active AS INTEGER) = 1\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | ORDER BY Person.firstNames DESC\n "), void 0, void 0, void 0, trimMargin("\n |SELECT SchoolMember.*, Person.* FROM SchoolMember\n | LEFT JOIN Person ON Person.personUid = SchoolMember.schoolMemberPersonUid\n | WHERE CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND CAST(Person.active AS INTEGER) = 1\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | ORDER BY Person.firstNames DESC\n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SchoolMemberDao_JdbcKt$findAllTest$lambda(this.local$schoolUid, this.local$role, this.local$searchQuery, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.findAllTest_jnr38p$ = function (schoolUid_0, role_0, searchQuery_0, continuation_0, suspended) { var instance = new Coroutine$findAllTest_jnr38p$(this, schoolUid_0, role_0, searchQuery_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterSchoolMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_156($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_156.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_156.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_156.prototype.constructor = Coroutine$insertAsync_156; Coroutine$insertAsync_156.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchoolMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_156(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterSchoolMember_.insertList_4ezy5m$(entityList); }; function SchoolMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.schoolMemberPersonUid); _stmt.setLong_6svq3l$(2, _entity.schoolMemberSchoolUid); _stmt.setLong_6svq3l$(3, _entity.schoolMemberJoinDate); _stmt.setLong_6svq3l$(4, _entity.schoolMemberLeftDate); _stmt.setInt_vux9f0$(5, _entity.schoolMemberRole); _stmt.setBoolean_fzusl$(6, _entity.schoolMemberActive); _stmt.setLong_6svq3l$(7, _entity.schoolMemberLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.schoolMemberMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.schoolMemberLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.schoolMemberLct); _stmt.setLong_6svq3l$(11, _entity.schoolMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } SchoolMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE SchoolMember SET schoolMemberPersonUid = ?, schoolMemberSchoolUid = ?, schoolMemberJoinDate = ?, schoolMemberLeftDate = ?, schoolMemberRole = ?, schoolMemberActive = ?, schoolMemberLocalChangeSeqNum = ?, schoolMemberMasterChangeSeqNum = ?, schoolMemberLastChangedBy = ?, schoolMemberLct = ? WHERE schoolMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, SchoolMemberDao_JdbcKt$updateList$lambda(entityList)); }; function SchoolMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.schoolMemberPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.schoolMemberSchoolUid); _stmt.setLong_6svq3l$(3, closure$entity.schoolMemberJoinDate); _stmt.setLong_6svq3l$(4, closure$entity.schoolMemberLeftDate); _stmt.setInt_vux9f0$(5, closure$entity.schoolMemberRole); _stmt.setBoolean_fzusl$(6, closure$entity.schoolMemberActive); _stmt.setLong_6svq3l$(7, closure$entity.schoolMemberLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.schoolMemberMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.schoolMemberLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.schoolMemberLct); _stmt.setLong_6svq3l$(11, closure$entity.schoolMemberUid); return _stmt.executeUpdate(); }; } SchoolMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE SchoolMember SET schoolMemberPersonUid = ?, schoolMemberSchoolUid = ?, schoolMemberJoinDate = ?, schoolMemberLeftDate = ?, schoolMemberRole = ?, schoolMemberActive = ?, schoolMemberLocalChangeSeqNum = ?, schoolMemberMasterChangeSeqNum = ?, schoolMemberLastChangedBy = ?, schoolMemberLct = ? WHERE schoolMemberUid = ?'; prepareAndUseStatement_0(this._db, _sql, SchoolMemberDao_JdbcKt$update$lambda(entity)); }; function SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO SchoolMember (schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING schoolMemberUid'; } else tmp$ = ''; return "INSERT INTO SchoolMember (schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES(COALESCE(?,nextval('SchoolMember_schoolMemberUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.schoolMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.schoolMemberUid); } stmt.setLong_6svq3l$(2, entity.schoolMemberPersonUid); stmt.setLong_6svq3l$(3, entity.schoolMemberSchoolUid); stmt.setLong_6svq3l$(4, entity.schoolMemberJoinDate); stmt.setLong_6svq3l$(5, entity.schoolMemberLeftDate); stmt.setInt_vux9f0$(6, entity.schoolMemberRole); stmt.setBoolean_fzusl$(7, entity.schoolMemberActive); stmt.setLong_6svq3l$(8, entity.schoolMemberLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.schoolMemberMasterChangeSeqNum); stmt.setInt_vux9f0$(10, entity.schoolMemberLastChangedBy); stmt.setLong_6svq3l$(11, entity.schoolMemberLct); }; SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SchoolMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao_JdbcKt', interfaces: [SchoolMemberDao]}; function SchoolMemberDao_ReplicateWrapper(_db, _dao) { SchoolMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_144($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_144.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_144.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_144.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_144; Coroutine$replicateOnNewNode_s8cxhz$_144.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_144(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_147($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_147.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_147.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_147.prototype.constructor = Coroutine$replicateOnChange_147; Coroutine$replicateOnChange_147.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_147(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (schoolMemberUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.prototype.updateAsync_nzwwdw$ = function (entity, continuation) { entity.schoolMemberLct = systemTimeInMillis(); return this._dao_0.updateAsync_nzwwdw$(entity, continuation); }; SchoolMemberDao_ReplicateWrapper.prototype.findBySchoolAndPersonAndRole_6qtc6d$$default = function (schoolUid, personUid, role, timeFilter, continuation) { return this._dao_0.findBySchoolAndPersonAndRole_6qtc6d$(schoolUid, personUid, role, timeFilter, continuation); }; SchoolMemberDao_ReplicateWrapper.prototype.findAllActiveMembersBySchoolAndRoleUid_de0qyg$ = function (schoolUid, role, sortOrder, searchQuery, accountPersonUid) { return this._dao_0.findAllActiveMembersBySchoolAndRoleUid_de0qyg$(schoolUid, role, sortOrder, searchQuery, accountPersonUid); }; SchoolMemberDao_ReplicateWrapper.prototype.findAllTest_jnr38p$ = function (schoolUid, role, searchQuery, continuation) { return this._dao_0.findAllTest_jnr38p$(schoolUid, role, searchQuery, continuation); }; SchoolMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_157($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_157.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_157.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_157.prototype.constructor = Coroutine$insertAsync_157; Coroutine$insertAsync_157.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.schoolMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(200, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.schoolMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.schoolMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.schoolMemberUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_157(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao_ReplicateWrapper', interfaces: [SchoolMemberDao]}; function SchoolMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SchoolMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_145($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_145.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_145.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_145.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_145; Coroutine$replicateOnNewNode_s8cxhz$_145.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_145(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_148($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_148.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_148.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_148.prototype.constructor = Coroutine$replicateOnChange_148; Coroutine$replicateOnChange_148.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_148(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (schoolMemberUid) { var _result = this._dao.findByUidAsync_s8cxhz$(schoolMemberUid); return _result; }; function Coroutine$updateAsync_nzwwdw$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_nzwwdw$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_nzwwdw$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_nzwwdw$_0.prototype.constructor = Coroutine$updateAsync_nzwwdw$_0; Coroutine$updateAsync_nzwwdw$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_nzwwdw$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.updateAsync_nzwwdw$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_nzwwdw$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0($this, schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; this.local$personUid = personUid_0; this.local$role = role_0; this.local$timeFilter = timeFilter_0; } Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0.prototype.constructor = Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0; Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findBySchoolAndPersonAndRole_6qtc6d$(this.local$schoolUid, this.local$personUid, this.local$role, this.local$timeFilter, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.findBySchoolAndPersonAndRole_6qtc6d$$default = function (schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default_0(this, schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.findAllActiveMembersBySchoolAndRoleUid_de0qyg$ = function (schoolUid, role, sortOrder, searchQuery, accountPersonUid) { var _result = this._dao.findAllActiveMembersBySchoolAndRoleUid_de0qyg$(schoolUid, role, sortOrder, searchQuery, accountPersonUid); return _result; }; function Coroutine$findAllTest_jnr38p$_0($this, schoolUid_0, role_0, searchQuery_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; this.local$role = role_0; this.local$searchQuery = searchQuery_0; } Coroutine$findAllTest_jnr38p$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllTest_jnr38p$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllTest_jnr38p$_0.prototype.constructor = Coroutine$findAllTest_jnr38p$_0; Coroutine$findAllTest_jnr38p$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllTest_jnr38p$(this.local$schoolUid, this.local$role, this.local$searchQuery, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.findAllTest_jnr38p$ = function (schoolUid_0, role_0, searchQuery_0, continuation_0, suspended) { var instance = new Coroutine$findAllTest_jnr38p$_0(this, schoolUid_0, role_0, searchQuery_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_158($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_158.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_158.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_158.prototype.constructor = Coroutine$insertAsync_158; Coroutine$insertAsync_158.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_158(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; SchoolMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; SchoolMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; SchoolMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao_Repo', interfaces: [SchoolMemberDao]}; function ScopedGrantDao_JdbcKt(_db) { ScopedGrantDao.call(this); this._db = _db; this._insertAdapterScopedGrant_ = new ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral(this._db); } function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_146($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_146.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_146.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_146.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_146; Coroutine$replicateOnNewNode_s8cxhz$_146.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantWithPerm.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN ScopedGrant ScopedGrantWithPerm\n | ON PersonsWithPerm_GroupMember.groupMemberGroupUid = ScopedGrantWithPerm.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantWithPerm.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantWithPerm.sgUid\n | AND sgDestination = ?), 0) \n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantWithPerm.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN ScopedGrant ScopedGrantWithPerm\n | ON PersonsWithPerm_GroupMember.groupMemberGroupUid = ScopedGrantWithPerm.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantWithPerm.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantWithPerm.sgUid\n | AND sgDestination = ?), 0) \n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_146(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_149($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_149.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_149.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_149.prototype.constructor = Coroutine$replicateOnChange_149; Coroutine$replicateOnChange_149.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_149(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeClazzBased_5($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_5.prototype.constructor = Coroutine$replicateOnChangeClazzBased_5; Coroutine$replicateOnChangeClazzBased_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_5(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrant.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = ?), 0) \n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrant.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = ?), 0) \n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangePersonBased_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_2.prototype.constructor = Coroutine$replicateOnChangePersonBased_2; Coroutine$replicateOnChangePersonBased_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Person\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Person\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeSchoolBased_5($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_5.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_5; Coroutine$replicateOnChangeSchoolBased_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN School\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN School\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_5(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_y0tj3a$($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$insertAsync_y0tj3a$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_y0tj3a$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_y0tj3a$.prototype.constructor = Coroutine$insertAsync_y0tj3a$; Coroutine$insertAsync_y0tj3a$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScopedGrant_.insertAndReturnIdAsync_11rb$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.insertAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_y0tj3a$(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_djn83v$($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$insertListAsync_djn83v$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_djn83v$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_djn83v$.prototype.constructor = Coroutine$insertListAsync_djn83v$; Coroutine$insertListAsync_djn83v$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScopedGrant_.insertListAsync_4ezy5m$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.insertListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_djn83v$(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda(closure$scopedGrant_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$scopedGrant = closure$scopedGrant_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda; Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$scopedGrant.sgPcsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$scopedGrant.sgLcsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$scopedGrant.sgLcb); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$scopedGrant.sgLct); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$scopedGrant.sgTableId); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$scopedGrant.sgEntityUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$scopedGrant.sgPermissions); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$scopedGrant.sgGroupUid); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$scopedGrant.sgIndex); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$scopedGrant.sgFlags); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$scopedGrant.sgUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$updateAsync$lambda(closure$scopedGrant_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda(closure$scopedGrant_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_y0tj3a$($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$updateAsync_y0tj3a$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y0tj3a$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y0tj3a$.prototype.constructor = Coroutine$updateAsync_y0tj3a$; Coroutine$updateAsync_y0tj3a$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ScopedGrant SET sgPcsn = ?, sgLcsn = ?, sgLcb = ?, sgLct = ?, sgTableId = ?, sgEntityUid = ?, sgPermissions = ?, sgGroupUid = ?, sgIndex = ?, sgFlags = ? WHERE sgUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScopedGrantDao_JdbcKt$updateAsync$lambda(this.local$scopedGrant), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.updateAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y0tj3a$(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda(closure$scopedGrantList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$scopedGrantList = closure$scopedGrantList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda; Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$scopedGrantList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.sgPcsn); this.local$_stmt.setLong_6svq3l$(2, _entity.sgLcsn); this.local$_stmt.setInt_vux9f0$(3, _entity.sgLcb); this.local$_stmt.setLong_6svq3l$(4, _entity.sgLct); this.local$_stmt.setInt_vux9f0$(5, _entity.sgTableId); this.local$_stmt.setLong_6svq3l$(6, _entity.sgEntityUid); this.local$_stmt.setLong_6svq3l$(7, _entity.sgPermissions); this.local$_stmt.setLong_6svq3l$(8, _entity.sgGroupUid); this.local$_stmt.setInt_vux9f0$(9, _entity.sgIndex); this.local$_stmt.setInt_vux9f0$(10, _entity.sgFlags); this.local$_stmt.setLong_6svq3l$(11, _entity.sgUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$updateListAsync$lambda(closure$scopedGrantList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda(closure$scopedGrantList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_djn83v$($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$updateListAsync_djn83v$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_djn83v$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_djn83v$.prototype.constructor = Coroutine$updateListAsync_djn83v$; Coroutine$updateListAsync_djn83v$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ScopedGrant SET sgPcsn = ?, sgLcsn = ?, sgLcb = ?, sgLct = ?, sgTableId = ?, sgEntityUid = ?, sgPermissions = ?, sgGroupUid = ?, sgIndex = ?, sgFlags = ? WHERE sgUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScopedGrantDao_JdbcKt$updateListAsync$lambda(this.local$scopedGrantList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.updateListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_djn83v$(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_name = _resultSet.getString_61zpoe$('name'); var _entity = new ScopedGrantAndName(); _entity.name = tmp_name; var _scopedGrant_nullFieldCount = 0; var tmp_sgUid = _resultSet.getLong_61zpoe$('sgUid'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgPcsn = _resultSet.getLong_61zpoe$('sgPcsn'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgLcsn = _resultSet.getLong_61zpoe$('sgLcsn'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgLcb = _resultSet.getInt_61zpoe$('sgLcb'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgLct = _resultSet.getLong_61zpoe$('sgLct'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgTableId = _resultSet.getInt_61zpoe$('sgTableId'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgEntityUid = _resultSet.getLong_61zpoe$('sgEntityUid'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgPermissions = _resultSet.getLong_61zpoe$('sgPermissions'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgGroupUid = _resultSet.getLong_61zpoe$('sgGroupUid'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgIndex = _resultSet.getInt_61zpoe$('sgIndex'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }var tmp_sgFlags = _resultSet.getInt_61zpoe$('sgFlags'); if (_resultSet.wasNull()) { _scopedGrant_nullFieldCount = _scopedGrant_nullFieldCount + 1 | 0; }if (_scopedGrant_nullFieldCount < 11) { if (_entity.scopedGrant == null) { _entity.scopedGrant = new ScopedGrant(); }ensureNotNull(_entity.scopedGrant).sgUid = tmp_sgUid; ensureNotNull(_entity.scopedGrant).sgPcsn = tmp_sgPcsn; ensureNotNull(_entity.scopedGrant).sgLcsn = tmp_sgLcsn; ensureNotNull(_entity.scopedGrant).sgLcb = tmp_sgLcb; ensureNotNull(_entity.scopedGrant).sgLct = tmp_sgLct; ensureNotNull(_entity.scopedGrant).sgTableId = tmp_sgTableId; ensureNotNull(_entity.scopedGrant).sgEntityUid = tmp_sgEntityUid; ensureNotNull(_entity.scopedGrant).sgPermissions = tmp_sgPermissions; ensureNotNull(_entity.scopedGrant).sgGroupUid = tmp_sgGroupUid; ensureNotNull(_entity.scopedGrant).sgIndex = tmp_sgIndex; ensureNotNull(_entity.scopedGrant).sgFlags = tmp_sgFlags; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(closure$tableId_0, closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(closure$tableId_0, closure$entityUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(closure$tableId_0, closure$entityUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByTableIdAndEntityUid_6svq3l$($this, tableId_0, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$tableId = tableId_0; this.local$entityUid = entityUid_0; } Coroutine$findByTableIdAndEntityUid_6svq3l$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByTableIdAndEntityUid_6svq3l$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByTableIdAndEntityUid_6svq3l$.prototype.constructor = Coroutine$findByTableIdAndEntityUid_6svq3l$; Coroutine$findByTableIdAndEntityUid_6svq3l$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(this.local$tableId, this.local$entityUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.findByTableIdAndEntityUid_6svq3l$ = function (tableId_0, entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findByTableIdAndEntityUid_6svq3l$(this, tableId_0, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral(this$ScopedGrantDao_JdbcKt, closure$tableId, closure$entityUid) { this.this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt; this.closure$tableId = closure$tableId; this.closure$entityUid = closure$entityUid; DoorDataSourceFactory.call(this); } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_sgUid = _resultSet.getLong_61zpoe$('sgUid'); var tmp_sgPcsn = _resultSet.getLong_61zpoe$('sgPcsn'); var tmp_sgLcsn = _resultSet.getLong_61zpoe$('sgLcsn'); var tmp_sgLcb = _resultSet.getInt_61zpoe$('sgLcb'); var tmp_sgLct = _resultSet.getLong_61zpoe$('sgLct'); var tmp_sgTableId = _resultSet.getInt_61zpoe$('sgTableId'); var tmp_sgEntityUid = _resultSet.getLong_61zpoe$('sgEntityUid'); var tmp_sgPermissions = _resultSet.getLong_61zpoe$('sgPermissions'); var tmp_sgGroupUid = _resultSet.getLong_61zpoe$('sgGroupUid'); var tmp_sgIndex = _resultSet.getInt_61zpoe$('sgIndex'); var tmp_sgFlags = _resultSet.getInt_61zpoe$('sgFlags'); var _entity = new ScopedGrantWithName(); _entity.name = tmp_name; _entity.sgUid = tmp_sgUid; _entity.sgPcsn = tmp_sgPcsn; _entity.sgLcsn = tmp_sgLcsn; _entity.sgLcb = tmp_sgLcb; _entity.sgLct = tmp_sgLct; _entity.sgTableId = tmp_sgTableId; _entity.sgEntityUid = tmp_sgEntityUid; _entity.sgPermissions = tmp_sgPermissions; _entity.sgGroupUid = tmp_sgGroupUid; _entity.sgIndex = tmp_sgIndex; _entity.sgFlags = tmp_sgFlags; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScopedGrantDao_JdbcKt._db, _stmtConfig, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(this.local$closure$tableId, this.local$closure$entityUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$ScopedGrantDao_JdbcKt._db, listOf(['ScopedGrant', 'PersonGroup', 'Person']), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this.this$ScopedGrantDao_JdbcKt, this.closure$tableId, this.closure$entityUid, _limit, _offset)); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_liveResult = void 0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScopedGrantDao_JdbcKt._db, _stmtConfig, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(this.local$closure$tableId, this.local$closure$entityUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$ScopedGrantDao_JdbcKt._db, listOf(['ScopedGrant', 'PersonGroup', 'Person']), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this.this$ScopedGrantDao_JdbcKt, this.closure$tableId, this.closure$entityUid)); }; ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; ScopedGrantDao_JdbcKt.prototype.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$ = function (tableId, entityUid) { var _result = new ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral(this, tableId, entityUid); return _result; }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_sgUid = _resultSet.getLong_61zpoe$('sgUid'); var tmp_sgPcsn = _resultSet.getLong_61zpoe$('sgPcsn'); var tmp_sgLcsn = _resultSet.getLong_61zpoe$('sgLcsn'); var tmp_sgLcb = _resultSet.getInt_61zpoe$('sgLcb'); var tmp_sgLct = _resultSet.getLong_61zpoe$('sgLct'); var tmp_sgTableId = _resultSet.getInt_61zpoe$('sgTableId'); var tmp_sgEntityUid = _resultSet.getLong_61zpoe$('sgEntityUid'); var tmp_sgPermissions = _resultSet.getLong_61zpoe$('sgPermissions'); var tmp_sgGroupUid = _resultSet.getLong_61zpoe$('sgGroupUid'); var tmp_sgIndex = _resultSet.getInt_61zpoe$('sgIndex'); var tmp_sgFlags = _resultSet.getInt_61zpoe$('sgFlags'); var _entity = new ScopedGrant(); _entity.sgUid = tmp_sgUid; _entity.sgPcsn = tmp_sgPcsn; _entity.sgLcsn = tmp_sgLcsn; _entity.sgLcb = tmp_sgLcb; _entity.sgLct = tmp_sgLct; _entity.sgTableId = tmp_sgTableId; _entity.sgEntityUid = tmp_sgEntityUid; _entity.sgPermissions = tmp_sgPermissions; _entity.sgGroupUid = tmp_sgGroupUid; _entity.sgIndex = tmp_sgIndex; _entity.sgFlags = tmp_sgFlags; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda(closure$tableId, closure$entityUid, closure$_result) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$tableId); _stmt.setLong_6svq3l$(2, closure$entityUid); useResults(_stmt.executeQuery(), ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda$lambda(closure$_result)); return Unit; }; } ScopedGrantDao_JdbcKt.prototype.findByTableIdAndEntityIdSync_6svq3l$ = function (tableId, entityUid) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*\n | FROM ScopedGrant\n | WHERE sgTableId = ?\n | AND sgEntityUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ScopedGrant.*\n | FROM ScopedGrant\n | WHERE sgTableId = ?\n | AND sgEntityUid = ?\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda(tableId, entityUid, _result)); return _result.v; }; function ScopedGrantDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_sgUid = _resultSet.getLong_61zpoe$('sgUid'); var tmp_sgPcsn = _resultSet.getLong_61zpoe$('sgPcsn'); var tmp_sgLcsn = _resultSet.getLong_61zpoe$('sgLcsn'); var tmp_sgLcb = _resultSet.getInt_61zpoe$('sgLcb'); var tmp_sgLct = _resultSet.getLong_61zpoe$('sgLct'); var tmp_sgTableId = _resultSet.getInt_61zpoe$('sgTableId'); var tmp_sgEntityUid = _resultSet.getLong_61zpoe$('sgEntityUid'); var tmp_sgPermissions = _resultSet.getLong_61zpoe$('sgPermissions'); var tmp_sgGroupUid = _resultSet.getLong_61zpoe$('sgGroupUid'); var tmp_sgIndex = _resultSet.getInt_61zpoe$('sgIndex'); var tmp_sgFlags = _resultSet.getInt_61zpoe$('sgFlags'); var _entity = new ScopedGrant(); _entity.sgUid = tmp_sgUid; _entity.sgPcsn = tmp_sgPcsn; _entity.sgLcsn = tmp_sgLcsn; _entity.sgLcb = tmp_sgLcb; _entity.sgLct = tmp_sgLct; _entity.sgTableId = tmp_sgTableId; _entity.sgEntityUid = tmp_sgEntityUid; _entity.sgPermissions = tmp_sgPermissions; _entity.sgGroupUid = tmp_sgGroupUid; _entity.sgIndex = tmp_sgIndex; _entity.sgFlags = tmp_sgFlags; closure$_result.v = _entity; }return Unit; }; } function Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda(closure$sgUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sgUid = closure$sgUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$sgUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByUid$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByUid$lambda(closure$sgUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda(closure$sgUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUid_s8cxhz$_7($this, sgUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$sgUid = sgUid_0; } Coroutine$findByUid_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_7.prototype.constructor = Coroutine$findByUid_s8cxhz$_7; Coroutine$findByUid_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ScopedGrant) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*\n | FROM ScopedGrant\n | WHERE sgUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ScopedGrant.*\n | FROM ScopedGrant\n | WHERE sgUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, ScopedGrantDao_JdbcKt$findByUid$lambda(this.local$sgUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (sgUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_7(this, sgUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_name = _resultSet.getString_61zpoe$('name'); var tmp_sgUid = _resultSet.getLong_61zpoe$('sgUid'); var tmp_sgPcsn = _resultSet.getLong_61zpoe$('sgPcsn'); var tmp_sgLcsn = _resultSet.getLong_61zpoe$('sgLcsn'); var tmp_sgLcb = _resultSet.getInt_61zpoe$('sgLcb'); var tmp_sgLct = _resultSet.getLong_61zpoe$('sgLct'); var tmp_sgTableId = _resultSet.getInt_61zpoe$('sgTableId'); var tmp_sgEntityUid = _resultSet.getLong_61zpoe$('sgEntityUid'); var tmp_sgPermissions = _resultSet.getLong_61zpoe$('sgPermissions'); var tmp_sgGroupUid = _resultSet.getLong_61zpoe$('sgGroupUid'); var tmp_sgIndex = _resultSet.getInt_61zpoe$('sgIndex'); var tmp_sgFlags = _resultSet.getInt_61zpoe$('sgFlags'); var _entity = new ScopedGrantWithName(); _entity.name = tmp_name; _entity.sgUid = tmp_sgUid; _entity.sgPcsn = tmp_sgPcsn; _entity.sgLcsn = tmp_sgLcsn; _entity.sgLcb = tmp_sgLcb; _entity.sgLct = tmp_sgLct; _entity.sgTableId = tmp_sgTableId; _entity.sgEntityUid = tmp_sgEntityUid; _entity.sgPermissions = tmp_sgPermissions; _entity.sgGroupUid = tmp_sgGroupUid; _entity.sgIndex = tmp_sgIndex; _entity.sgFlags = tmp_sgFlags; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(closure$sgUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sgUid = closure$sgUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$sgUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(closure$sgUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(closure$sgUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this$ScopedGrantDao_JdbcKt_0, closure$sgUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt_0; this.local$closure$sgUid = closure$sgUid_0; this.local$_liveResult = void 0; } Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ScopedGrantWithName) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*, \n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | LEFT JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT ScopedGrant.*, \n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | LEFT JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScopedGrantDao_JdbcKt._db, _stmtConfig, ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(this.local$closure$sgUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this$ScopedGrantDao_JdbcKt_0, closure$sgUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this$ScopedGrantDao_JdbcKt_0, closure$sgUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt.prototype.findByUidLiveWithName_s8cxhz$ = function (sgUid) { var _result = new DoorLiveDataImpl(this._db, listOf(['ScopedGrant', 'PersonGroup', 'Person']), ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this, sgUid)); return _result; }; function ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ScopedGrant (sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING sgUid'; } else tmp$ = ''; return "INSERT INTO ScopedGrant (sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES(COALESCE(?,nextval('ScopedGrant_sgUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.sgUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.sgUid); } stmt.setLong_6svq3l$(2, entity.sgPcsn); stmt.setLong_6svq3l$(3, entity.sgLcsn); stmt.setInt_vux9f0$(4, entity.sgLcb); stmt.setLong_6svq3l$(5, entity.sgLct); stmt.setInt_vux9f0$(6, entity.sgTableId); stmt.setLong_6svq3l$(7, entity.sgEntityUid); stmt.setLong_6svq3l$(8, entity.sgPermissions); stmt.setLong_6svq3l$(9, entity.sgGroupUid); stmt.setInt_vux9f0$(10, entity.sgIndex); stmt.setInt_vux9f0$(11, entity.sgFlags); }; ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScopedGrantDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao_JdbcKt', interfaces: [ScopedGrantDao]}; function ScopedGrantDao_ReplicateWrapper(_db, _dao) { ScopedGrantDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_147($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_147.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_147.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_147.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_147; Coroutine$replicateOnNewNode_s8cxhz$_147.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_147(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_150($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_150.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_150.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_150.prototype.constructor = Coroutine$replicateOnChange_150; Coroutine$replicateOnChange_150.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_150(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_6($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_6.prototype.constructor = Coroutine$replicateOnChangeClazzBased_6; Coroutine$replicateOnChangeClazzBased_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_6(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_3.prototype.constructor = Coroutine$replicateOnChangePersonBased_3; Coroutine$replicateOnChangePersonBased_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_6($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_6.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_6; Coroutine$replicateOnChangeSchoolBased_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_6(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_y0tj3a$_0($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$insertAsync_y0tj3a$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_y0tj3a$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_y0tj3a$_0.prototype.constructor = Coroutine$insertAsync_y0tj3a$_0; Coroutine$insertAsync_y0tj3a$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$scopedGrant.sgUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(48, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$scopedGrant.sgUid = _newPk; this.state_0 = 3; continue; case 3: this.local$scopedGrant.sgLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$scopedGrant.sgUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.insertAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_y0tj3a$_0(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_djn83v$_0($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$insertListAsync_djn83v$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_djn83v$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_djn83v$_0.prototype.constructor = Coroutine$insertListAsync_djn83v$_0; Coroutine$insertListAsync_djn83v$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$scopedGrantList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.sgUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(48, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.sgUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.sgLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.insertListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_djn83v$_0(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_y0tj3a$_0($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$updateAsync_y0tj3a$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y0tj3a$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y0tj3a$_0.prototype.constructor = Coroutine$updateAsync_y0tj3a$_0; Coroutine$updateAsync_y0tj3a$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$scopedGrant.sgLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.updateAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y0tj3a$_0(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_djn83v$_0($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$updateListAsync_djn83v$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_djn83v$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_djn83v$_0.prototype.constructor = Coroutine$updateListAsync_djn83v$_0; Coroutine$updateListAsync_djn83v$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$scopedGrantList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.sgLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.updateListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_djn83v$_0(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScopedGrantDao_ReplicateWrapper.prototype.findByTableIdAndEntityUid_6svq3l$ = function (tableId, entityUid, continuation) { return this._dao_0.findByTableIdAndEntityUid_6svq3l$(tableId, entityUid, continuation); }; ScopedGrantDao_ReplicateWrapper.prototype.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$ = function (tableId, entityUid) { return this._dao_0.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$(tableId, entityUid); }; ScopedGrantDao_ReplicateWrapper.prototype.findByTableIdAndEntityIdSync_6svq3l$ = function (tableId, entityUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScopedGrantDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (sgUid, continuation) { return this._dao_0.findByUid_s8cxhz$(sgUid, continuation); }; ScopedGrantDao_ReplicateWrapper.prototype.findByUidLiveWithName_s8cxhz$ = function (sgUid) { return this._dao_0.findByUidLiveWithName_s8cxhz$(sgUid); }; ScopedGrantDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao_ReplicateWrapper', interfaces: [ScopedGrantDao]}; function ScopedGrantDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ScopedGrantDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_148($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_148.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_148.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_148.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_148; Coroutine$replicateOnNewNode_s8cxhz$_148.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_148(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_151($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_151.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_151.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_151.prototype.constructor = Coroutine$replicateOnChange_151; Coroutine$replicateOnChange_151.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_151(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_7($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_7.prototype.constructor = Coroutine$replicateOnChangeClazzBased_7; Coroutine$replicateOnChangeClazzBased_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_7(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_4.prototype.constructor = Coroutine$replicateOnChangePersonBased_4; Coroutine$replicateOnChangePersonBased_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_7($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_7.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_7; Coroutine$replicateOnChangeSchoolBased_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_7(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_y0tj3a$_1($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$insertAsync_y0tj3a$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_y0tj3a$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_y0tj3a$_1.prototype.constructor = Coroutine$insertAsync_y0tj3a$_1; Coroutine$insertAsync_y0tj3a$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.insertAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_y0tj3a$_1(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_djn83v$_1($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$insertListAsync_djn83v$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_djn83v$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_djn83v$_1.prototype.constructor = Coroutine$insertListAsync_djn83v$_1; Coroutine$insertListAsync_djn83v$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.insertListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_djn83v$_1(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_y0tj3a$_1($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$updateAsync_y0tj3a$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y0tj3a$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y0tj3a$_1.prototype.constructor = Coroutine$updateAsync_y0tj3a$_1; Coroutine$updateAsync_y0tj3a$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.updateAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y0tj3a$_1(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_djn83v$_1($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$updateListAsync_djn83v$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_djn83v$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_djn83v$_1.prototype.constructor = Coroutine$updateListAsync_djn83v$_1; Coroutine$updateListAsync_djn83v$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.updateListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_djn83v$_1(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByTableIdAndEntityUid_6svq3l$_0($this, tableId_0, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tableId = tableId_0; this.local$entityUid = entityUid_0; } Coroutine$findByTableIdAndEntityUid_6svq3l$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByTableIdAndEntityUid_6svq3l$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByTableIdAndEntityUid_6svq3l$_0.prototype.constructor = Coroutine$findByTableIdAndEntityUid_6svq3l$_0; Coroutine$findByTableIdAndEntityUid_6svq3l$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByTableIdAndEntityUid_6svq3l$(this.local$tableId, this.local$entityUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.findByTableIdAndEntityUid_6svq3l$ = function (tableId_0, entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findByTableIdAndEntityUid_6svq3l$_0(this, tableId_0, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScopedGrantDao_Repo.prototype.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$ = function (tableId, entityUid) { var _result = this._dao.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$(tableId, entityUid); return _result; }; ScopedGrantDao_Repo.prototype.findByTableIdAndEntityIdSync_6svq3l$ = function (tableId, entityUid) { var _result = this._dao.findByTableIdAndEntityIdSync_6svq3l$(tableId, entityUid); return _result; }; function Coroutine$findByUid_s8cxhz$_8($this, sgUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sgUid = sgUid_0; } Coroutine$findByUid_s8cxhz$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_8.prototype.constructor = Coroutine$findByUid_s8cxhz$_8; Coroutine$findByUid_s8cxhz$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$sgUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.findByUid_s8cxhz$ = function (sgUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_8(this, sgUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScopedGrantDao_Repo.prototype.findByUidLiveWithName_s8cxhz$ = function (sgUid) { var _result = this._dao.findByUidLiveWithName_s8cxhz$(sgUid); return _result; }; ScopedGrantDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao_Repo', interfaces: [ScopedGrantDao]}; function ScrapeQueueItemDao_JdbcKt(_db) { ScrapeQueueItemDao.call(this); this._db = _db; this._insertAdapterScrapeQueueItem_ = new ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral(this._db); } function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_sqiUid = _resultSet.getInt_61zpoe$('sqiUid'); var tmp_sqiContentEntryParentUid = _resultSet.getLong_61zpoe$('sqiContentEntryParentUid'); var tmp_sqiContentEntryUid = _resultSet.getLong_61zpoe$('sqiContentEntryUid'); var tmp_destDir = _resultSet.getString_61zpoe$('destDir'); var tmp_scrapeUrl = _resultSet.getString_61zpoe$('scrapeUrl'); var tmp_status = _resultSet.getInt_61zpoe$('status'); var tmp_runId = _resultSet.getInt_61zpoe$('runId'); var tmp_itemType = _resultSet.getInt_61zpoe$('itemType'); var tmp_errorCode = _resultSet.getInt_61zpoe$('errorCode'); var tmp_contentType = _resultSet.getString_61zpoe$('contentType'); var tmp_timeAdded = _resultSet.getLong_61zpoe$('timeAdded'); var tmp_timeStarted = _resultSet.getLong_61zpoe$('timeStarted'); var tmp_timeFinished = _resultSet.getLong_61zpoe$('timeFinished'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_overrideEntry = _resultSet.getBoolean_61zpoe$('overrideEntry'); var _entity = new ScrapeQueueItem(); _entity.sqiUid = tmp_sqiUid; _entity.sqiContentEntryParentUid = tmp_sqiContentEntryParentUid; _entity.sqiContentEntryUid = tmp_sqiContentEntryUid; _entity.destDir = tmp_destDir; _entity.scrapeUrl = tmp_scrapeUrl; _entity.status = tmp_status; _entity.runId = tmp_runId; _entity.itemType = tmp_itemType; _entity.errorCode = tmp_errorCode; _entity.contentType = tmp_contentType; _entity.timeAdded = tmp_timeAdded; _entity.timeStarted = tmp_timeStarted; _entity.timeFinished = tmp_timeFinished; _entity.priority = tmp_priority; _entity.overrideEntry = tmp_overrideEntry; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(closure$itemType_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$itemType = closure$itemType_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.prototype.constructor = Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$itemType); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(closure$itemType_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(closure$itemType_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this$ScrapeQueueItemDao_JdbcKt_0, closure$itemType_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScrapeQueueItemDao_JdbcKt = this$ScrapeQueueItemDao_JdbcKt_0; this.local$closure$itemType = closure$itemType_0; this.local$_liveResult = void 0; } Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.prototype.constructor = Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM ScrapeQueueItem WHERE status = 1 AND itemType = ? ORDER BY priority ASC LIMIT 10', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM ScrapeQueueItem WHERE status = 1 AND itemType = ? ORDER BY priority ASC LIMIT 10\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScrapeQueueItemDao_JdbcKt._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(this.local$closure$itemType, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this$ScrapeQueueItemDao_JdbcKt_0, closure$itemType_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this$ScrapeQueueItemDao_JdbcKt_0, closure$itemType_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScrapeQueueItemDao_JdbcKt.prototype.findNextQueueItems_za3lpa$ = function (itemType) { var _result = new DoorLiveDataImpl(this._db, listOf_0('ScrapeQueueItem'), ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this, itemType)); return _result; }; function ScrapeQueueItemDao_JdbcKt$updateSetStatusById$lambda(closure$status, closure$errorCode, closure$uid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$status); _stmt.setInt_vux9f0$(2, closure$errorCode); _stmt.setInt_vux9f0$(3, closure$uid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.updateSetStatusById_qt1dr2$ = function (uid, status, errorCode) { var _stmtConfig = new PreparedStatementConfig('UPDATE ScrapeQueueItem SET status = ?, errorCode = ? WHERE sqiUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ScrapeQueueItem SET status = ?, errorCode = ? WHERE sqiUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$updateSetStatusById$lambda(status, errorCode, uid)); }; function ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_sqiUid = _resultSet.getInt_61zpoe$('sqiUid'); var tmp_sqiContentEntryParentUid = _resultSet.getLong_61zpoe$('sqiContentEntryParentUid'); var tmp_sqiContentEntryUid = _resultSet.getLong_61zpoe$('sqiContentEntryUid'); var tmp_destDir = _resultSet.getString_61zpoe$('destDir'); var tmp_scrapeUrl = _resultSet.getString_61zpoe$('scrapeUrl'); var tmp_status = _resultSet.getInt_61zpoe$('status'); var tmp_runId = _resultSet.getInt_61zpoe$('runId'); var tmp_itemType = _resultSet.getInt_61zpoe$('itemType'); var tmp_errorCode = _resultSet.getInt_61zpoe$('errorCode'); var tmp_contentType = _resultSet.getString_61zpoe$('contentType'); var tmp_timeAdded = _resultSet.getLong_61zpoe$('timeAdded'); var tmp_timeStarted = _resultSet.getLong_61zpoe$('timeStarted'); var tmp_timeFinished = _resultSet.getLong_61zpoe$('timeFinished'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_overrideEntry = _resultSet.getBoolean_61zpoe$('overrideEntry'); var _entity = new ScrapeQueueItem(); _entity.sqiUid = tmp_sqiUid; _entity.sqiContentEntryParentUid = tmp_sqiContentEntryParentUid; _entity.sqiContentEntryUid = tmp_sqiContentEntryUid; _entity.destDir = tmp_destDir; _entity.scrapeUrl = tmp_scrapeUrl; _entity.status = tmp_status; _entity.runId = tmp_runId; _entity.itemType = tmp_itemType; _entity.errorCode = tmp_errorCode; _entity.contentType = tmp_contentType; _entity.timeAdded = tmp_timeAdded; _entity.timeStarted = tmp_timeStarted; _entity.timeFinished = tmp_timeFinished; _entity.priority = tmp_priority; _entity.overrideEntry = tmp_overrideEntry; closure$_result.v = _entity; }return Unit; }; } function ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda(closure$runId, closure$indexUrl, closure$_result) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$runId); _stmt.setString_vqvrqt$(2, closure$indexUrl); useResults(_stmt.executeQuery(), ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda$lambda(closure$_result)); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.getExistingQueueItem_19mbxw$ = function (runId, indexUrl) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ScrapeQueueItem) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from ScrapeQueueItem WHERE runId = ? AND scrapeUrl = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * from ScrapeQueueItem WHERE runId = ? AND scrapeUrl = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda(runId, indexUrl, _result)); return _result.v; }; function ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_sqiUid = _resultSet.getInt_61zpoe$('sqiUid'); var tmp_sqiContentEntryParentUid = _resultSet.getLong_61zpoe$('sqiContentEntryParentUid'); var tmp_sqiContentEntryUid = _resultSet.getLong_61zpoe$('sqiContentEntryUid'); var tmp_destDir = _resultSet.getString_61zpoe$('destDir'); var tmp_scrapeUrl = _resultSet.getString_61zpoe$('scrapeUrl'); var tmp_status = _resultSet.getInt_61zpoe$('status'); var tmp_runId = _resultSet.getInt_61zpoe$('runId'); var tmp_itemType = _resultSet.getInt_61zpoe$('itemType'); var tmp_errorCode = _resultSet.getInt_61zpoe$('errorCode'); var tmp_contentType = _resultSet.getString_61zpoe$('contentType'); var tmp_timeAdded = _resultSet.getLong_61zpoe$('timeAdded'); var tmp_timeStarted = _resultSet.getLong_61zpoe$('timeStarted'); var tmp_timeFinished = _resultSet.getLong_61zpoe$('timeFinished'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_overrideEntry = _resultSet.getBoolean_61zpoe$('overrideEntry'); var _entity = new ScrapeQueueItem(); _entity.sqiUid = tmp_sqiUid; _entity.sqiContentEntryParentUid = tmp_sqiContentEntryParentUid; _entity.sqiContentEntryUid = tmp_sqiContentEntryUid; _entity.destDir = tmp_destDir; _entity.scrapeUrl = tmp_scrapeUrl; _entity.status = tmp_status; _entity.runId = tmp_runId; _entity.itemType = tmp_itemType; _entity.errorCode = tmp_errorCode; _entity.contentType = tmp_contentType; _entity.timeAdded = tmp_timeAdded; _entity.timeStarted = tmp_timeStarted; _entity.timeFinished = tmp_timeFinished; _entity.priority = tmp_priority; _entity.overrideEntry = tmp_overrideEntry; closure$_result.v = _entity; }return Unit; }; } function ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda(closure$runId, closure$entryUid, closure$_result) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$runId); _stmt.setLong_6svq3l$(2, closure$entryUid); useResults(_stmt.executeQuery(), ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda$lambda(closure$_result)); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.findExistingQueueItem_6svq3l$ = function (runId, entryUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ScrapeQueueItem) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from ScrapeQueueItem WHERE runId = ? AND sqiContentEntryUid = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * from ScrapeQueueItem WHERE runId = ? AND sqiContentEntryUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda(runId, entryUid, _result)); return _result.v; }; function ScrapeQueueItemDao_JdbcKt$setTimeStarted$lambda(closure$timeStarted, closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$timeStarted); _stmt.setInt_vux9f0$(2, closure$uid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.setTimeStarted_6svq3l$ = function (uid, timeStarted) { var _stmtConfig = new PreparedStatementConfig('UPDATE ScrapeQueueItem SET timeStarted = ? WHERE sqiUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ScrapeQueueItem SET timeStarted = ? WHERE sqiUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$setTimeStarted$lambda(timeStarted, uid)); }; function ScrapeQueueItemDao_JdbcKt$setTimeFinished$lambda(closure$timeFinished, closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$timeFinished); _stmt.setInt_vux9f0$(2, closure$uid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.setTimeFinished_6svq3l$ = function (uid, timeFinished) { var _stmtConfig = new PreparedStatementConfig('UPDATE ScrapeQueueItem SET timeFinished = ? WHERE sqiUid = ?', void 0, void 0, void 0, trimMargin('\n |UPDATE ScrapeQueueItem SET timeFinished = ? WHERE sqiUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$setTimeFinished$lambda(timeFinished, uid)); }; function ScrapeQueueItemDao_JdbcKt$findByUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_sqiUid = _resultSet.getInt_61zpoe$('sqiUid'); var tmp_sqiContentEntryParentUid = _resultSet.getLong_61zpoe$('sqiContentEntryParentUid'); var tmp_sqiContentEntryUid = _resultSet.getLong_61zpoe$('sqiContentEntryUid'); var tmp_destDir = _resultSet.getString_61zpoe$('destDir'); var tmp_scrapeUrl = _resultSet.getString_61zpoe$('scrapeUrl'); var tmp_status = _resultSet.getInt_61zpoe$('status'); var tmp_runId = _resultSet.getInt_61zpoe$('runId'); var tmp_itemType = _resultSet.getInt_61zpoe$('itemType'); var tmp_errorCode = _resultSet.getInt_61zpoe$('errorCode'); var tmp_contentType = _resultSet.getString_61zpoe$('contentType'); var tmp_timeAdded = _resultSet.getLong_61zpoe$('timeAdded'); var tmp_timeStarted = _resultSet.getLong_61zpoe$('timeStarted'); var tmp_timeFinished = _resultSet.getLong_61zpoe$('timeFinished'); var tmp_priority = _resultSet.getInt_61zpoe$('priority'); var tmp_overrideEntry = _resultSet.getBoolean_61zpoe$('overrideEntry'); var _entity = new ScrapeQueueItemWithScrapeRun(); _entity.sqiUid = tmp_sqiUid; _entity.sqiContentEntryParentUid = tmp_sqiContentEntryParentUid; _entity.sqiContentEntryUid = tmp_sqiContentEntryUid; _entity.destDir = tmp_destDir; _entity.scrapeUrl = tmp_scrapeUrl; _entity.status = tmp_status; _entity.runId = tmp_runId; _entity.itemType = tmp_itemType; _entity.errorCode = tmp_errorCode; _entity.contentType = tmp_contentType; _entity.timeAdded = tmp_timeAdded; _entity.timeStarted = tmp_timeStarted; _entity.timeFinished = tmp_timeFinished; _entity.priority = tmp_priority; _entity.overrideEntry = tmp_overrideEntry; var _scrapeRun_nullFieldCount = 0; var tmp_scrapeRunUid = _resultSet.getInt_61zpoe$('scrapeRunUid'); if (_resultSet.wasNull()) { _scrapeRun_nullFieldCount = _scrapeRun_nullFieldCount + 1 | 0; }var tmp_scrapeType = _resultSet.getString_61zpoe$('scrapeType'); if (_resultSet.wasNull()) { _scrapeRun_nullFieldCount = _scrapeRun_nullFieldCount + 1 | 0; }var tmp_scrapeRunStatus = _resultSet.getInt_61zpoe$('scrapeRunStatus'); if (_resultSet.wasNull()) { _scrapeRun_nullFieldCount = _scrapeRun_nullFieldCount + 1 | 0; }var tmp_conversionParams = _resultSet.getString_61zpoe$('conversionParams'); if (_resultSet.wasNull()) { _scrapeRun_nullFieldCount = _scrapeRun_nullFieldCount + 1 | 0; }if (_scrapeRun_nullFieldCount < 4) { if (_entity.scrapeRun == null) { _entity.scrapeRun = new ScrapeRun(); }ensureNotNull(_entity.scrapeRun).scrapeRunUid = tmp_scrapeRunUid; ensureNotNull(_entity.scrapeRun).scrapeType = tmp_scrapeType; ensureNotNull(_entity.scrapeRun).scrapeRunStatus = tmp_scrapeRunStatus; ensureNotNull(_entity.scrapeRun).conversionParams = tmp_conversionParams; }closure$_result.v = _entity; }return Unit; }; } function ScrapeQueueItemDao_JdbcKt$findByUid$lambda(closure$sqiUid, closure$_result) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$sqiUid); useResults(_stmt.executeQuery(), ScrapeQueueItemDao_JdbcKt$findByUid$lambda$lambda(closure$_result)); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.findByUid_za3lpa$ = function (sqiUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ScrapeQueueItemWithScrapeRun) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT ScrapeQueueItem.*, ScrapeRun.* FROM ScrapeQueueItem \n | LEFT JOIN ScrapeRun ON ScrapeQueueItem.runId = ScrapeRun.scrapeRunUid\n | WHERE ScrapeQueueItem.sqiUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |SELECT ScrapeQueueItem.*, ScrapeRun.* FROM ScrapeQueueItem \n | LEFT JOIN ScrapeRun ON ScrapeQueueItem.runId = ScrapeRun.scrapeRunUid\n | WHERE ScrapeQueueItem.sqiUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, ScrapeQueueItemDao_JdbcKt$findByUid$lambda(sqiUid, _result)); return _result.v; }; ScrapeQueueItemDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterScrapeQueueItem_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_159($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_159.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_159.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_159.prototype.constructor = Coroutine$insertAsync_159; Coroutine$insertAsync_159.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScrapeQueueItem_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScrapeQueueItemDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_159(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScrapeQueueItemDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterScrapeQueueItem_.insertList_4ezy5m$(entityList); }; function ScrapeQueueItemDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.sqiContentEntryParentUid); _stmt.setLong_6svq3l$(2, _entity.sqiContentEntryUid); _stmt.setString_vqvrqt$(3, _entity.destDir); _stmt.setString_vqvrqt$(4, _entity.scrapeUrl); _stmt.setInt_vux9f0$(5, _entity.status); _stmt.setInt_vux9f0$(6, _entity.runId); _stmt.setInt_vux9f0$(7, _entity.itemType); _stmt.setInt_vux9f0$(8, _entity.errorCode); _stmt.setString_vqvrqt$(9, _entity.contentType); _stmt.setLong_6svq3l$(10, _entity.timeAdded); _stmt.setLong_6svq3l$(11, _entity.timeStarted); _stmt.setLong_6svq3l$(12, _entity.timeFinished); _stmt.setInt_vux9f0$(13, _entity.priority); _stmt.setBoolean_fzusl$(14, _entity.overrideEntry); _stmt.setInt_vux9f0$(15, _entity.sqiUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ScrapeQueueItem SET sqiContentEntryParentUid = ?, sqiContentEntryUid = ?, destDir = ?, scrapeUrl = ?, status = ?, runId = ?, itemType = ?, errorCode = ?, contentType = ?, timeAdded = ?, timeStarted = ?, timeFinished = ?, priority = ?, overrideEntry = ? WHERE sqiUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScrapeQueueItemDao_JdbcKt$updateList$lambda(entityList)); }; function ScrapeQueueItemDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.sqiContentEntryParentUid); _stmt.setLong_6svq3l$(2, closure$entity.sqiContentEntryUid); _stmt.setString_vqvrqt$(3, closure$entity.destDir); _stmt.setString_vqvrqt$(4, closure$entity.scrapeUrl); _stmt.setInt_vux9f0$(5, closure$entity.status); _stmt.setInt_vux9f0$(6, closure$entity.runId); _stmt.setInt_vux9f0$(7, closure$entity.itemType); _stmt.setInt_vux9f0$(8, closure$entity.errorCode); _stmt.setString_vqvrqt$(9, closure$entity.contentType); _stmt.setLong_6svq3l$(10, closure$entity.timeAdded); _stmt.setLong_6svq3l$(11, closure$entity.timeStarted); _stmt.setLong_6svq3l$(12, closure$entity.timeFinished); _stmt.setInt_vux9f0$(13, closure$entity.priority); _stmt.setBoolean_fzusl$(14, closure$entity.overrideEntry); _stmt.setInt_vux9f0$(15, closure$entity.sqiUid); return _stmt.executeUpdate(); }; } ScrapeQueueItemDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ScrapeQueueItem SET sqiContentEntryParentUid = ?, sqiContentEntryUid = ?, destDir = ?, scrapeUrl = ?, status = ?, runId = ?, itemType = ?, errorCode = ?, contentType = ?, timeAdded = ?, timeStarted = ?, timeFinished = ?, priority = ?, overrideEntry = ? WHERE sqiUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScrapeQueueItemDao_JdbcKt$update$lambda(entity)); }; function ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ScrapeQueueItem (sqiUid, sqiContentEntryParentUid, sqiContentEntryUid, destDir, scrapeUrl, status, runId, itemType, errorCode, contentType, timeAdded, timeStarted, timeFinished, priority, overrideEntry) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING sqiUid'; } else tmp$ = ''; return "INSERT INTO ScrapeQueueItem (sqiUid, sqiContentEntryParentUid, sqiContentEntryUid, destDir, scrapeUrl, status, runId, itemType, errorCode, contentType, timeAdded, timeStarted, timeFinished, priority, overrideEntry) VALUES(COALESCE(?,nextval('ScrapeQueueItem_sqiUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (entity.sqiUid === 0) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setInt_vux9f0$(1, entity.sqiUid); } stmt.setLong_6svq3l$(2, entity.sqiContentEntryParentUid); stmt.setLong_6svq3l$(3, entity.sqiContentEntryUid); stmt.setString_vqvrqt$(4, entity.destDir); stmt.setString_vqvrqt$(5, entity.scrapeUrl); stmt.setInt_vux9f0$(6, entity.status); stmt.setInt_vux9f0$(7, entity.runId); stmt.setInt_vux9f0$(8, entity.itemType); stmt.setInt_vux9f0$(9, entity.errorCode); stmt.setString_vqvrqt$(10, entity.contentType); stmt.setLong_6svq3l$(11, entity.timeAdded); stmt.setLong_6svq3l$(12, entity.timeStarted); stmt.setLong_6svq3l$(13, entity.timeFinished); stmt.setInt_vux9f0$(14, entity.priority); stmt.setBoolean_fzusl$(15, entity.overrideEntry); }; ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScrapeQueueItemDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeQueueItemDao_JdbcKt', interfaces: [ScrapeQueueItemDao]}; function ScrapeRunDao_JdbcKt(_db) { ScrapeRunDao.call(this); this._db = _db; this._insertAdapterScrapeRun_ = new ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral(this._db); } ScrapeRunDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterScrapeRun_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_160($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_160.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_160.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_160.prototype.constructor = Coroutine$insertAsync_160; Coroutine$insertAsync_160.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScrapeRun_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScrapeRunDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_160(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScrapeRunDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterScrapeRun_.insertList_4ezy5m$(entityList); }; function ScrapeRunDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.scrapeType); _stmt.setInt_vux9f0$(2, _entity.scrapeRunStatus); _stmt.setString_vqvrqt$(3, _entity.conversionParams); _stmt.setInt_vux9f0$(4, _entity.scrapeRunUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ScrapeRunDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ScrapeRun SET scrapeType = ?, scrapeRunStatus = ?, conversionParams = ? WHERE scrapeRunUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScrapeRunDao_JdbcKt$updateList$lambda(entityList)); }; function ScrapeRunDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.scrapeType); _stmt.setInt_vux9f0$(2, closure$entity.scrapeRunStatus); _stmt.setString_vqvrqt$(3, closure$entity.conversionParams); _stmt.setInt_vux9f0$(4, closure$entity.scrapeRunUid); return _stmt.executeUpdate(); }; } ScrapeRunDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ScrapeRun SET scrapeType = ?, scrapeRunStatus = ?, conversionParams = ? WHERE scrapeRunUid = ?'; prepareAndUseStatement_0(this._db, _sql, ScrapeRunDao_JdbcKt$update$lambda(entity)); }; function ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO ScrapeRun (scrapeRunUid, scrapeType, scrapeRunStatus, conversionParams) VALUES(?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING scrapeRunUid'; } else tmp$ = ''; return "INSERT INTO ScrapeRun (scrapeRunUid, scrapeType, scrapeRunStatus, conversionParams) VALUES(COALESCE(?,nextval('ScrapeRun_scrapeRunUid_seq')), ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (entity.scrapeRunUid === 0) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setInt_vux9f0$(1, entity.scrapeRunUid); } stmt.setString_vqvrqt$(2, entity.scrapeType); stmt.setInt_vux9f0$(3, entity.scrapeRunStatus); stmt.setString_vqvrqt$(4, entity.conversionParams); }; ScrapeRunDao_JdbcKt$_insertAdapterScrapeRun_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScrapeRunDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeRunDao_JdbcKt', interfaces: [ScrapeRunDao]}; function SiteDao_JdbcKt(_db) { SiteDao.call(this); this._db = _db; this._insertAdapterSite_upsert = new SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral(this._db); this._insertAdapterSite_ = new SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral(this._db); } function SiteDao_JdbcKt$getSite$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_siteUid = _resultSet.getLong_61zpoe$('siteUid'); var tmp_sitePcsn = _resultSet.getLong_61zpoe$('sitePcsn'); var tmp_siteLcsn = _resultSet.getLong_61zpoe$('siteLcsn'); var tmp_siteLcb = _resultSet.getInt_61zpoe$('siteLcb'); var tmp_siteLct = _resultSet.getLong_61zpoe$('siteLct'); var tmp_siteName = _resultSet.getString_61zpoe$('siteName'); var tmp_guestLogin = _resultSet.getBoolean_61zpoe$('guestLogin'); var tmp_registrationAllowed = _resultSet.getBoolean_61zpoe$('registrationAllowed'); var tmp_authSalt = _resultSet.getString_61zpoe$('authSalt'); var _entity = new Site(); _entity.siteUid = tmp_siteUid; _entity.sitePcsn = tmp_sitePcsn; _entity.siteLcsn = tmp_siteLcsn; _entity.siteLcb = tmp_siteLcb; _entity.siteLct = tmp_siteLct; _entity.siteName = tmp_siteName; _entity.guestLogin = tmp_guestLogin; _entity.registrationAllowed = tmp_registrationAllowed; _entity.authSalt = tmp_authSalt; closure$_result.v = _entity; }return Unit; }; } function SiteDao_JdbcKt$getSite$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), SiteDao_JdbcKt$getSite$lambda$lambda(closure$_result)); return Unit; }; } SiteDao_JdbcKt.prototype.getSite = function () { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Site) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Site LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Site LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, SiteDao_JdbcKt$getSite$lambda(_result)); return _result.v; }; function SiteDao_JdbcKt$getSiteAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_siteUid = _resultSet.getLong_61zpoe$('siteUid'); var tmp_sitePcsn = _resultSet.getLong_61zpoe$('sitePcsn'); var tmp_siteLcsn = _resultSet.getLong_61zpoe$('siteLcsn'); var tmp_siteLcb = _resultSet.getInt_61zpoe$('siteLcb'); var tmp_siteLct = _resultSet.getLong_61zpoe$('siteLct'); var tmp_siteName = _resultSet.getString_61zpoe$('siteName'); var tmp_guestLogin = _resultSet.getBoolean_61zpoe$('guestLogin'); var tmp_registrationAllowed = _resultSet.getBoolean_61zpoe$('registrationAllowed'); var tmp_authSalt = _resultSet.getString_61zpoe$('authSalt'); var _entity = new Site(); _entity.siteUid = tmp_siteUid; _entity.sitePcsn = tmp_sitePcsn; _entity.siteLcsn = tmp_siteLcsn; _entity.siteLcb = tmp_siteLcb; _entity.siteLct = tmp_siteLct; _entity.siteName = tmp_siteName; _entity.guestLogin = tmp_guestLogin; _entity.registrationAllowed = tmp_registrationAllowed; _entity.authSalt = tmp_authSalt; closure$_result.v = _entity; }return Unit; }; } function Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda; Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteDao_JdbcKt$getSiteAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$getSiteAsync$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getSiteAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$getSiteAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSiteAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSiteAsync.prototype.constructor = Coroutine$getSiteAsync; Coroutine$getSiteAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Site) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM Site LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM Site LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteDao_JdbcKt$getSiteAsync$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.getSiteAsync = function (continuation_0, suspended) { var instance = new Coroutine$getSiteAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceAsync_5rubkd$($this, site_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$site = site_0; } Coroutine$replaceAsync_5rubkd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceAsync_5rubkd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceAsync_5rubkd$.prototype.constructor = Coroutine$replaceAsync_5rubkd$; Coroutine$replaceAsync_5rubkd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSite_upsert.insertAndReturnIdAsync_11rb$(this.local$site, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.replaceAsync_5rubkd$ = function (site_0, continuation_0, suspended) { var instance = new Coroutine$replaceAsync_5rubkd$(this, site_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_JdbcKt.prototype.insert_5rubkd$ = function (site) { var _retVal = this._insertAdapterSite_.insertAndReturnId_11rb$(site); return _retVal; }; function Coroutine$SiteDao_JdbcKt$updateAsync$lambda(closure$workspace_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$workspace = closure$workspace_0; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$updateAsync$lambda; Coroutine$SiteDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$workspace.sitePcsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$workspace.siteLcsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$workspace.siteLcb); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$workspace.siteLct); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$workspace.siteName); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$workspace.guestLogin); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$workspace.registrationAllowed); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$workspace.authSalt); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$workspace.siteUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$updateAsync$lambda(closure$workspace_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$updateAsync$lambda(closure$workspace_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_5rubkd$($this, workspace_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$workspace = workspace_0; } Coroutine$updateAsync_5rubkd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_5rubkd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_5rubkd$.prototype.constructor = Coroutine$updateAsync_5rubkd$; Coroutine$updateAsync_5rubkd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Site SET sitePcsn = ?, siteLcsn = ?, siteLcb = ?, siteLct = ?, siteName = ?, guestLogin = ?, registrationAllowed = ?, authSalt = ? WHERE siteUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SiteDao_JdbcKt$updateAsync$lambda(this.local$workspace), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.updateAsync_5rubkd$ = function (workspace_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_5rubkd$(this, workspace_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_149($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_149.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_149.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_149.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_149; Coroutine$replicateOnNewNode_s8cxhz$_149.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | ? AS siteDestination\n | FROM Site\n | WHERE Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = ?), 0) \n | /*psql ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | ? AS siteDestination\n | FROM Site\n | WHERE Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = ?), 0) \n | ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_149(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda; Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_152($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_152.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_152.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_152.prototype.constructor = Coroutine$replicateOnChange_152; Coroutine$replicateOnChange_152.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN Site \n | ON ChangeLog.chTableId = 189 \n | AND ChangeLog.chEntityPk = Site.siteUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN Site \n | ON ChangeLog.chTableId = 189 \n | AND ChangeLog.chEntityPk = Site.siteUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SiteDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_152(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO Site (siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING siteUid'; } else tmp$ = ''; return "INSERT INTO Site (siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES(COALESCE(?,nextval('Site_siteUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = excluded.sitePcsn,siteLcsn = excluded.siteLcsn,siteLcb = excluded.siteLcb,siteLct = excluded.siteLct,siteName = excluded.siteName,guestLogin = excluded.guestLogin,registrationAllowed = excluded.registrationAllowed,authSalt = excluded.authSalt" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.siteUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.siteUid); } stmt.setLong_6svq3l$(2, entity.sitePcsn); stmt.setLong_6svq3l$(3, entity.siteLcsn); stmt.setInt_vux9f0$(4, entity.siteLcb); stmt.setLong_6svq3l$(5, entity.siteLct); stmt.setString_vqvrqt$(6, entity.siteName); stmt.setBoolean_fzusl$(7, entity.guestLogin); stmt.setBoolean_fzusl$(8, entity.registrationAllowed); stmt.setString_vqvrqt$(9, entity.authSalt); }; SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO Site (siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING siteUid'; } else tmp$ = ''; return "INSERT INTO Site (siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES(COALESCE(?,nextval('Site_siteUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.siteUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.siteUid); } stmt.setLong_6svq3l$(2, entity.sitePcsn); stmt.setLong_6svq3l$(3, entity.siteLcsn); stmt.setInt_vux9f0$(4, entity.siteLcb); stmt.setLong_6svq3l$(5, entity.siteLct); stmt.setString_vqvrqt$(6, entity.siteName); stmt.setBoolean_fzusl$(7, entity.guestLogin); stmt.setBoolean_fzusl$(8, entity.registrationAllowed); stmt.setString_vqvrqt$(9, entity.authSalt); }; SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SiteDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao_JdbcKt', interfaces: [SiteDao]}; function SiteDao_ReplicateWrapper(_db, _dao) { SiteDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } SiteDao_ReplicateWrapper.prototype.getSite = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SiteDao_ReplicateWrapper.prototype.getSiteAsync = function (continuation) { return this._dao_0.getSiteAsync(continuation); }; function Coroutine$replaceAsync_5rubkd$_0($this, site_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$site = site_0; } Coroutine$replaceAsync_5rubkd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceAsync_5rubkd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceAsync_5rubkd$_0.prototype.constructor = Coroutine$replaceAsync_5rubkd$_0; Coroutine$replaceAsync_5rubkd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$site.siteUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(189, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$site.siteUid = _newPk; this.state_0 = 3; continue; case 3: this.local$site.siteLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.replaceAsync_5rubkd$(this.local$site, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$site.siteUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.replaceAsync_5rubkd$ = function (site_0, continuation_0, suspended) { var instance = new Coroutine$replaceAsync_5rubkd$_0(this, site_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_ReplicateWrapper.prototype.insert_5rubkd$ = function (site) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateAsync_5rubkd$_0($this, workspace_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$workspace = workspace_0; } Coroutine$updateAsync_5rubkd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_5rubkd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_5rubkd$_0.prototype.constructor = Coroutine$updateAsync_5rubkd$_0; Coroutine$updateAsync_5rubkd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$workspace.siteLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_5rubkd$(this.local$workspace, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.updateAsync_5rubkd$ = function (workspace_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_5rubkd$_0(this, workspace_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNode_s8cxhz$_150($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_150.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_150.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_150.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_150; Coroutine$replicateOnNewNode_s8cxhz$_150.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_150(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_153($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_153.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_153.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_153.prototype.constructor = Coroutine$replicateOnChange_153; Coroutine$replicateOnChange_153.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_153(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao_ReplicateWrapper', interfaces: [SiteDao]}; function SiteDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SiteDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } SiteDao_Repo.prototype.getSite = function () { var _result = this._dao.getSite(); return _result; }; function Coroutine$getSiteAsync_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$getSiteAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSiteAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSiteAsync_0.prototype.constructor = Coroutine$getSiteAsync_0; Coroutine$getSiteAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getSiteAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.getSiteAsync = function (continuation_0, suspended) { var instance = new Coroutine$getSiteAsync_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceAsync_5rubkd$_1($this, site_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$site = site_0; } Coroutine$replaceAsync_5rubkd$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceAsync_5rubkd$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceAsync_5rubkd$_1.prototype.constructor = Coroutine$replaceAsync_5rubkd$_1; Coroutine$replaceAsync_5rubkd$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceAsync_5rubkd$(this.local$site, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.replaceAsync_5rubkd$ = function (site_0, continuation_0, suspended) { var instance = new Coroutine$replaceAsync_5rubkd$_1(this, site_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_Repo.prototype.insert_5rubkd$ = function (site) { var _result = this._dao.insert_5rubkd$(site); return _result; }; function Coroutine$updateAsync_5rubkd$_1($this, workspace_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$workspace = workspace_0; } Coroutine$updateAsync_5rubkd$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_5rubkd$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_5rubkd$_1.prototype.constructor = Coroutine$updateAsync_5rubkd$_1; Coroutine$updateAsync_5rubkd$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_5rubkd$(this.local$workspace, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.updateAsync_5rubkd$ = function (workspace_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_5rubkd$_1(this, workspace_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNode_s8cxhz$_151($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_151.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_151.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_151.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_151; Coroutine$replicateOnNewNode_s8cxhz$_151.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_151(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_154($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_154.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_154.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_154.prototype.constructor = Coroutine$replicateOnChange_154; Coroutine$replicateOnChange_154.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_154(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao_Repo', interfaces: [SiteDao]}; function StateContentDao_JdbcKt(_db) { StateContentDao.call(this); this._db = _db; this._insertAdapterStateContentEntity_ = new StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral(this._db); } function Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateContentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_152($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_152.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_152.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_152.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_152; Coroutine$replicateOnNewNode_s8cxhz$_152.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS scePk,\n | ? AS sceDestination\n | FROM StateContentEntity\n | WHERE StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = ?), 0) \n | /*psql ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS scePk,\n | ? AS sceDestination\n | FROM StateContentEntity\n | WHERE StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = ?), 0) \n | ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StateContentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_152(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda; Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateContentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_155($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_155.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_155.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_155.prototype.constructor = Coroutine$replicateOnChange_155; Coroutine$replicateOnChange_155.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS sceUid,\n | UserSession.usClientNodeId AS sceDestination\n | FROM ChangeLog\n | JOIN StateContentEntity\n | ON ChangeLog.chTableId = 72\n | AND ChangeLog.chEntityPk = StateContentEntity.stateContentUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS sceUid,\n | UserSession.usClientNodeId AS sceDestination\n | FROM ChangeLog\n | JOIN StateContentEntity\n | ON ChangeLog.chTableId = 72\n | AND ChangeLog.chEntityPk = StateContentEntity.stateContentUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StateContentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_155(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_stateContentUid = _resultSet.getLong_61zpoe$('stateContentUid'); var tmp_stateContentStateUid = _resultSet.getLong_61zpoe$('stateContentStateUid'); var tmp_stateContentKey = _resultSet.getString_61zpoe$('stateContentKey'); var tmp_stateContentValue = _resultSet.getString_61zpoe$('stateContentValue'); var tmp_isIsactive = _resultSet.getBoolean_61zpoe$('isIsactive'); var tmp_stateContentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('stateContentMasterChangeSeqNum'); var tmp_stateContentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('stateContentLocalChangeSeqNum'); var tmp_stateContentLastChangedBy = _resultSet.getInt_61zpoe$('stateContentLastChangedBy'); var tmp_stateContentLct = _resultSet.getLong_61zpoe$('stateContentLct'); var _entity = StateContentEntity_init(); _entity.stateContentUid = tmp_stateContentUid; _entity.stateContentStateUid = tmp_stateContentStateUid; _entity.stateContentKey = tmp_stateContentKey; _entity.stateContentValue = tmp_stateContentValue; _entity.isIsactive = tmp_isIsactive; _entity.stateContentMasterChangeSeqNum = tmp_stateContentMasterChangeSeqNum; _entity.stateContentLocalChangeSeqNum = tmp_stateContentLocalChangeSeqNum; _entity.stateContentLastChangedBy = tmp_stateContentLastChangedBy; _entity.stateContentLct = tmp_stateContentLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda(closure$id, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$id); useResults(_stmt.executeQuery(), StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda$lambda(closure$_result)); return Unit; }; } StateContentDao_JdbcKt.prototype.findAllStateContentWithStateUid_s8cxhz$ = function (id) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM StateContentEntity WHERE stateContentStateUid = ? AND isIsactive', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM StateContentEntity WHERE stateContentStateUid = ? AND isIsactive\n |')); prepareAndUseStatement(this._db, _stmtConfig, StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda(id, _result)); return _result.v; }; function StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_stateContentUid = _resultSet.getLong_61zpoe$('stateContentUid'); var tmp_stateContentStateUid = _resultSet.getLong_61zpoe$('stateContentStateUid'); var tmp_stateContentKey = _resultSet.getString_61zpoe$('stateContentKey'); var tmp_stateContentValue = _resultSet.getString_61zpoe$('stateContentValue'); var tmp_isIsactive = _resultSet.getBoolean_61zpoe$('isIsactive'); var tmp_stateContentMasterChangeSeqNum = _resultSet.getLong_61zpoe$('stateContentMasterChangeSeqNum'); var tmp_stateContentLocalChangeSeqNum = _resultSet.getLong_61zpoe$('stateContentLocalChangeSeqNum'); var tmp_stateContentLastChangedBy = _resultSet.getInt_61zpoe$('stateContentLastChangedBy'); var tmp_stateContentLct = _resultSet.getLong_61zpoe$('stateContentLct'); var _entity = StateContentEntity_init(); _entity.stateContentUid = tmp_stateContentUid; _entity.stateContentStateUid = tmp_stateContentStateUid; _entity.stateContentKey = tmp_stateContentKey; _entity.stateContentValue = tmp_stateContentValue; _entity.isIsactive = tmp_isIsactive; _entity.stateContentMasterChangeSeqNum = tmp_stateContentMasterChangeSeqNum; _entity.stateContentLocalChangeSeqNum = tmp_stateContentLocalChangeSeqNum; _entity.stateContentLastChangedBy = tmp_stateContentLastChangedBy; _entity.stateContentLct = tmp_stateContentLct; closure$_result.v = _entity; }return Unit; }; } function StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda(closure$stateUid, closure$key, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$stateUid); _stmt.setString_vqvrqt$(2, closure$key); useResults(_stmt.executeQuery(), StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda$lambda(closure$_result)); return Unit; }; } StateContentDao_JdbcKt.prototype.findStateContentByKeyAndStateUid_4wgjuj$ = function (key, stateUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, StateContentEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM StateContentEntity WHERE stateContentStateUid = ? AND stateContentKey = ? AND isIsactive', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM StateContentEntity WHERE stateContentStateUid = ? AND stateContentKey = ? AND isIsactive\n |')); prepareAndUseStatement(this._db, _stmtConfig, StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda(stateUid, key, _result)); return _result.v; }; function StateContentDao_JdbcKt$setInActiveStateContentByKeyAndUid$lambda(closure$isActive, closure$updateTime, closure$stateUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isActive); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setLong_6svq3l$(3, closure$stateUid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } StateContentDao_JdbcKt.prototype.setInActiveStateContentByKeyAndUid_vhff2t$ = function (isActive, stateUid, updateTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StateContentEntity \n | SET isIsactive = ?, \n | stateContentLct = ?\n | WHERE stateContentUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE StateContentEntity \n | SET isIsactive = ?, \n | stateContentLct = ?\n | WHERE stateContentUid = ?\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, StateContentDao_JdbcKt$setInActiveStateContentByKeyAndUid$lambda(isActive, updateTime, stateUid)); }; StateContentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterStateContentEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_161($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_161.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_161.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_161.prototype.constructor = Coroutine$insertAsync_161; Coroutine$insertAsync_161.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStateContentEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_161(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterStateContentEntity_.insertList_4ezy5m$(entityList); }; function StateContentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.stateContentStateUid); _stmt.setString_vqvrqt$(2, _entity.stateContentKey); _stmt.setString_vqvrqt$(3, _entity.stateContentValue); _stmt.setBoolean_fzusl$(4, _entity.isIsactive); _stmt.setLong_6svq3l$(5, _entity.stateContentMasterChangeSeqNum); _stmt.setLong_6svq3l$(6, _entity.stateContentLocalChangeSeqNum); _stmt.setInt_vux9f0$(7, _entity.stateContentLastChangedBy); _stmt.setLong_6svq3l$(8, _entity.stateContentLct); _stmt.setLong_6svq3l$(9, _entity.stateContentUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } StateContentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE StateContentEntity SET stateContentStateUid = ?, stateContentKey = ?, stateContentValue = ?, isIsactive = ?, stateContentMasterChangeSeqNum = ?, stateContentLocalChangeSeqNum = ?, stateContentLastChangedBy = ?, stateContentLct = ? WHERE stateContentUid = ?'; prepareAndUseStatement_0(this._db, _sql, StateContentDao_JdbcKt$updateList$lambda(entityList)); }; function StateContentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.stateContentStateUid); _stmt.setString_vqvrqt$(2, closure$entity.stateContentKey); _stmt.setString_vqvrqt$(3, closure$entity.stateContentValue); _stmt.setBoolean_fzusl$(4, closure$entity.isIsactive); _stmt.setLong_6svq3l$(5, closure$entity.stateContentMasterChangeSeqNum); _stmt.setLong_6svq3l$(6, closure$entity.stateContentLocalChangeSeqNum); _stmt.setInt_vux9f0$(7, closure$entity.stateContentLastChangedBy); _stmt.setLong_6svq3l$(8, closure$entity.stateContentLct); _stmt.setLong_6svq3l$(9, closure$entity.stateContentUid); return _stmt.executeUpdate(); }; } StateContentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE StateContentEntity SET stateContentStateUid = ?, stateContentKey = ?, stateContentValue = ?, isIsactive = ?, stateContentMasterChangeSeqNum = ?, stateContentLocalChangeSeqNum = ?, stateContentLastChangedBy = ?, stateContentLct = ? WHERE stateContentUid = ?'; prepareAndUseStatement_0(this._db, _sql, StateContentDao_JdbcKt$update$lambda(entity)); }; function StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO StateContentEntity (stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING stateContentUid'; } else tmp$ = ''; return "INSERT INTO StateContentEntity (stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES(COALESCE(?,nextval('StateContentEntity_stateContentUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.stateContentUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.stateContentUid); } stmt.setLong_6svq3l$(2, entity.stateContentStateUid); stmt.setString_vqvrqt$(3, entity.stateContentKey); stmt.setString_vqvrqt$(4, entity.stateContentValue); stmt.setBoolean_fzusl$(5, entity.isIsactive); stmt.setLong_6svq3l$(6, entity.stateContentMasterChangeSeqNum); stmt.setLong_6svq3l$(7, entity.stateContentLocalChangeSeqNum); stmt.setInt_vux9f0$(8, entity.stateContentLastChangedBy); stmt.setLong_6svq3l$(9, entity.stateContentLct); }; StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; StateContentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao_JdbcKt', interfaces: [StateContentDao]}; function StateContentDao_ReplicateWrapper(_db, _dao) { StateContentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_153($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_153.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_153.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_153.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_153; Coroutine$replicateOnNewNode_s8cxhz$_153.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_153(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_156($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_156.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_156.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_156.prototype.constructor = Coroutine$replicateOnChange_156; Coroutine$replicateOnChange_156.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_156(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_ReplicateWrapper.prototype.findAllStateContentWithStateUid_s8cxhz$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.findStateContentByKeyAndStateUid_4wgjuj$ = function (key, stateUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.setInActiveStateContentByKeyAndUid_vhff2t$ = function (isActive, stateUid, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_162($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_162.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_162.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_162.prototype.constructor = Coroutine$insertAsync_162; Coroutine$insertAsync_162.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.stateContentUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(72, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.stateContentUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.stateContentLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.stateContentUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_162(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao_ReplicateWrapper', interfaces: [StateContentDao]}; function StateContentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { StateContentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_154($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_154.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_154.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_154.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_154; Coroutine$replicateOnNewNode_s8cxhz$_154.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_154(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_157($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_157.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_157.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_157.prototype.constructor = Coroutine$replicateOnChange_157; Coroutine$replicateOnChange_157.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_157(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_Repo.prototype.findAllStateContentWithStateUid_s8cxhz$ = function (id) { var _result = this._dao.findAllStateContentWithStateUid_s8cxhz$(id); return _result; }; StateContentDao_Repo.prototype.findStateContentByKeyAndStateUid_4wgjuj$ = function (key, stateUid) { var _result = this._dao.findStateContentByKeyAndStateUid_4wgjuj$(key, stateUid); return _result; }; StateContentDao_Repo.prototype.setInActiveStateContentByKeyAndUid_vhff2t$ = function (isActive, stateUid, updateTime) { this._dao.setInActiveStateContentByKeyAndUid_vhff2t$(isActive, stateUid, updateTime); }; StateContentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_163($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_163.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_163.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_163.prototype.constructor = Coroutine$insertAsync_163; Coroutine$insertAsync_163.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_163(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; StateContentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; StateContentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; StateContentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao_Repo', interfaces: [StateContentDao]}; function StateDao_JdbcKt(_db) { StateDao.call(this); this._db = _db; this._insertAdapterStateEntity_ = new StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral(this._db); } function Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_155($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_155.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_155.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_155.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_155; Coroutine$replicateOnNewNode_s8cxhz$_155.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS sePk,\n | ? AS seDestination\n | FROM StateEntity\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = ?), 0) \n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS sePk,\n | ? AS seDestination\n | FROM StateEntity\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = ?), 0) \n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StateDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_155(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$StateDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$StateDao_JdbcKt$replicateOnChange$lambda; Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_158($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_158.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_158.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_158.prototype.constructor = Coroutine$replicateOnChange_158; Coroutine$replicateOnChange_158.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StateEntity\n | ON ChangeLog.chTableId = 70\n | AND ChangeLog.chEntityPk = StateEntity.stateUid\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StateEntity\n | ON ChangeLog.chTableId = 70\n | AND ChangeLog.chEntityPk = StateEntity.stateUid\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StateDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_158(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StateDao_JdbcKt$findByStateId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_stateUid = _resultSet.getLong_61zpoe$('stateUid'); var tmp_stateId = _resultSet.getString_61zpoe$('stateId'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_activityId = _resultSet.getString_61zpoe$('activityId'); var tmp_registration = _resultSet.getString_61zpoe$('registration'); var tmp_isIsactive = _resultSet.getBoolean_61zpoe$('isIsactive'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stateMasterChangeSeqNum = _resultSet.getLong_61zpoe$('stateMasterChangeSeqNum'); var tmp_stateLocalChangeSeqNum = _resultSet.getLong_61zpoe$('stateLocalChangeSeqNum'); var tmp_stateLastChangedBy = _resultSet.getInt_61zpoe$('stateLastChangedBy'); var tmp_stateLct = _resultSet.getLong_61zpoe$('stateLct'); var _entity = new StateEntity(); _entity.stateUid = tmp_stateUid; _entity.stateId = tmp_stateId; _entity.agentUid = tmp_agentUid; _entity.activityId = tmp_activityId; _entity.registration = tmp_registration; _entity.isIsactive = tmp_isIsactive; _entity.timestamp = tmp_timestamp; _entity.stateMasterChangeSeqNum = tmp_stateMasterChangeSeqNum; _entity.stateLocalChangeSeqNum = tmp_stateLocalChangeSeqNum; _entity.stateLastChangedBy = tmp_stateLastChangedBy; _entity.stateLct = tmp_stateLct; closure$_result.v = _entity; }return Unit; }; } function StateDao_JdbcKt$findByStateId$lambda(closure$id, closure$agentUid, closure$activityId, closure$registration, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$id); _stmt.setLong_6svq3l$(2, closure$agentUid); _stmt.setString_vqvrqt$(3, closure$activityId); _stmt.setString_vqvrqt$(4, closure$registration); useResults(_stmt.executeQuery(), StateDao_JdbcKt$findByStateId$lambda$lambda(closure$_result)); return Unit; }; } StateDao_JdbcKt.prototype.findByStateId_r731ya$ = function (id, agentUid, activityId, registration) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, StateEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM StateEntity WHERE stateId = ? AND agentUid = ? AND activityId = ? AND registration = ? AND isIsactive LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM StateEntity WHERE stateId = ? AND agentUid = ? AND activityId = ? AND registration = ? AND isIsactive LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, StateDao_JdbcKt$findByStateId$lambda(id, agentUid, activityId, registration, _result)); return _result.v; }; function StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_stateUid = _resultSet.getLong_61zpoe$('stateUid'); var tmp_stateId = _resultSet.getString_61zpoe$('stateId'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_activityId = _resultSet.getString_61zpoe$('activityId'); var tmp_registration = _resultSet.getString_61zpoe$('registration'); var tmp_isIsactive = _resultSet.getBoolean_61zpoe$('isIsactive'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stateMasterChangeSeqNum = _resultSet.getLong_61zpoe$('stateMasterChangeSeqNum'); var tmp_stateLocalChangeSeqNum = _resultSet.getLong_61zpoe$('stateLocalChangeSeqNum'); var tmp_stateLastChangedBy = _resultSet.getInt_61zpoe$('stateLastChangedBy'); var tmp_stateLct = _resultSet.getLong_61zpoe$('stateLct'); var _entity = new StateEntity(); _entity.stateUid = tmp_stateUid; _entity.stateId = tmp_stateId; _entity.agentUid = tmp_agentUid; _entity.activityId = tmp_activityId; _entity.registration = tmp_registration; _entity.isIsactive = tmp_isIsactive; _entity.timestamp = tmp_timestamp; _entity.stateMasterChangeSeqNum = tmp_stateMasterChangeSeqNum; _entity.stateLocalChangeSeqNum = tmp_stateLocalChangeSeqNum; _entity.stateLastChangedBy = tmp_stateLastChangedBy; _entity.stateLct = tmp_stateLct; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda(closure$agentUid, closure$activityId, closure$registration, closure$since, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$agentUid); _stmt.setString_vqvrqt$(2, closure$activityId); _stmt.setString_vqvrqt$(3, closure$registration); _stmt.setString_vqvrqt$(4, closure$since); useResults(_stmt.executeQuery(), StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda$lambda(closure$_result)); return Unit; }; } StateDao_JdbcKt.prototype.findStateIdByAgentAndActivity_zeqzmn$ = function (agentUid, activityId, registration, since) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM StateEntity WHERE agentUid = ? AND activityId = ? AND registration = ? AND isIsactive AND timestamp > ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM StateEntity WHERE agentUid = ? AND activityId = ? AND registration = ? AND isIsactive AND timestamp > ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda(agentUid, activityId, registration, since, _result)); return _result.v; }; function StateDao_JdbcKt$updateStateToInActive$lambda(closure$isActive, closure$updateTime, closure$agentUid, closure$activityId, closure$registration) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isActive); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setLong_6svq3l$(3, closure$agentUid); _stmt.setString_vqvrqt$(4, closure$activityId); _stmt.setString_vqvrqt$(5, closure$registration); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } StateDao_JdbcKt.prototype.updateStateToInActive_idwj4n$ = function (agentUid, activityId, registration, isActive, updateTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StateEntity \n | SET isIsactive = ?,\n | stateLct = ?\n | WHERE agentUid = ? AND activityId = ? \n | AND registration = ? AND isIsactive\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE StateEntity \n | SET isIsactive = ?,\n | stateLct = ?\n | WHERE agentUid = ? AND activityId = ? \n | AND registration = ? AND isIsactive\n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, StateDao_JdbcKt$updateStateToInActive$lambda(isActive, updateTime, agentUid, activityId, registration)); }; function StateDao_JdbcKt$setStateInActive$lambda(closure$isActive, closure$updateTime, closure$stateId, closure$agentUid, closure$activityId, closure$registration) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isActive); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setString_vqvrqt$(3, closure$stateId); _stmt.setLong_6svq3l$(4, closure$agentUid); _stmt.setString_vqvrqt$(5, closure$activityId); _stmt.setString_vqvrqt$(6, closure$registration); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } StateDao_JdbcKt.prototype.setStateInActive_njdojp$ = function (stateId, agentUid, activityId, registration, isActive, updateTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StateEntity \n | SET isIsactive = ?, \n | stateLct = ?\n | WHERE stateId = ? AND agentUid = ? \n | AND activityId = ? AND registration = ? \n | AND isIsactive\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE StateEntity \n | SET isIsactive = ?, \n | stateLct = ?\n | WHERE stateId = ? AND agentUid = ? \n | AND activityId = ? AND registration = ? \n | AND isIsactive\n |')); prepareAndUseStatement(this._db, _stmtConfig, StateDao_JdbcKt$setStateInActive$lambda(isActive, updateTime, stateId, agentUid, activityId, registration)); }; StateDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterStateEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_164($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_164.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_164.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_164.prototype.constructor = Coroutine$insertAsync_164; Coroutine$insertAsync_164.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStateEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_164(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterStateEntity_.insertList_4ezy5m$(entityList); }; function StateDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.stateId); _stmt.setLong_6svq3l$(2, _entity.agentUid); _stmt.setString_vqvrqt$(3, _entity.activityId); _stmt.setString_vqvrqt$(4, _entity.registration); _stmt.setBoolean_fzusl$(5, _entity.isIsactive); _stmt.setLong_6svq3l$(6, _entity.timestamp); _stmt.setLong_6svq3l$(7, _entity.stateMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.stateLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.stateLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.stateLct); _stmt.setLong_6svq3l$(11, _entity.stateUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } StateDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE StateEntity SET stateId = ?, agentUid = ?, activityId = ?, registration = ?, isIsactive = ?, timestamp = ?, stateMasterChangeSeqNum = ?, stateLocalChangeSeqNum = ?, stateLastChangedBy = ?, stateLct = ? WHERE stateUid = ?'; prepareAndUseStatement_0(this._db, _sql, StateDao_JdbcKt$updateList$lambda(entityList)); }; function StateDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.stateId); _stmt.setLong_6svq3l$(2, closure$entity.agentUid); _stmt.setString_vqvrqt$(3, closure$entity.activityId); _stmt.setString_vqvrqt$(4, closure$entity.registration); _stmt.setBoolean_fzusl$(5, closure$entity.isIsactive); _stmt.setLong_6svq3l$(6, closure$entity.timestamp); _stmt.setLong_6svq3l$(7, closure$entity.stateMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.stateLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.stateLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.stateLct); _stmt.setLong_6svq3l$(11, closure$entity.stateUid); return _stmt.executeUpdate(); }; } StateDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE StateEntity SET stateId = ?, agentUid = ?, activityId = ?, registration = ?, isIsactive = ?, timestamp = ?, stateMasterChangeSeqNum = ?, stateLocalChangeSeqNum = ?, stateLastChangedBy = ?, stateLct = ? WHERE stateUid = ?'; prepareAndUseStatement_0(this._db, _sql, StateDao_JdbcKt$update$lambda(entity)); }; function StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO StateEntity (stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING stateUid'; } else tmp$ = ''; return "INSERT INTO StateEntity (stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES(COALESCE(?,nextval('StateEntity_stateUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.stateUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.stateUid); } stmt.setString_vqvrqt$(2, entity.stateId); stmt.setLong_6svq3l$(3, entity.agentUid); stmt.setString_vqvrqt$(4, entity.activityId); stmt.setString_vqvrqt$(5, entity.registration); stmt.setBoolean_fzusl$(6, entity.isIsactive); stmt.setLong_6svq3l$(7, entity.timestamp); stmt.setLong_6svq3l$(8, entity.stateMasterChangeSeqNum); stmt.setLong_6svq3l$(9, entity.stateLocalChangeSeqNum); stmt.setInt_vux9f0$(10, entity.stateLastChangedBy); stmt.setLong_6svq3l$(11, entity.stateLct); }; StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; StateDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao_JdbcKt', interfaces: [StateDao]}; function StateDao_ReplicateWrapper(_db, _dao) { StateDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_156($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_156.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_156.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_156.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_156; Coroutine$replicateOnNewNode_s8cxhz$_156.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_156(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_159($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_159.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_159.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_159.prototype.constructor = Coroutine$replicateOnChange_159; Coroutine$replicateOnChange_159.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_159(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_ReplicateWrapper.prototype.findByStateId_r731ya$ = function (id, agentUid, activityId, registration) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.findStateIdByAgentAndActivity_zeqzmn$ = function (agentUid, activityId, registration, since) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.updateStateToInActive_idwj4n$ = function (agentUid, activityId, registration, isActive, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.setStateInActive_njdojp$ = function (stateId, agentUid, activityId, registration, isActive, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_165($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_165.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_165.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_165.prototype.constructor = Coroutine$insertAsync_165; Coroutine$insertAsync_165.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.stateUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(70, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.stateUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.stateLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.stateUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_165(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao_ReplicateWrapper', interfaces: [StateDao]}; function StateDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { StateDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_157($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_157.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_157.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_157.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_157; Coroutine$replicateOnNewNode_s8cxhz$_157.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_157(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_160($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_160.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_160.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_160.prototype.constructor = Coroutine$replicateOnChange_160; Coroutine$replicateOnChange_160.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_160(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_Repo.prototype.findByStateId_r731ya$ = function (id, agentUid, activityId, registration) { var _result = this._dao.findByStateId_r731ya$(id, agentUid, activityId, registration); return _result; }; StateDao_Repo.prototype.findStateIdByAgentAndActivity_zeqzmn$ = function (agentUid, activityId, registration, since) { var _result = this._dao.findStateIdByAgentAndActivity_zeqzmn$(agentUid, activityId, registration, since); return _result; }; StateDao_Repo.prototype.updateStateToInActive_idwj4n$ = function (agentUid, activityId, registration, isActive, updateTime) { this._dao.updateStateToInActive_idwj4n$(agentUid, activityId, registration, isActive, updateTime); }; StateDao_Repo.prototype.setStateInActive_njdojp$ = function (stateId, agentUid, activityId, registration, isActive, updateTime) { this._dao.setStateInActive_njdojp$(stateId, agentUid, activityId, registration, isActive, updateTime); }; StateDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_166($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_166.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_166.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_166.prototype.constructor = Coroutine$insertAsync_166; Coroutine$insertAsync_166.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_166(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; StateDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; StateDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; StateDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao_Repo', interfaces: [StateDao]}; function StatementDao_JdbcKt(_db) { StatementDao.call(this); this._db = _db; this._insertAdapterStatementEntity_ = new StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral(this._db); } function Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_158($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_158.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_158.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_158.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_158; Coroutine$replicateOnNewNode_s8cxhz$_158.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | REPLACE INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS sePk,\n | ? AS seDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | --notpsql\n | strftime('%s', 'now') * 1000\n | --endnotpsql\n | /*psql\n | ROUND(EXTRACT(epoch from NOW())*1000)\n | */\n | - (30 * CAST(86400000 AS BIGINT)))\n | --notpsql\n | AND StatementEntity.statementLct != COALESCE(\n | (SELECT seVersionId\n | FROM StatementEntityReplicate\n | WHERE sePk = StatementEntity.statementUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = (SELECT StatementEntity.statementLct\n | FROM StatementEntity\n | WHERE StatementEntity.statementUid = EXCLUDED.sePk ) \n | != StatementEntityReplicate.seVersionId\n | */ \n | \n "), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS sePk,\n | ? AS seDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | \n | ROUND(EXTRACT(epoch from NOW())*1000)\n | \n | - (30 * CAST(86400000 AS BIGINT)))\n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = (SELECT StatementEntity.statementLct\n | FROM StatementEntity\n | WHERE StatementEntity.statementUid = EXCLUDED.sePk ) \n | != StatementEntityReplicate.seVersionId\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_158(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda; Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_161($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_161.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_161.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_161.prototype.constructor = Coroutine$replicateOnChange_161; Coroutine$replicateOnChange_161.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StatementEntity\n | ON ChangeLog.chTableId = 60\n | AND ChangeLog.chEntityPk = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND StatementEntity.statementLct != COALESCE(\n | (SELECT seVersionId\n | FROM StatementEntityReplicate\n | WHERE sePk = StatementEntity.statementUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StatementEntity\n | ON ChangeLog.chTableId = 60\n | AND ChangeLog.chEntityPk = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND StatementEntity.statementLct != COALESCE(\n | (SELECT seVersionId\n | FROM StatementEntityReplicate\n | WHERE sePk = StatementEntity.statementUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_161(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_17($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_17.prototype.constructor = Coroutine$insertListAsync_17; Coroutine$insertListAsync_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStatementEntity_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_17(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$getOneStatement$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); var tmp_statementId = _resultSet.getString_61zpoe$('statementId'); var tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); var tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); var tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); var tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); var tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); var tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); var tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); var tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); var tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); var tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); var tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stored = _resultSet.getLong_61zpoe$('stored'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); var tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); var tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); var tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); var tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); var tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); var tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); var tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); var _entity = new StatementEntity(); _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getOneStatement$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getOneStatement$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$getOneStatement$lambda(this$StatementDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getOneStatement$lambda; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, StatementEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * From StatementEntity LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * From StatementEntity LIMIT 1\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$getOneStatement$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getOneStatement$lambda(this$StatementDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getOneStatement$lambda(this$StatementDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.getOneStatement = function () { var _result = new DoorLiveDataImpl(this._db, listOf_0('StatementEntity'), StatementDao_JdbcKt$getOneStatement$lambda(this)); return _result; }; function StatementDao_JdbcKt$findByStatementId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); var tmp_statementId = _resultSet.getString_61zpoe$('statementId'); var tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); var tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); var tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); var tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); var tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); var tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); var tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); var tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); var tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); var tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); var tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stored = _resultSet.getLong_61zpoe$('stored'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); var tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); var tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); var tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); var tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); var tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); var tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); var tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); var _entity = new StatementEntity(); _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; closure$_result.v = _entity; }return Unit; }; } function StatementDao_JdbcKt$findByStatementId$lambda(closure$id, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$id); useResults(_stmt.executeQuery(), StatementDao_JdbcKt$findByStatementId$lambda$lambda(closure$_result)); return Unit; }; } StatementDao_JdbcKt.prototype.findByStatementId_61zpoe$ = function (id) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, StatementEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM StatementEntity WHERE statementId = ? LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM StatementEntity WHERE statementId = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, StatementDao_JdbcKt$findByStatementId$lambda(id, _result)); return _result.v; }; function StatementDao_JdbcKt$findByStatementIdList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); var tmp_statementId = _resultSet.getString_61zpoe$('statementId'); var tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); var tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); var tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); var tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); var tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); var tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); var tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); var tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); var tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); var tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); var tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stored = _resultSet.getLong_61zpoe$('stored'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); var tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); var tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); var tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); var tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); var tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); var tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); var tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); var _entity = new StatementEntity(); _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function StatementDao_JdbcKt$findByStatementIdList$lambda(this$StatementDao_JdbcKt, closure$id, closure$_result) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, this$StatementDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'TEXT', copyToArray(closure$id))); useResults(_stmt.executeQuery(), StatementDao_JdbcKt$findByStatementIdList$lambda$lambda(closure$_result)); return Unit; }; } StatementDao_JdbcKt.prototype.findByStatementIdList_mhpeer$ = function (id) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM StatementEntity WHERE statementId IN (?)', true, void 0, void 0, trimMargin('\n |SELECT * FROM StatementEntity WHERE statementId IN (?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, StatementDao_JdbcKt$findByStatementIdList$lambda(this, id, _result)); return _result.v; }; function StatementDao_JdbcKt$getResults$lambda$lambda(closure$_result) { return function (_resultSet) { var tmp$, tmp$_0; var _columnIndexMap = columnIndexMap(_resultSet); while (_resultSet.next()) { var tmp_yAxis; if (_columnIndexMap.containsKey_11rb$('yAxis')) { tmp_yAxis = _resultSet.getFloat_61zpoe$('yAxis'); } else { tmp_yAxis = 0; } var tmp_xAxis; if (_columnIndexMap.containsKey_11rb$('xAxis')) { tmp_xAxis = _resultSet.getString_61zpoe$('xAxis'); } else { tmp_xAxis = (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE(); } var tmp_subgroup; if (_columnIndexMap.containsKey_11rb$('subgroup')) { tmp_subgroup = _resultSet.getString_61zpoe$('subgroup'); } else { tmp_subgroup = (tmp$_0 = null) == null || typeof tmp$_0 === 'string' ? tmp$_0 : throwCCE(); } var _entity = new StatementDao$ReportData(); _entity.yAxis = tmp_yAxis; _entity.xAxis = tmp_xAxis; _entity.subgroup = tmp_subgroup; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$StatementDao_JdbcKt$getResults$lambda(closure$query_0, this$StatementDao_JdbcKt_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$query = closure$query_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getResults$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getResults$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getResults$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getResults$lambda; Coroutine$StatementDao_JdbcKt$getResults$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$closure$query.bindToPreparedStmt_k1n6ap$(this.local$_stmt, this.local$this$StatementDao_JdbcKt._db, this.local$_stmt.getConnection()); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getResults$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getResults$lambda(closure$query_0, this$StatementDao_JdbcKt_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getResults$lambda(closure$query_0, this$StatementDao_JdbcKt_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getResults_j49vja$($this, query_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$query = query_0; } Coroutine$getResults_j49vja$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getResults_j49vja$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getResults_j49vja$.prototype.constructor = Coroutine$getResults_j49vja$; Coroutine$getResults_j49vja$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(this.local$query.getSql(), hasListOrArrayParams(this.local$query)); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$getResults$lambda(this.local$query, this.$this, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.getResults_j49vja$ = function (query_0, continuation_0, suspended) { var instance = new Coroutine$getResults_j49vja$(this, query_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral(closure$query, this$StatementDao_JdbcKt) { this.closure$query = closure$query; this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; DoorDataSourceFactory.call(this); } function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11, tmp$_12, tmp$_13, tmp$_14, tmp$_15, tmp$_16, tmp$_17, tmp$_18; var _columnIndexMap = columnIndexMap(_resultSet); while (_resultSet.next()) { var tmp_statementUid; if (_columnIndexMap.containsKey_11rb$('statementUid')) { tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); } else { tmp_statementUid = L0; } var tmp_statementId; if (_columnIndexMap.containsKey_11rb$('statementId')) { tmp_statementId = _resultSet.getString_61zpoe$('statementId'); } else { tmp_statementId = (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE(); } var tmp_statementPersonUid; if (_columnIndexMap.containsKey_11rb$('statementPersonUid')) { tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); } else { tmp_statementPersonUid = L0; } var tmp_statementVerbUid; if (_columnIndexMap.containsKey_11rb$('statementVerbUid')) { tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); } else { tmp_statementVerbUid = L0; } var tmp_xObjectUid; if (_columnIndexMap.containsKey_11rb$('xObjectUid')) { tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); } else { tmp_xObjectUid = L0; } var tmp_subStatementActorUid; if (_columnIndexMap.containsKey_11rb$('subStatementActorUid')) { tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); } else { tmp_subStatementActorUid = L0; } var tmp_substatementVerbUid; if (_columnIndexMap.containsKey_11rb$('substatementVerbUid')) { tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); } else { tmp_substatementVerbUid = L0; } var tmp_subStatementObjectUid; if (_columnIndexMap.containsKey_11rb$('subStatementObjectUid')) { tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); } else { tmp_subStatementObjectUid = L0; } var tmp_agentUid; if (_columnIndexMap.containsKey_11rb$('agentUid')) { tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); } else { tmp_agentUid = L0; } var tmp_instructorUid; if (_columnIndexMap.containsKey_11rb$('instructorUid')) { tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); } else { tmp_instructorUid = L0; } var tmp_authorityUid; if (_columnIndexMap.containsKey_11rb$('authorityUid')) { tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); } else { tmp_authorityUid = L0; } var tmp_teamUid; if (_columnIndexMap.containsKey_11rb$('teamUid')) { tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); } else { tmp_teamUid = L0; } var tmp_resultCompletion; if (_columnIndexMap.containsKey_11rb$('resultCompletion')) { tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); } else { tmp_resultCompletion = false; } var tmp_resultSuccess; if (_columnIndexMap.containsKey_11rb$('resultSuccess')) { tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); } else { tmp_resultSuccess = toByte(0); } var tmp_resultScoreScaled; if (_columnIndexMap.containsKey_11rb$('resultScoreScaled')) { tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); } else { tmp_resultScoreScaled = 0; } var tmp_resultScoreRaw; if (_columnIndexMap.containsKey_11rb$('resultScoreRaw')) { tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); } else { tmp_resultScoreRaw = L0; } var tmp_resultScoreMin; if (_columnIndexMap.containsKey_11rb$('resultScoreMin')) { tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); } else { tmp_resultScoreMin = L0; } var tmp_resultScoreMax; if (_columnIndexMap.containsKey_11rb$('resultScoreMax')) { tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); } else { tmp_resultScoreMax = L0; } var tmp_resultDuration; if (_columnIndexMap.containsKey_11rb$('resultDuration')) { tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); } else { tmp_resultDuration = L0; } var tmp_resultResponse; if (_columnIndexMap.containsKey_11rb$('resultResponse')) { tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); } else { tmp_resultResponse = (tmp$_0 = null) == null || typeof tmp$_0 === 'string' ? tmp$_0 : throwCCE(); } var tmp_timestamp; if (_columnIndexMap.containsKey_11rb$('timestamp')) { tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); } else { tmp_timestamp = L0; } var tmp_stored; if (_columnIndexMap.containsKey_11rb$('stored')) { tmp_stored = _resultSet.getLong_61zpoe$('stored'); } else { tmp_stored = L0; } var tmp_contextRegistration; if (_columnIndexMap.containsKey_11rb$('contextRegistration')) { tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); } else { tmp_contextRegistration = (tmp$_1 = null) == null || typeof tmp$_1 === 'string' ? tmp$_1 : throwCCE(); } var tmp_contextPlatform; if (_columnIndexMap.containsKey_11rb$('contextPlatform')) { tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); } else { tmp_contextPlatform = (tmp$_2 = null) == null || typeof tmp$_2 === 'string' ? tmp$_2 : throwCCE(); } var tmp_contextStatementId; if (_columnIndexMap.containsKey_11rb$('contextStatementId')) { tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); } else { tmp_contextStatementId = (tmp$_3 = null) == null || typeof tmp$_3 === 'string' ? tmp$_3 : throwCCE(); } var tmp_fullStatement; if (_columnIndexMap.containsKey_11rb$('fullStatement')) { tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); } else { tmp_fullStatement = (tmp$_4 = null) == null || typeof tmp$_4 === 'string' ? tmp$_4 : throwCCE(); } var tmp_statementMasterChangeSeqNum; if (_columnIndexMap.containsKey_11rb$('statementMasterChangeSeqNum')) { tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); } else { tmp_statementMasterChangeSeqNum = L0; } var tmp_statementLocalChangeSeqNum; if (_columnIndexMap.containsKey_11rb$('statementLocalChangeSeqNum')) { tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); } else { tmp_statementLocalChangeSeqNum = L0; } var tmp_statementLastChangedBy; if (_columnIndexMap.containsKey_11rb$('statementLastChangedBy')) { tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); } else { tmp_statementLastChangedBy = 0; } var tmp_statementLct; if (_columnIndexMap.containsKey_11rb$('statementLct')) { tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); } else { tmp_statementLct = L0; } var tmp_extensionProgress; if (_columnIndexMap.containsKey_11rb$('extensionProgress')) { tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); } else { tmp_extensionProgress = 0; } var tmp_contentEntryRoot; if (_columnIndexMap.containsKey_11rb$('contentEntryRoot')) { tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); } else { tmp_contentEntryRoot = false; } var tmp_statementContentEntryUid; if (_columnIndexMap.containsKey_11rb$('statementContentEntryUid')) { tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); } else { tmp_statementContentEntryUid = L0; } var tmp_statementLearnerGroupUid; if (_columnIndexMap.containsKey_11rb$('statementLearnerGroupUid')) { tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); } else { tmp_statementLearnerGroupUid = L0; } var tmp_statementClazzUid; if (_columnIndexMap.containsKey_11rb$('statementClazzUid')) { tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); } else { tmp_statementClazzUid = L0; } var _entity = new StatementEntityWithDisplayDetails(); _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; var _person_nullFieldCount = 0; var tmp_personUid; if (_columnIndexMap.containsKey_11rb$('personUid')) { tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personUid = L0; } var tmp_username; if (_columnIndexMap.containsKey_11rb$('username')) { tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_username = (tmp$_5 = null) == null || typeof tmp$_5 === 'string' ? tmp$_5 : throwCCE(); } var tmp_firstNames; if (_columnIndexMap.containsKey_11rb$('firstNames')) { tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_firstNames = (tmp$_6 = null) == null || typeof tmp$_6 === 'string' ? tmp$_6 : throwCCE(); } var tmp_lastName; if (_columnIndexMap.containsKey_11rb$('lastName')) { tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_lastName = (tmp$_7 = null) == null || typeof tmp$_7 === 'string' ? tmp$_7 : throwCCE(); } var tmp_emailAddr; if (_columnIndexMap.containsKey_11rb$('emailAddr')) { tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_emailAddr = (tmp$_8 = null) == null || typeof tmp$_8 === 'string' ? tmp$_8 : throwCCE(); } var tmp_phoneNum; if (_columnIndexMap.containsKey_11rb$('phoneNum')) { tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_phoneNum = (tmp$_9 = null) == null || typeof tmp$_9 === 'string' ? tmp$_9 : throwCCE(); } var tmp_gender; if (_columnIndexMap.containsKey_11rb$('gender')) { tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_gender = 0; } var tmp_active; if (_columnIndexMap.containsKey_11rb$('active')) { tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_active = false; } var tmp_admin; if (_columnIndexMap.containsKey_11rb$('admin')) { tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_admin = false; } var tmp_personNotes; if (_columnIndexMap.containsKey_11rb$('personNotes')) { tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personNotes = (tmp$_10 = null) == null || typeof tmp$_10 === 'string' ? tmp$_10 : throwCCE(); } var tmp_fatherName; if (_columnIndexMap.containsKey_11rb$('fatherName')) { tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_fatherName = (tmp$_11 = null) == null || typeof tmp$_11 === 'string' ? tmp$_11 : throwCCE(); } var tmp_fatherNumber; if (_columnIndexMap.containsKey_11rb$('fatherNumber')) { tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_fatherNumber = (tmp$_12 = null) == null || typeof tmp$_12 === 'string' ? tmp$_12 : throwCCE(); } var tmp_motherName; if (_columnIndexMap.containsKey_11rb$('motherName')) { tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_motherName = (tmp$_13 = null) == null || typeof tmp$_13 === 'string' ? tmp$_13 : throwCCE(); } var tmp_motherNum; if (_columnIndexMap.containsKey_11rb$('motherNum')) { tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_motherNum = (tmp$_14 = null) == null || typeof tmp$_14 === 'string' ? tmp$_14 : throwCCE(); } var tmp_dateOfBirth; if (_columnIndexMap.containsKey_11rb$('dateOfBirth')) { tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_dateOfBirth = L0; } var tmp_personAddress; if (_columnIndexMap.containsKey_11rb$('personAddress')) { tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personAddress = (tmp$_15 = null) == null || typeof tmp$_15 === 'string' ? tmp$_15 : throwCCE(); } var tmp_personOrgId; if (_columnIndexMap.containsKey_11rb$('personOrgId')) { tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personOrgId = (tmp$_16 = null) == null || typeof tmp$_16 === 'string' ? tmp$_16 : throwCCE(); } var tmp_personGroupUid; if (_columnIndexMap.containsKey_11rb$('personGroupUid')) { tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personGroupUid = L0; } var tmp_personMasterChangeSeqNum; if (_columnIndexMap.containsKey_11rb$('personMasterChangeSeqNum')) { tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personMasterChangeSeqNum = L0; } var tmp_personLocalChangeSeqNum; if (_columnIndexMap.containsKey_11rb$('personLocalChangeSeqNum')) { tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personLocalChangeSeqNum = L0; } var tmp_personLastChangedBy; if (_columnIndexMap.containsKey_11rb$('personLastChangedBy')) { tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personLastChangedBy = 0; } var tmp_personLct; if (_columnIndexMap.containsKey_11rb$('personLct')) { tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personLct = L0; } var tmp_personCountry; if (_columnIndexMap.containsKey_11rb$('personCountry')) { tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personCountry = (tmp$_17 = null) == null || typeof tmp$_17 === 'string' ? tmp$_17 : throwCCE(); } var tmp_personType; if (_columnIndexMap.containsKey_11rb$('personType')) { tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }} else { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; tmp_personType = 0; } if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }var _xlangMapEntry_nullFieldCount = 0; var tmp_verbLangMapUid; if (_columnIndexMap.containsKey_11rb$('verbLangMapUid')) { tmp_verbLangMapUid = _resultSet.getLong_61zpoe$('verbLangMapUid'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_verbLangMapUid = L0; } var tmp_objectLangMapUid; if (_columnIndexMap.containsKey_11rb$('objectLangMapUid')) { tmp_objectLangMapUid = _resultSet.getLong_61zpoe$('objectLangMapUid'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_objectLangMapUid = L0; } var tmp_languageLangMapUid; if (_columnIndexMap.containsKey_11rb$('languageLangMapUid')) { tmp_languageLangMapUid = _resultSet.getLong_61zpoe$('languageLangMapUid'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_languageLangMapUid = L0; } var tmp_languageVariantLangMapUid; if (_columnIndexMap.containsKey_11rb$('languageVariantLangMapUid')) { tmp_languageVariantLangMapUid = _resultSet.getLong_61zpoe$('languageVariantLangMapUid'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_languageVariantLangMapUid = L0; } var tmp_valueLangMap; if (_columnIndexMap.containsKey_11rb$('valueLangMap')) { tmp_valueLangMap = _resultSet.getString_61zpoe$('valueLangMap'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_valueLangMap = (tmp$_18 = null) == null || typeof tmp$_18 === 'string' ? tmp$_18 : throwCCE(); } var tmp_statementLangMapMasterCsn; if (_columnIndexMap.containsKey_11rb$('statementLangMapMasterCsn')) { tmp_statementLangMapMasterCsn = _resultSet.getInt_61zpoe$('statementLangMapMasterCsn'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_statementLangMapMasterCsn = 0; } var tmp_statementLangMapLocalCsn; if (_columnIndexMap.containsKey_11rb$('statementLangMapLocalCsn')) { tmp_statementLangMapLocalCsn = _resultSet.getInt_61zpoe$('statementLangMapLocalCsn'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_statementLangMapLocalCsn = 0; } var tmp_statementLangMapLcb; if (_columnIndexMap.containsKey_11rb$('statementLangMapLcb')) { tmp_statementLangMapLcb = _resultSet.getInt_61zpoe$('statementLangMapLcb'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_statementLangMapLcb = 0; } var tmp_statementLangMapLct; if (_columnIndexMap.containsKey_11rb$('statementLangMapLct')) { tmp_statementLangMapLct = _resultSet.getLong_61zpoe$('statementLangMapLct'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_statementLangMapLct = L0; } var tmp_statementLangMapUid; if (_columnIndexMap.containsKey_11rb$('statementLangMapUid')) { tmp_statementLangMapUid = _resultSet.getLong_61zpoe$('statementLangMapUid'); if (_resultSet.wasNull()) { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; }} else { _xlangMapEntry_nullFieldCount = _xlangMapEntry_nullFieldCount + 1 | 0; tmp_statementLangMapUid = L0; } if (_xlangMapEntry_nullFieldCount < 10) { if (_entity.xlangMapEntry == null) { _entity.xlangMapEntry = new XLangMapEntry(); }ensureNotNull(_entity.xlangMapEntry).verbLangMapUid = tmp_verbLangMapUid; ensureNotNull(_entity.xlangMapEntry).objectLangMapUid = tmp_objectLangMapUid; ensureNotNull(_entity.xlangMapEntry).languageLangMapUid = tmp_languageLangMapUid; ensureNotNull(_entity.xlangMapEntry).languageVariantLangMapUid = tmp_languageVariantLangMapUid; ensureNotNull(_entity.xlangMapEntry).valueLangMap = tmp_valueLangMap; ensureNotNull(_entity.xlangMapEntry).statementLangMapMasterCsn = tmp_statementLangMapMasterCsn; ensureNotNull(_entity.xlangMapEntry).statementLangMapLocalCsn = tmp_statementLangMapLocalCsn; ensureNotNull(_entity.xlangMapEntry).statementLangMapLcb = tmp_statementLangMapLcb; ensureNotNull(_entity.xlangMapEntry).statementLangMapLct = tmp_statementLangMapLct; ensureNotNull(_entity.xlangMapEntry).statementLangMapUid = tmp_statementLangMapUid; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_rawQuery = closure$_rawQuery_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$closure$_rawQuery.bindToPreparedStmt_k1n6ap$(this.local$_stmt, this.local$this$StatementDao_JdbcKt._db, this.local$_stmt.getConnection()); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_rawQuery = closure$_rawQuery_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(this.local$closure$_rawQuery.getSql(), hasListOrArrayParams(this.local$closure$_rawQuery)); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(this.local$closure$_rawQuery, this.local$this$StatementDao_JdbcKt, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { var _rawQuery = copyWithExtraParams(this.closure$query, 'SELECT * FROM (' + this.closure$query.getSql() + ') LIMIT ? OFFSET ?', [_limit, _offset]); return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'Person', 'XLangMapEntry']), StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(_rawQuery, this.this$StatementDao_JdbcKt)); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_rawQuery = closure$_rawQuery_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$closure$_rawQuery.bindToPreparedStmt_k1n6ap$(this.local$_stmt, this.local$this$StatementDao_JdbcKt._db, this.local$_stmt.getConnection()); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_rawQuery = closure$_rawQuery_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(this.local$closure$_rawQuery.getSql(), hasListOrArrayParams(this.local$closure$_rawQuery)); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(this.local$closure$_rawQuery, this.local$this$StatementDao_JdbcKt, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(closure$_rawQuery_0, this$StatementDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype.getLength = function () { var _rawQuery = copy(this.closure$query, 'SELECT COUNT(*) FROM (' + this.closure$query.getSql() + ')'); return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'Person', 'XLangMapEntry']), StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(_rawQuery, this.this$StatementDao_JdbcKt)); }; StatementDao_JdbcKt$getListResults$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; StatementDao_JdbcKt.prototype.getListResults_j49vja$ = function (query) { var _result = new StatementDao_JdbcKt$getListResults$ObjectLiteral(query, this); return _result; }; function StatementDao_JdbcKt$getPerson$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_username = _resultSet.getString_61zpoe$('username'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); var tmp_gender = _resultSet.getInt_61zpoe$('gender'); var tmp_active = _resultSet.getBoolean_61zpoe$('active'); var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); var tmp_personType = _resultSet.getInt_61zpoe$('personType'); var _entity = new Person(); _entity.personUid = tmp_personUid; _entity.username = tmp_username; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.emailAddr = tmp_emailAddr; _entity.phoneNum = tmp_phoneNum; _entity.gender = tmp_gender; _entity.active = tmp_active; _entity.admin = tmp_admin; _entity.personNotes = tmp_personNotes; _entity.fatherName = tmp_fatherName; _entity.fatherNumber = tmp_fatherNumber; _entity.motherName = tmp_motherName; _entity.motherNum = tmp_motherNum; _entity.dateOfBirth = tmp_dateOfBirth; _entity.personAddress = tmp_personAddress; _entity.personOrgId = tmp_personOrgId; _entity.personGroupUid = tmp_personGroupUid; _entity.personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; _entity.personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; _entity.personLastChangedBy = tmp_personLastChangedBy; _entity.personLct = tmp_personLct; _entity.personCountry = tmp_personCountry; _entity.personType = tmp_personType; closure$_result.v = _entity; }return Unit; }; } function StatementDao_JdbcKt$getPerson$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), StatementDao_JdbcKt$getPerson$lambda$lambda(closure$_result)); return Unit; }; } StatementDao_JdbcKt.prototype.getPerson = function () { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, Person) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM PERSON LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM PERSON LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, StatementDao_JdbcKt$getPerson$lambda(_result)); return _result.v; }; function StatementDao_JdbcKt$getXLangMap$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_verbLangMapUid = _resultSet.getLong_61zpoe$('verbLangMapUid'); var tmp_objectLangMapUid = _resultSet.getLong_61zpoe$('objectLangMapUid'); var tmp_languageLangMapUid = _resultSet.getLong_61zpoe$('languageLangMapUid'); var tmp_languageVariantLangMapUid = _resultSet.getLong_61zpoe$('languageVariantLangMapUid'); var tmp_valueLangMap = _resultSet.getString_61zpoe$('valueLangMap'); var tmp_statementLangMapMasterCsn = _resultSet.getInt_61zpoe$('statementLangMapMasterCsn'); var tmp_statementLangMapLocalCsn = _resultSet.getInt_61zpoe$('statementLangMapLocalCsn'); var tmp_statementLangMapLcb = _resultSet.getInt_61zpoe$('statementLangMapLcb'); var tmp_statementLangMapLct = _resultSet.getLong_61zpoe$('statementLangMapLct'); var tmp_statementLangMapUid = _resultSet.getLong_61zpoe$('statementLangMapUid'); var _entity = new XLangMapEntry(); _entity.verbLangMapUid = tmp_verbLangMapUid; _entity.objectLangMapUid = tmp_objectLangMapUid; _entity.languageLangMapUid = tmp_languageLangMapUid; _entity.languageVariantLangMapUid = tmp_languageVariantLangMapUid; _entity.valueLangMap = tmp_valueLangMap; _entity.statementLangMapMasterCsn = tmp_statementLangMapMasterCsn; _entity.statementLangMapLocalCsn = tmp_statementLangMapLocalCsn; _entity.statementLangMapLcb = tmp_statementLangMapLcb; _entity.statementLangMapLct = tmp_statementLangMapLct; _entity.statementLangMapUid = tmp_statementLangMapUid; closure$_result.v = _entity; }return Unit; }; } function StatementDao_JdbcKt$getXLangMap$lambda(closure$_result) { return function (_stmt) { useResults(_stmt.executeQuery(), StatementDao_JdbcKt$getXLangMap$lambda$lambda(closure$_result)); return Unit; }; } StatementDao_JdbcKt.prototype.getXLangMap = function () { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, XLangMapEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM XLangMapEntry LIMIT 1', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM XLangMapEntry LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, StatementDao_JdbcKt$getXLangMap$lambda(_result)); return _result.v; }; function StatementDao_JdbcKt$updateProgress$lambda(closure$progress, closure$updateTime, closure$uid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$progress); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setLong_6svq3l$(3, closure$uid); var _numUpdates = _stmt.executeUpdate(); return Unit; }; } StatementDao_JdbcKt.prototype.updateProgress_ro19vi$ = function (uid, progress, updateTime) { var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StatementEntity \n | SET extensionProgress = ?,\n | statementLct = ? \n | WHERE statementUid = ?\n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE StatementEntity \n | SET extensionProgress = ?,\n | statementLct = ? \n | WHERE statementUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, StatementDao_JdbcKt$updateProgress$lambda(progress, updateTime, uid)); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral(this$StatementDao_JdbcKt, closure$accountPersonUid, closure$contentEntryUid, closure$searchText, closure$sortOrder) { this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$contentEntryUid = closure$contentEntryUid; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DoorDataSourceFactory.call(this); } function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); var tmp_attempts = _resultSet.getInt_61zpoe$('attempts'); var tmp_startDate = _resultSet.getLong_61zpoe$('startDate'); var tmp_endDate = _resultSet.getLong_61zpoe$('endDate'); var tmp_duration = _resultSet.getLong_61zpoe$('duration'); var tmp_latestPrivateComment = _resultSet.getString_61zpoe$('latestPrivateComment'); var tmp_fileSubmissionStatus = _resultSet.getInt_61zpoe$('fileSubmissionStatus'); var _entity = new PersonWithAttemptsSummary(); _entity.personUid = tmp_personUid; _entity.firstNames = tmp_firstNames; _entity.lastName = tmp_lastName; _entity.attempts = tmp_attempts; _entity.startDate = tmp_startDate; _entity.endDate = tmp_endDate; _entity.duration = tmp_duration; _entity.latestPrivateComment = tmp_latestPrivateComment; _entity.fileSubmissionStatus = tmp_fileSubmissionStatus; var _scoreProgress_nullFieldCount = 0; var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_progress = _resultSet.getInt_61zpoe$('progress'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_success = _resultSet.getByte_61zpoe$('success'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); if (_resultSet.wasNull()) { _scoreProgress_nullFieldCount = _scoreProgress_nullFieldCount + 1 | 0; }if (_scoreProgress_nullFieldCount < 10) { if (_entity.scoreProgress == null) { _entity.scoreProgress = new ContentEntryStatementScoreProgress(); }ensureNotNull(_entity.scoreProgress).resultScore = tmp_resultScore; ensureNotNull(_entity.scoreProgress).resultMax = tmp_resultMax; ensureNotNull(_entity.scoreProgress).resultScaled = tmp_resultScaled; ensureNotNull(_entity.scoreProgress).resultWeight = tmp_resultWeight; ensureNotNull(_entity.scoreProgress).contentComplete = tmp_contentComplete; ensureNotNull(_entity.scoreProgress).progress = tmp_progress; ensureNotNull(_entity.scoreProgress).success = tmp_success; ensureNotNull(_entity.scoreProgress).penalty = tmp_penalty; ensureNotNull(_entity.scoreProgress).totalContent = tmp_totalContent; ensureNotNull(_entity.scoreProgress).totalCompletedContent = tmp_totalCompletedContent; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ResultSource.personUid, ResultSource.firstNames, ResultSource.lastName,\n | COUNT(DISTINCT(ResultSource.contextRegistration)) AS attempts, \n | MIN(ResultSource.timestamp) AS startDate, \n | MAX(ResultSource.timestamp) AS endDate, \n | SUM(ResultSource.resultDuration) AS duration, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreRaw\n | ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreMax\n | ELSE 0 END) AS resultMax, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreScaled\n | ELSE 0 END) AS resultScaled, \n | MAX(ResultSource.extensionProgress) AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | 'FALSE' AS contentComplete,\n | 0 AS success,\n | \n | CASE WHEN ResultSource.resultCompletion \n | THEN 1 ELSE 0 END AS totalCompletedContent,\n | \n | 1 as totalContent, \n | \n | 0 as fileSubmissionStatus, \n | \n | '' AS latestPrivateComment\n | \n | FROM (SELECT Person.personUid, Person.firstNames, Person.lastName, \n | StatementEntity.contextRegistration, StatementEntity.timestamp, \n | StatementEntity.resultDuration, StatementEntity.resultScoreRaw, \n | StatementEntity.resultScoreMax, StatementEntity.resultScoreScaled,\n | StatementEntity.contentEntryRoot, StatementEntity.extensionProgress, \n | StatementEntity.resultCompletion\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN StatementEntity \n | ON StatementEntity.statementPersonUid = Person.personUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND statementContentEntryUid = ?\n | AND Person.firstNames || ' ' || Person.lastName LIKE ? \n | GROUP BY StatementEntity.statementUid \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC) AS ResultSource \n | GROUP BY ResultSource.personUid \n | ORDER BY CASE(?) \n | WHEN 1 THEN ResultSource.firstNames\n | WHEN 3 THEN ResultSource.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ResultSource.firstNames\n | WHEN 4 THEN ResultSource.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN endDate \n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 then endDate\n | ELSE 0\n | END DESC\n | ) LIMIT ? OFFSET ? \n "), void 0, void 0, void 0, trimMargin("\n |SELECT * FROM (\n | SELECT ResultSource.personUid, ResultSource.firstNames, ResultSource.lastName,\n | COUNT(DISTINCT(ResultSource.contextRegistration)) AS attempts, \n | MIN(ResultSource.timestamp) AS startDate, \n | MAX(ResultSource.timestamp) AS endDate, \n | SUM(ResultSource.resultDuration) AS duration, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreRaw\n | ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreMax\n | ELSE 0 END) AS resultMax, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreScaled\n | ELSE 0 END) AS resultScaled, \n | MAX(ResultSource.extensionProgress) AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | 'FALSE' AS contentComplete,\n | 0 AS success,\n | \n | CASE WHEN ResultSource.resultCompletion \n | THEN 1 ELSE 0 END AS totalCompletedContent,\n | \n | 1 as totalContent, \n | \n | 0 as fileSubmissionStatus, \n | \n | '' AS latestPrivateComment\n | \n | FROM (SELECT Person.personUid, Person.firstNames, Person.lastName, \n | StatementEntity.contextRegistration, StatementEntity.timestamp, \n | StatementEntity.resultDuration, StatementEntity.resultScoreRaw, \n | StatementEntity.resultScoreMax, StatementEntity.resultScoreScaled,\n | StatementEntity.contentEntryRoot, StatementEntity.extensionProgress, \n | StatementEntity.resultCompletion\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN StatementEntity \n | ON StatementEntity.statementPersonUid = Person.personUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND statementContentEntryUid = ?\n | AND Person.firstNames || ' ' || Person.lastName LIKE ? \n | GROUP BY StatementEntity.statementUid \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC) AS ResultSource \n | GROUP BY ResultSource.personUid \n | ORDER BY CASE(?) \n | WHEN 1 THEN ResultSource.firstNames\n | WHEN 3 THEN ResultSource.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ResultSource.firstNames\n | WHEN 4 THEN ResultSource.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN endDate \n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 then endDate\n | ELSE 0\n | END DESC\n | ) LIMIT ? OFFSET ? \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'StatementEntity']), StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ResultSource.personUid, ResultSource.firstNames, ResultSource.lastName,\n | COUNT(DISTINCT(ResultSource.contextRegistration)) AS attempts, \n | MIN(ResultSource.timestamp) AS startDate, \n | MAX(ResultSource.timestamp) AS endDate, \n | SUM(ResultSource.resultDuration) AS duration, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreRaw\n | ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreMax\n | ELSE 0 END) AS resultMax, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreScaled\n | ELSE 0 END) AS resultScaled, \n | MAX(ResultSource.extensionProgress) AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | 'FALSE' AS contentComplete,\n | 0 AS success,\n | \n | CASE WHEN ResultSource.resultCompletion \n | THEN 1 ELSE 0 END AS totalCompletedContent,\n | \n | 1 as totalContent, \n | \n | 0 as fileSubmissionStatus, \n | \n | '' AS latestPrivateComment\n | \n | FROM (SELECT Person.personUid, Person.firstNames, Person.lastName, \n | StatementEntity.contextRegistration, StatementEntity.timestamp, \n | StatementEntity.resultDuration, StatementEntity.resultScoreRaw, \n | StatementEntity.resultScoreMax, StatementEntity.resultScoreScaled,\n | StatementEntity.contentEntryRoot, StatementEntity.extensionProgress, \n | StatementEntity.resultCompletion\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN StatementEntity \n | ON StatementEntity.statementPersonUid = Person.personUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND statementContentEntryUid = ?\n | AND Person.firstNames || ' ' || Person.lastName LIKE ? \n | GROUP BY StatementEntity.statementUid \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC) AS ResultSource \n | GROUP BY ResultSource.personUid \n | ORDER BY CASE(?) \n | WHEN 1 THEN ResultSource.firstNames\n | WHEN 3 THEN ResultSource.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ResultSource.firstNames\n | WHEN 4 THEN ResultSource.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN endDate \n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 then endDate\n | ELSE 0\n | END DESC\n | ) \n "), void 0, void 0, void 0, trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ResultSource.personUid, ResultSource.firstNames, ResultSource.lastName,\n | COUNT(DISTINCT(ResultSource.contextRegistration)) AS attempts, \n | MIN(ResultSource.timestamp) AS startDate, \n | MAX(ResultSource.timestamp) AS endDate, \n | SUM(ResultSource.resultDuration) AS duration, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreRaw\n | ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreMax\n | ELSE 0 END) AS resultMax, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreScaled\n | ELSE 0 END) AS resultScaled, \n | MAX(ResultSource.extensionProgress) AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | 'FALSE' AS contentComplete,\n | 0 AS success,\n | \n | CASE WHEN ResultSource.resultCompletion \n | THEN 1 ELSE 0 END AS totalCompletedContent,\n | \n | 1 as totalContent, \n | \n | 0 as fileSubmissionStatus, \n | \n | '' AS latestPrivateComment\n | \n | FROM (SELECT Person.personUid, Person.firstNames, Person.lastName, \n | StatementEntity.contextRegistration, StatementEntity.timestamp, \n | StatementEntity.resultDuration, StatementEntity.resultScoreRaw, \n | StatementEntity.resultScoreMax, StatementEntity.resultScoreScaled,\n | StatementEntity.contentEntryRoot, StatementEntity.extensionProgress, \n | StatementEntity.resultCompletion\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN StatementEntity \n | ON StatementEntity.statementPersonUid = Person.personUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND statementContentEntryUid = ?\n | AND Person.firstNames || ' ' || Person.lastName LIKE ? \n | GROUP BY StatementEntity.statementUid \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC) AS ResultSource \n | GROUP BY ResultSource.personUid \n | ORDER BY CASE(?) \n | WHEN 1 THEN ResultSource.firstNames\n | WHEN 3 THEN ResultSource.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ResultSource.firstNames\n | WHEN 4 THEN ResultSource.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN endDate \n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 then endDate\n | ELSE 0\n | END DESC\n | ) \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$searchText, this.local$closure$sortOrder, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'StatementEntity']), StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$searchText, this.closure$sortOrder)); }; StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; StatementDao_JdbcKt.prototype.findPersonsWithContentEntryAttempts_vqkbx2$ = function (contentEntryUid, accountPersonUid, searchText, sortOrder) { var _result = new StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral(this, accountPersonUid, contentEntryUid, searchText, sortOrder); return _result; }; function StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); var tmp_progress = _resultSet.getInt_61zpoe$('progress'); var tmp_success = _resultSet.getByte_61zpoe$('success'); var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); var _entity = new ContentEntryStatementScoreProgress(); _entity.resultScore = tmp_resultScore; _entity.resultMax = tmp_resultMax; _entity.resultScaled = tmp_resultScaled; _entity.resultWeight = tmp_resultWeight; _entity.contentComplete = tmp_contentComplete; _entity.progress = tmp_progress; _entity.success = tmp_success; _entity.penalty = tmp_penalty; _entity.totalContent = tmp_totalContent; _entity.totalCompletedContent = tmp_totalCompletedContent; closure$_result.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda; Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getBestScoreForContentForPerson_3pjtqy$($this, contentEntryUid_0, accountPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contentEntryUid = contentEntryUid_0; this.local$accountPersonUid = accountPersonUid_0; } Coroutine$getBestScoreForContentForPerson_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getBestScoreForContentForPerson_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getBestScoreForContentForPerson_3pjtqy$.prototype.constructor = Coroutine$getBestScoreForContentForPerson_3pjtqy$; Coroutine$getBestScoreForContentForPerson_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryStatementScoreProgress) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | 0 as resultWeight,\n | \n | COALESCE((CASE WHEN resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 1 as totalContent, \n | 0 as penalty\n | \n | FROM ContentEntry\n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | WHERE contentEntryUid = ?\n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | 0 as resultWeight,\n | \n | COALESCE((CASE WHEN resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 1 as totalContent, \n | 0 as penalty\n | \n | FROM ContentEntry\n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | WHERE contentEntryUid = ?\n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(this.local$accountPersonUid, this.local$contentEntryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.getBestScoreForContentForPerson_3pjtqy$ = function (contentEntryUid_0, accountPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$getBestScoreForContentForPerson_3pjtqy$(this, contentEntryUid_0, accountPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(closure$assignmentUid_0, closure$currentStudentUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$currentStudentUid = closure$currentStudentUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda; Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentStudentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(closure$assignmentUid_0, closure$currentStudentUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(closure$assignmentUid_0, closure$currentStudentUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$($this, assignmentUid_0, currentStudentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$assignmentUid = assignmentUid_0; this.local$currentStudentUid = currentStudentUid_0; } Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.prototype.constructor = Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$; Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT DISTINCT(statementpersonUid)\n | FROM ClazzAssignment \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | \t JOIN StatementEntity AS SubmissionStatement\n | \t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1)\n | \n | \t LEFT JOIN XObjectEntity\n | ON XObjectEntity.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | WHERE ClazzAssignment.caUid = ?\n | AND XObjectEntity.xobjectUid IS NULL\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentPersonUid != ?\n | LIMIT 1),0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT DISTINCT(statementpersonUid)\n | FROM ClazzAssignment \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | \t JOIN StatementEntity AS SubmissionStatement\n | \t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1)\n | \n | \t LEFT JOIN XObjectEntity\n | ON XObjectEntity.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | WHERE ClazzAssignment.caUid = ?\n | AND XObjectEntity.xobjectUid IS NULL\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentPersonUid != ?\n | LIMIT 1),0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(this.local$assignmentUid, this.local$currentStudentUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.findNextStudentNotMarkedForAssignment_3pjtqy$ = function (assignmentUid_0, currentStudentUid_0, continuation_0, suspended) { var instance = new Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$(this, assignmentUid_0, currentStudentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); var tmp_statementId = _resultSet.getString_61zpoe$('statementId'); var tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); var tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); var tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); var tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); var tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); var tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); var tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); var tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); var tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); var tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); var tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stored = _resultSet.getLong_61zpoe$('stored'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); var tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); var tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); var tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); var tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); var tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); var tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); var tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); var _entity = new StatementEntity(); _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; closure$_result.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(closure$studentUid_0, closure$assignmentObjectUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$studentUid = closure$studentUid_0; this.local$closure$assignmentObjectUid = closure$assignmentObjectUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda; Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$studentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$assignmentObjectUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(closure$studentUid_0, closure$assignmentObjectUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(closure$studentUid_0, closure$assignmentObjectUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findSubmittedStatementFromStudent_3pjtqy$($this, studentUid_0, assignmentObjectUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$studentUid = studentUid_0; this.local$assignmentObjectUid = assignmentObjectUid_0; } Coroutine$findSubmittedStatementFromStudent_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSubmittedStatementFromStudent_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSubmittedStatementFromStudent_3pjtqy$.prototype.constructor = Coroutine$findSubmittedStatementFromStudent_3pjtqy$; Coroutine$findSubmittedStatementFromStudent_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, StatementEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementVerbUid = 10008\n | AND xObjectUid = ? \n | ORDER BY timestamp \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementVerbUid = 10008\n | AND xObjectUid = ? \n | ORDER BY timestamp \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(this.local$studentUid, this.local$assignmentObjectUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.findSubmittedStatementFromStudent_3pjtqy$ = function (studentUid_0, assignmentObjectUid_0, continuation_0, suspended) { var instance = new Coroutine$findSubmittedStatementFromStudent_3pjtqy$(this, studentUid_0, assignmentObjectUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$findScoreStatementForStudent$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); var tmp_statementId = _resultSet.getString_61zpoe$('statementId'); var tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); var tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); var tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); var tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); var tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); var tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); var tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); var tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); var tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); var tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); var tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stored = _resultSet.getLong_61zpoe$('stored'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); var tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); var tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); var tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); var tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); var tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); var tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); var tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); var _entity = new StatementEntity(); _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; closure$_result.v = _entity; }return Unit; }; } function StatementDao_JdbcKt$findScoreStatementForStudent$lambda(closure$studentUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$studentUid); useResults(_stmt.executeQuery(), StatementDao_JdbcKt$findScoreStatementForStudent$lambda$lambda(closure$_result)); return Unit; }; } StatementDao_JdbcKt.prototype.findScoreStatementForStudent_s8cxhz$ = function (studentUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, StatementEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementVerbUid = 10009\n | ORDER BY timestamp \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT * \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementVerbUid = 10009\n | ORDER BY timestamp \n | \n |')); prepareAndUseStatement(this._db, _stmtConfig, StatementDao_JdbcKt$findScoreStatementForStudent$lambda(studentUid, _result)); return _result.v; }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral(this$StatementDao_JdbcKt, closure$accountPersonUid, closure$contentEntryUid, closure$personUid) { this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$contentEntryUid = closure$contentEntryUid; this.closure$personUid = closure$personUid; DoorDataSourceFactory.call(this); } function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_startDate = _resultSet.getLong_61zpoe$('startDate'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_duration = _resultSet.getLong_61zpoe$('duration'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultComplete = _resultSet.getBoolean_61zpoe$('resultComplete'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); var _entity = new PersonWithSessionsDisplay(); _entity.startDate = tmp_startDate; _entity.contextRegistration = tmp_contextRegistration; _entity.duration = tmp_duration; _entity.resultSuccess = tmp_resultSuccess; _entity.resultComplete = tmp_resultComplete; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultMax = tmp_resultMax; _entity.resultScore = tmp_resultScore; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT MIN(timestamp) AS startDate, \n | MAX(CASE \n | WHEN StatementEntity.resultSuccess > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN StatementEntity.resultSuccess \n | ELSE 0 END) AS resultSuccess, \n | SUM(CASE \n | WHEN CAST(resultCompletion AS INTEGER) > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN 1 \n | ELSE 0 END) AS resultComplete, \n | SUM(resultDuration) AS duration, contextRegistration, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreRaw ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreMax ELSE 0 END) AS resultMax,\n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreScaled ELSE 0 END) AS resultScoreScaled,\n | \n | SUM(CASE WHEN resultCompletion AND StatementEntity.contentEntryRoot \n | THEN 1 ELSE 0 END) AS totalCompletedContent,\n | \n | 1 as totalContent \n | \n | FROM StatementEntity \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | GROUP BY StatementEntity.contextRegistration \n | ORDER BY startDate DESC, resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT MIN(timestamp) AS startDate, \n | MAX(CASE \n | WHEN StatementEntity.resultSuccess > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN StatementEntity.resultSuccess \n | ELSE 0 END) AS resultSuccess, \n | SUM(CASE \n | WHEN CAST(resultCompletion AS INTEGER) > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN 1 \n | ELSE 0 END) AS resultComplete, \n | SUM(resultDuration) AS duration, contextRegistration, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreRaw ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreMax ELSE 0 END) AS resultMax,\n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreScaled ELSE 0 END) AS resultScoreScaled,\n | \n | SUM(CASE WHEN resultCompletion AND StatementEntity.contentEntryRoot \n | THEN 1 ELSE 0 END) AS totalCompletedContent,\n | \n | 1 as totalContent \n | \n | FROM StatementEntity \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | GROUP BY StatementEntity.contextRegistration \n | ORDER BY startDate DESC, resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember']), StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid, _limit, _offset)); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT MIN(timestamp) AS startDate, \n | MAX(CASE \n | WHEN StatementEntity.resultSuccess > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN StatementEntity.resultSuccess \n | ELSE 0 END) AS resultSuccess, \n | SUM(CASE \n | WHEN CAST(resultCompletion AS INTEGER) > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN 1 \n | ELSE 0 END) AS resultComplete, \n | SUM(resultDuration) AS duration, contextRegistration, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreRaw ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreMax ELSE 0 END) AS resultMax,\n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreScaled ELSE 0 END) AS resultScoreScaled,\n | \n | SUM(CASE WHEN resultCompletion AND StatementEntity.contentEntryRoot \n | THEN 1 ELSE 0 END) AS totalCompletedContent,\n | \n | 1 as totalContent \n | \n | FROM StatementEntity \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | GROUP BY StatementEntity.contextRegistration \n | ORDER BY startDate DESC, resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT MIN(timestamp) AS startDate, \n | MAX(CASE \n | WHEN StatementEntity.resultSuccess > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN StatementEntity.resultSuccess \n | ELSE 0 END) AS resultSuccess, \n | SUM(CASE \n | WHEN CAST(resultCompletion AS INTEGER) > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN 1 \n | ELSE 0 END) AS resultComplete, \n | SUM(resultDuration) AS duration, contextRegistration, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreRaw ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreMax ELSE 0 END) AS resultMax,\n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreScaled ELSE 0 END) AS resultScoreScaled,\n | \n | SUM(CASE WHEN resultCompletion AND StatementEntity.contentEntryRoot \n | THEN 1 ELSE 0 END) AS totalCompletedContent,\n | \n | 1 as totalContent \n | \n | FROM StatementEntity \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | GROUP BY StatementEntity.contextRegistration \n | ORDER BY startDate DESC, resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember']), StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid)); }; StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; StatementDao_JdbcKt.prototype.findSessionsForPerson_b9bd0d$ = function (contentEntryUid, accountPersonUid, personUid) { var _result = new StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral(this, accountPersonUid, contentEntryUid, personUid); return _result; }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral(this$StatementDao_JdbcKt, closure$accountPersonUid, closure$contentEntryUid, closure$personUid, closure$contextRegistration) { this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$contentEntryUid = closure$contentEntryUid; this.closure$personUid = closure$personUid; this.closure$contextRegistration = closure$contextRegistration; DoorDataSourceFactory.call(this); } function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_verbDisplay = _resultSet.getString_61zpoe$('verbDisplay'); var tmp_objectDisplay = _resultSet.getString_61zpoe$('objectDisplay'); var tmp_statementUid = _resultSet.getLong_61zpoe$('statementUid'); var tmp_statementId = _resultSet.getString_61zpoe$('statementId'); var tmp_statementPersonUid = _resultSet.getLong_61zpoe$('statementPersonUid'); var tmp_statementVerbUid = _resultSet.getLong_61zpoe$('statementVerbUid'); var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_subStatementActorUid = _resultSet.getLong_61zpoe$('subStatementActorUid'); var tmp_substatementVerbUid = _resultSet.getLong_61zpoe$('substatementVerbUid'); var tmp_subStatementObjectUid = _resultSet.getLong_61zpoe$('subStatementObjectUid'); var tmp_agentUid = _resultSet.getLong_61zpoe$('agentUid'); var tmp_instructorUid = _resultSet.getLong_61zpoe$('instructorUid'); var tmp_authorityUid = _resultSet.getLong_61zpoe$('authorityUid'); var tmp_teamUid = _resultSet.getLong_61zpoe$('teamUid'); var tmp_resultCompletion = _resultSet.getBoolean_61zpoe$('resultCompletion'); var tmp_resultSuccess = _resultSet.getByte_61zpoe$('resultSuccess'); var tmp_resultScoreScaled = _resultSet.getFloat_61zpoe$('resultScoreScaled'); var tmp_resultScoreRaw = _resultSet.getLong_61zpoe$('resultScoreRaw'); var tmp_resultScoreMin = _resultSet.getLong_61zpoe$('resultScoreMin'); var tmp_resultScoreMax = _resultSet.getLong_61zpoe$('resultScoreMax'); var tmp_resultDuration = _resultSet.getLong_61zpoe$('resultDuration'); var tmp_resultResponse = _resultSet.getString_61zpoe$('resultResponse'); var tmp_timestamp = _resultSet.getLong_61zpoe$('timestamp'); var tmp_stored = _resultSet.getLong_61zpoe$('stored'); var tmp_contextRegistration = _resultSet.getString_61zpoe$('contextRegistration'); var tmp_contextPlatform = _resultSet.getString_61zpoe$('contextPlatform'); var tmp_contextStatementId = _resultSet.getString_61zpoe$('contextStatementId'); var tmp_fullStatement = _resultSet.getString_61zpoe$('fullStatement'); var tmp_statementMasterChangeSeqNum = _resultSet.getLong_61zpoe$('statementMasterChangeSeqNum'); var tmp_statementLocalChangeSeqNum = _resultSet.getLong_61zpoe$('statementLocalChangeSeqNum'); var tmp_statementLastChangedBy = _resultSet.getInt_61zpoe$('statementLastChangedBy'); var tmp_statementLct = _resultSet.getLong_61zpoe$('statementLct'); var tmp_extensionProgress = _resultSet.getInt_61zpoe$('extensionProgress'); var tmp_contentEntryRoot = _resultSet.getBoolean_61zpoe$('contentEntryRoot'); var tmp_statementContentEntryUid = _resultSet.getLong_61zpoe$('statementContentEntryUid'); var tmp_statementLearnerGroupUid = _resultSet.getLong_61zpoe$('statementLearnerGroupUid'); var tmp_statementClazzUid = _resultSet.getLong_61zpoe$('statementClazzUid'); var _entity = new StatementWithSessionDetailDisplay(); _entity.verbDisplay = tmp_verbDisplay; _entity.objectDisplay = tmp_objectDisplay; _entity.statementUid = tmp_statementUid; _entity.statementId = tmp_statementId; _entity.statementPersonUid = tmp_statementPersonUid; _entity.statementVerbUid = tmp_statementVerbUid; _entity.xObjectUid = tmp_xObjectUid; _entity.subStatementActorUid = tmp_subStatementActorUid; _entity.substatementVerbUid = tmp_substatementVerbUid; _entity.subStatementObjectUid = tmp_subStatementObjectUid; _entity.agentUid = tmp_agentUid; _entity.instructorUid = tmp_instructorUid; _entity.authorityUid = tmp_authorityUid; _entity.teamUid = tmp_teamUid; _entity.resultCompletion = tmp_resultCompletion; _entity.resultSuccess = tmp_resultSuccess; _entity.resultScoreScaled = tmp_resultScoreScaled; _entity.resultScoreRaw = tmp_resultScoreRaw; _entity.resultScoreMin = tmp_resultScoreMin; _entity.resultScoreMax = tmp_resultScoreMax; _entity.resultDuration = tmp_resultDuration; _entity.resultResponse = tmp_resultResponse; _entity.timestamp = tmp_timestamp; _entity.stored = tmp_stored; _entity.contextRegistration = tmp_contextRegistration; _entity.contextPlatform = tmp_contextPlatform; _entity.contextStatementId = tmp_contextStatementId; _entity.fullStatement = tmp_fullStatement; _entity.statementMasterChangeSeqNum = tmp_statementMasterChangeSeqNum; _entity.statementLocalChangeSeqNum = tmp_statementLocalChangeSeqNum; _entity.statementLastChangedBy = tmp_statementLastChangedBy; _entity.statementLct = tmp_statementLct; _entity.extensionProgress = tmp_extensionProgress; _entity.contentEntryRoot = tmp_contentEntryRoot; _entity.statementContentEntryUid = tmp_statementContentEntryUid; _entity.statementLearnerGroupUid = tmp_statementLearnerGroupUid; _entity.statementClazzUid = tmp_statementClazzUid; var _verb_nullFieldCount = 0; var tmp_verbUid = _resultSet.getLong_61zpoe$('verbUid'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }var tmp_urlId = _resultSet.getString_61zpoe$('urlId'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }var tmp_verbInActive = _resultSet.getBoolean_61zpoe$('verbInActive'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }var tmp_verbMasterChangeSeqNum = _resultSet.getLong_61zpoe$('verbMasterChangeSeqNum'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }var tmp_verbLocalChangeSeqNum = _resultSet.getLong_61zpoe$('verbLocalChangeSeqNum'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }var tmp_verbLastChangedBy = _resultSet.getInt_61zpoe$('verbLastChangedBy'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }var tmp_verbLct = _resultSet.getLong_61zpoe$('verbLct'); if (_resultSet.wasNull()) { _verb_nullFieldCount = _verb_nullFieldCount + 1 | 0; }if (_verb_nullFieldCount < 7) { if (_entity.verb == null) { _entity.verb = new VerbEntity(); }ensureNotNull(_entity.verb).verbUid = tmp_verbUid; ensureNotNull(_entity.verb).urlId = tmp_urlId; ensureNotNull(_entity.verb).verbInActive = tmp_verbInActive; ensureNotNull(_entity.verb).verbMasterChangeSeqNum = tmp_verbMasterChangeSeqNum; ensureNotNull(_entity.verb).verbLocalChangeSeqNum = tmp_verbLocalChangeSeqNum; ensureNotNull(_entity.verb).verbLastChangedBy = tmp_verbLastChangedBy; ensureNotNull(_entity.verb).verbLct = tmp_verbLct; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$contextRegistration); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT StatementEntity.*, VerbEntity.*, \n | verbLangMap.valueLangMap AS verbDisplay, \n | xobjectMap.valueLangMap AS objectDisplay \n | FROM StatementEntity\n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LEFT JOIN VerbEntity \n | ON VerbEntity.verbUid = StatementEntity.statementVerbUid \n | LEFT JOIN XLangMapEntry verbLangMap \n | ON verbLangMap.verbLangMapUid = VerbEntity.verbUid\n | LEFT JOIN XLangMapEntry xobjectMap \n | ON xobjectMap.objectLangMapUid = StatementEntity.xObjectUid\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | AND contextRegistration = ? \n | ORDER BY StatementEntity.timestamp DESC\n | ) LIMIT ? OFFSET ? \n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM (\n | SELECT StatementEntity.*, VerbEntity.*, \n | verbLangMap.valueLangMap AS verbDisplay, \n | xobjectMap.valueLangMap AS objectDisplay \n | FROM StatementEntity\n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LEFT JOIN VerbEntity \n | ON VerbEntity.verbUid = StatementEntity.statementVerbUid \n | LEFT JOIN XLangMapEntry verbLangMap \n | ON verbLangMap.verbLangMapUid = VerbEntity.verbUid\n | LEFT JOIN XLangMapEntry xobjectMap \n | ON xobjectMap.objectLangMapUid = StatementEntity.xObjectUid\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | AND contextRegistration = ? \n | ORDER BY StatementEntity.timestamp DESC\n | ) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$closure$contextRegistration, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember', 'VerbEntity', 'XLangMapEntry']), StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid, this.closure$contextRegistration, _limit, _offset)); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$contextRegistration); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$_liveResult = void 0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT StatementEntity.*, VerbEntity.*, \n | verbLangMap.valueLangMap AS verbDisplay, \n | xobjectMap.valueLangMap AS objectDisplay \n | FROM StatementEntity\n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LEFT JOIN VerbEntity \n | ON VerbEntity.verbUid = StatementEntity.statementVerbUid \n | LEFT JOIN XLangMapEntry verbLangMap \n | ON verbLangMap.verbLangMapUid = VerbEntity.verbUid\n | LEFT JOIN XLangMapEntry xobjectMap \n | ON xobjectMap.objectLangMapUid = StatementEntity.xObjectUid\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | AND contextRegistration = ? \n | ORDER BY StatementEntity.timestamp DESC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT StatementEntity.*, VerbEntity.*, \n | verbLangMap.valueLangMap AS verbDisplay, \n | xobjectMap.valueLangMap AS objectDisplay \n | FROM StatementEntity\n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LEFT JOIN VerbEntity \n | ON VerbEntity.verbUid = StatementEntity.statementVerbUid \n | LEFT JOIN XLangMapEntry verbLangMap \n | ON verbLangMap.verbLangMapUid = VerbEntity.verbUid\n | LEFT JOIN XLangMapEntry xobjectMap \n | ON xobjectMap.objectLangMapUid = StatementEntity.xObjectUid\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | AND contextRegistration = ? \n | ORDER BY StatementEntity.timestamp DESC\n | ) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, _stmtConfig, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$closure$contextRegistration, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember', 'VerbEntity', 'XLangMapEntry']), StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid, this.closure$contextRegistration)); }; StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; StatementDao_JdbcKt.prototype.findSessionDetailForPerson_pkyi17$ = function (contentEntryUid, accountPersonUid, personUid, contextRegistration) { var _result = new StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral(this, accountPersonUid, contentEntryUid, personUid, contextRegistration); return _result; }; function StatementDao_JdbcKt$calculateScoreForSession$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); var tmp_progress = _resultSet.getInt_61zpoe$('progress'); var tmp_success = _resultSet.getByte_61zpoe$('success'); var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); var _entity = new ContentEntryStatementScoreProgress(); _entity.resultScore = tmp_resultScore; _entity.resultMax = tmp_resultMax; _entity.resultScaled = tmp_resultScaled; _entity.resultWeight = tmp_resultWeight; _entity.contentComplete = tmp_contentComplete; _entity.progress = tmp_progress; _entity.success = tmp_success; _entity.penalty = tmp_penalty; _entity.totalContent = tmp_totalContent; _entity.totalCompletedContent = tmp_totalCompletedContent; closure$_result.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda(closure$contextRegistration_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda; Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$contextRegistration); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$calculateScoreForSession$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$calculateScoreForSession$lambda(closure$contextRegistration_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda(closure$contextRegistration_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$calculateScoreForSession_61zpoe$($this, contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contextRegistration = contextRegistration_0; } Coroutine$calculateScoreForSession_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$calculateScoreForSession_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$calculateScoreForSession_61zpoe$.prototype.constructor = Coroutine$calculateScoreForSession_61zpoe$; Coroutine$calculateScoreForSession_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryStatementScoreProgress) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin("\n |\n | SELECT SUM(resultScoreRaw) AS resultScore, \n | SUM(resultScoreMax) AS resultMax,\n | MAX(extensionProgress) AS progress,\n | 0 as resultWeight,\n | 0 as penalty,\n | 0 as success,\n | 'FALSE' as contentComplete,\n | 0 AS resultScaled, \n | COALESCE((CASE WHEN resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 1 as totalContent\n | \n | FROM (SELECT * \n | FROM StatementEntity \n | WHERE contextRegistration = ?\n | AND NOT contentEntryRoot\n | AND statementVerbUid = 10007 \n | GROUP BY xObjectUid) AS SessionStatements\n | \n "), void 0, void 0, void 0, trimMargin("\n |\n | SELECT SUM(resultScoreRaw) AS resultScore, \n | SUM(resultScoreMax) AS resultMax,\n | MAX(extensionProgress) AS progress,\n | 0 as resultWeight,\n | 0 as penalty,\n | 0 as success,\n | 'FALSE' as contentComplete,\n | 0 AS resultScaled, \n | COALESCE((CASE WHEN resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 1 as totalContent\n | \n | FROM (SELECT * \n | FROM StatementEntity \n | WHERE contextRegistration = ?\n | AND NOT contentEntryRoot\n | AND statementVerbUid = 10007 \n | GROUP BY xObjectUid) AS SessionStatements\n | \n |")); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$calculateScoreForSession$lambda(this.local$contextRegistration, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.calculateScoreForSession_61zpoe$ = function (contextRegistration_0, continuation_0, suspended) { var instance = new Coroutine$calculateScoreForSession_61zpoe$(this, contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$findCompletedScoreForSession$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_resultScore = _resultSet.getInt_61zpoe$('resultScore'); var tmp_resultMax = _resultSet.getInt_61zpoe$('resultMax'); var tmp_resultScaled = _resultSet.getFloat_61zpoe$('resultScaled'); var tmp_resultWeight = _resultSet.getInt_61zpoe$('resultWeight'); var tmp_contentComplete = _resultSet.getBoolean_61zpoe$('contentComplete'); var tmp_progress = _resultSet.getInt_61zpoe$('progress'); var tmp_success = _resultSet.getByte_61zpoe$('success'); var tmp_penalty = _resultSet.getInt_61zpoe$('penalty'); var tmp_totalContent = _resultSet.getInt_61zpoe$('totalContent'); var tmp_totalCompletedContent = _resultSet.getInt_61zpoe$('totalCompletedContent'); var _entity = new ContentEntryStatementScoreProgress(); _entity.resultScore = tmp_resultScore; _entity.resultMax = tmp_resultMax; _entity.resultScaled = tmp_resultScaled; _entity.resultWeight = tmp_resultWeight; _entity.contentComplete = tmp_contentComplete; _entity.progress = tmp_progress; _entity.success = tmp_success; _entity.penalty = tmp_penalty; _entity.totalContent = tmp_totalContent; _entity.totalCompletedContent = tmp_totalCompletedContent; closure$_result.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda(closure$contextRegistration_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda; Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$contextRegistration); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findCompletedScoreForSession$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findCompletedScoreForSession$lambda(closure$contextRegistration_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda(closure$contextRegistration_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findCompletedScoreForSession_61zpoe$($this, contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$contextRegistration = contextRegistration_0; } Coroutine$findCompletedScoreForSession_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findCompletedScoreForSession_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findCompletedScoreForSession_61zpoe$.prototype.constructor = Coroutine$findCompletedScoreForSession_61zpoe$; Coroutine$findCompletedScoreForSession_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, ContentEntryStatementScoreProgress) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT resultScoreRaw AS resultScore, \n | resultScoreMax AS resultMax,\n | extensionProgress AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | resultSuccess AS success,\n | resultCompletion AS contentComplete, \n | resultScoreScaled AS resultScaled,\n | 1 AS totalCompletedContent,\n | 1 as totalContent\n | \n | FROM StatementEntity\n | WHERE resultCompletion\n | AND contextRegistration = ?\n | AND contentEntryRoot\n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT resultScoreRaw AS resultScore, \n | resultScoreMax AS resultMax,\n | extensionProgress AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | resultSuccess AS success,\n | resultCompletion AS contentComplete, \n | resultScoreScaled AS resultScaled,\n | 1 AS totalCompletedContent,\n | 1 as totalContent\n | \n | FROM StatementEntity\n | WHERE resultCompletion\n | AND contextRegistration = ?\n | AND contentEntryRoot\n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$findCompletedScoreForSession$lambda(this.local$contextRegistration, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.findCompletedScoreForSession_61zpoe$ = function (contextRegistration_0, continuation_0, suspended) { var instance = new Coroutine$findCompletedScoreForSession_61zpoe$(this, contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$findLatestRegistrationStatement$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getString_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(closure$accountPersonUid_0, closure$entryUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$entryUid = closure$entryUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda; Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findLatestRegistrationStatement$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(closure$accountPersonUid_0, closure$entryUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(closure$accountPersonUid_0, closure$entryUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findLatestRegistrationStatement_3pjtqy$($this, accountPersonUid_0, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$accountPersonUid = accountPersonUid_0; this.local$entryUid = entryUid_0; } Coroutine$findLatestRegistrationStatement_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLatestRegistrationStatement_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLatestRegistrationStatement_3pjtqy$.prototype.constructor = Coroutine$findLatestRegistrationStatement_3pjtqy$; Coroutine$findLatestRegistrationStatement_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_result = {v: (tmp$ = null) == null || typeof tmp$ === 'string' ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT contextRegistration \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementContentEntryUid = ?\n | AND NOT EXISTS (SELECT statementUid FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementContentEntryUid = ?\n | AND (statementVerbUid = 10001 \n | OR statementVerbUid = 10004))\n | ORDER BY timestamp DESC \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT contextRegistration \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementContentEntryUid = ?\n | AND NOT EXISTS (SELECT statementUid FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementContentEntryUid = ?\n | AND (statementVerbUid = 10001 \n | OR statementVerbUid = 10004))\n | ORDER BY timestamp DESC \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(this.local$accountPersonUid, this.local$entryUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.findLatestRegistrationStatement_3pjtqy$ = function (accountPersonUid_0, entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findLatestRegistrationStatement_3pjtqy$(this, accountPersonUid_0, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterStatementEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_167($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_167.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_167.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_167.prototype.constructor = Coroutine$insertAsync_167; Coroutine$insertAsync_167.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStatementEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_167(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterStatementEntity_.insertList_4ezy5m$(entityList); }; function StatementDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.statementId); _stmt.setLong_6svq3l$(2, _entity.statementPersonUid); _stmt.setLong_6svq3l$(3, _entity.statementVerbUid); _stmt.setLong_6svq3l$(4, _entity.xObjectUid); _stmt.setLong_6svq3l$(5, _entity.subStatementActorUid); _stmt.setLong_6svq3l$(6, _entity.substatementVerbUid); _stmt.setLong_6svq3l$(7, _entity.subStatementObjectUid); _stmt.setLong_6svq3l$(8, _entity.agentUid); _stmt.setLong_6svq3l$(9, _entity.instructorUid); _stmt.setLong_6svq3l$(10, _entity.authorityUid); _stmt.setLong_6svq3l$(11, _entity.teamUid); _stmt.setBoolean_fzusl$(12, _entity.resultCompletion); _stmt.setByte_6t1wet$(13, _entity.resultSuccess); _stmt.setFloat_24o109$(14, _entity.resultScoreScaled); _stmt.setLong_6svq3l$(15, _entity.resultScoreRaw); _stmt.setLong_6svq3l$(16, _entity.resultScoreMin); _stmt.setLong_6svq3l$(17, _entity.resultScoreMax); _stmt.setLong_6svq3l$(18, _entity.resultDuration); _stmt.setString_vqvrqt$(19, _entity.resultResponse); _stmt.setLong_6svq3l$(20, _entity.timestamp); _stmt.setLong_6svq3l$(21, _entity.stored); _stmt.setString_vqvrqt$(22, _entity.contextRegistration); _stmt.setString_vqvrqt$(23, _entity.contextPlatform); _stmt.setString_vqvrqt$(24, _entity.contextStatementId); _stmt.setString_vqvrqt$(25, _entity.fullStatement); _stmt.setLong_6svq3l$(26, _entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(27, _entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(28, _entity.statementLastChangedBy); _stmt.setLong_6svq3l$(29, _entity.statementLct); _stmt.setInt_vux9f0$(30, _entity.extensionProgress); _stmt.setBoolean_fzusl$(31, _entity.contentEntryRoot); _stmt.setLong_6svq3l$(32, _entity.statementContentEntryUid); _stmt.setLong_6svq3l$(33, _entity.statementLearnerGroupUid); _stmt.setLong_6svq3l$(34, _entity.statementClazzUid); _stmt.setLong_6svq3l$(35, _entity.statementUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } StatementDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE StatementEntity SET statementId = ?, statementPersonUid = ?, statementVerbUid = ?, xObjectUid = ?, subStatementActorUid = ?, substatementVerbUid = ?, subStatementObjectUid = ?, agentUid = ?, instructorUid = ?, authorityUid = ?, teamUid = ?, resultCompletion = ?, resultSuccess = ?, resultScoreScaled = ?, resultScoreRaw = ?, resultScoreMin = ?, resultScoreMax = ?, resultDuration = ?, resultResponse = ?, timestamp = ?, stored = ?, contextRegistration = ?, contextPlatform = ?, contextStatementId = ?, fullStatement = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, statementLct = ?, extensionProgress = ?, contentEntryRoot = ?, statementContentEntryUid = ?, statementLearnerGroupUid = ?, statementClazzUid = ? WHERE statementUid = ?'; prepareAndUseStatement_0(this._db, _sql, StatementDao_JdbcKt$updateList$lambda(entityList)); }; function StatementDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.statementId); _stmt.setLong_6svq3l$(2, closure$entity.statementPersonUid); _stmt.setLong_6svq3l$(3, closure$entity.statementVerbUid); _stmt.setLong_6svq3l$(4, closure$entity.xObjectUid); _stmt.setLong_6svq3l$(5, closure$entity.subStatementActorUid); _stmt.setLong_6svq3l$(6, closure$entity.substatementVerbUid); _stmt.setLong_6svq3l$(7, closure$entity.subStatementObjectUid); _stmt.setLong_6svq3l$(8, closure$entity.agentUid); _stmt.setLong_6svq3l$(9, closure$entity.instructorUid); _stmt.setLong_6svq3l$(10, closure$entity.authorityUid); _stmt.setLong_6svq3l$(11, closure$entity.teamUid); _stmt.setBoolean_fzusl$(12, closure$entity.resultCompletion); _stmt.setByte_6t1wet$(13, closure$entity.resultSuccess); _stmt.setFloat_24o109$(14, closure$entity.resultScoreScaled); _stmt.setLong_6svq3l$(15, closure$entity.resultScoreRaw); _stmt.setLong_6svq3l$(16, closure$entity.resultScoreMin); _stmt.setLong_6svq3l$(17, closure$entity.resultScoreMax); _stmt.setLong_6svq3l$(18, closure$entity.resultDuration); _stmt.setString_vqvrqt$(19, closure$entity.resultResponse); _stmt.setLong_6svq3l$(20, closure$entity.timestamp); _stmt.setLong_6svq3l$(21, closure$entity.stored); _stmt.setString_vqvrqt$(22, closure$entity.contextRegistration); _stmt.setString_vqvrqt$(23, closure$entity.contextPlatform); _stmt.setString_vqvrqt$(24, closure$entity.contextStatementId); _stmt.setString_vqvrqt$(25, closure$entity.fullStatement); _stmt.setLong_6svq3l$(26, closure$entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(27, closure$entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(28, closure$entity.statementLastChangedBy); _stmt.setLong_6svq3l$(29, closure$entity.statementLct); _stmt.setInt_vux9f0$(30, closure$entity.extensionProgress); _stmt.setBoolean_fzusl$(31, closure$entity.contentEntryRoot); _stmt.setLong_6svq3l$(32, closure$entity.statementContentEntryUid); _stmt.setLong_6svq3l$(33, closure$entity.statementLearnerGroupUid); _stmt.setLong_6svq3l$(34, closure$entity.statementClazzUid); _stmt.setLong_6svq3l$(35, closure$entity.statementUid); return _stmt.executeUpdate(); }; } StatementDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE StatementEntity SET statementId = ?, statementPersonUid = ?, statementVerbUid = ?, xObjectUid = ?, subStatementActorUid = ?, substatementVerbUid = ?, subStatementObjectUid = ?, agentUid = ?, instructorUid = ?, authorityUid = ?, teamUid = ?, resultCompletion = ?, resultSuccess = ?, resultScoreScaled = ?, resultScoreRaw = ?, resultScoreMin = ?, resultScoreMax = ?, resultDuration = ?, resultResponse = ?, timestamp = ?, stored = ?, contextRegistration = ?, contextPlatform = ?, contextStatementId = ?, fullStatement = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, statementLct = ?, extensionProgress = ?, contentEntryRoot = ?, statementContentEntryUid = ?, statementLearnerGroupUid = ?, statementClazzUid = ? WHERE statementUid = ?'; prepareAndUseStatement_0(this._db, _sql, StatementDao_JdbcKt$update$lambda(entity)); }; function StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO StatementEntity (statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING statementUid'; } else tmp$ = ''; return "INSERT INTO StatementEntity (statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES(COALESCE(?,nextval('StatementEntity_statementUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.statementUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.statementUid); } stmt.setString_vqvrqt$(2, entity.statementId); stmt.setLong_6svq3l$(3, entity.statementPersonUid); stmt.setLong_6svq3l$(4, entity.statementVerbUid); stmt.setLong_6svq3l$(5, entity.xObjectUid); stmt.setLong_6svq3l$(6, entity.subStatementActorUid); stmt.setLong_6svq3l$(7, entity.substatementVerbUid); stmt.setLong_6svq3l$(8, entity.subStatementObjectUid); stmt.setLong_6svq3l$(9, entity.agentUid); stmt.setLong_6svq3l$(10, entity.instructorUid); stmt.setLong_6svq3l$(11, entity.authorityUid); stmt.setLong_6svq3l$(12, entity.teamUid); stmt.setBoolean_fzusl$(13, entity.resultCompletion); stmt.setByte_6t1wet$(14, entity.resultSuccess); stmt.setFloat_24o109$(15, entity.resultScoreScaled); stmt.setLong_6svq3l$(16, entity.resultScoreRaw); stmt.setLong_6svq3l$(17, entity.resultScoreMin); stmt.setLong_6svq3l$(18, entity.resultScoreMax); stmt.setLong_6svq3l$(19, entity.resultDuration); stmt.setString_vqvrqt$(20, entity.resultResponse); stmt.setLong_6svq3l$(21, entity.timestamp); stmt.setLong_6svq3l$(22, entity.stored); stmt.setString_vqvrqt$(23, entity.contextRegistration); stmt.setString_vqvrqt$(24, entity.contextPlatform); stmt.setString_vqvrqt$(25, entity.contextStatementId); stmt.setString_vqvrqt$(26, entity.fullStatement); stmt.setLong_6svq3l$(27, entity.statementMasterChangeSeqNum); stmt.setLong_6svq3l$(28, entity.statementLocalChangeSeqNum); stmt.setInt_vux9f0$(29, entity.statementLastChangedBy); stmt.setLong_6svq3l$(30, entity.statementLct); stmt.setInt_vux9f0$(31, entity.extensionProgress); stmt.setBoolean_fzusl$(32, entity.contentEntryRoot); stmt.setLong_6svq3l$(33, entity.statementContentEntryUid); stmt.setLong_6svq3l$(34, entity.statementLearnerGroupUid); stmt.setLong_6svq3l$(35, entity.statementClazzUid); }; StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; StatementDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao_JdbcKt', interfaces: [StatementDao]}; function StatementDao_ReplicateWrapper(_db, _dao) { StatementDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_159($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_159.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_159.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_159.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_159; Coroutine$replicateOnNewNode_s8cxhz$_159.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_159(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_162($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_162.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_162.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_162.prototype.constructor = Coroutine$replicateOnChange_162; Coroutine$replicateOnChange_162.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_162(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_18($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_18.prototype.constructor = Coroutine$insertListAsync_18; Coroutine$insertListAsync_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.statementUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(60, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.statementUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.statementLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_18(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_ReplicateWrapper.prototype.getOneStatement = function () { return this._dao_0.getOneStatement(); }; StatementDao_ReplicateWrapper.prototype.findByStatementId_61zpoe$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.findByStatementIdList_mhpeer$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.getResults_j49vja$ = function (query, continuation) { return this._dao_0.getResults_j49vja$(query, continuation); }; StatementDao_ReplicateWrapper.prototype.getListResults_j49vja$ = function (query) { return this._dao_0.getListResults_j49vja$(query); }; StatementDao_ReplicateWrapper.prototype.getPerson = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.getXLangMap = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.updateProgress_ro19vi$ = function (uid, progress, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.findPersonsWithContentEntryAttempts_vqkbx2$ = function (contentEntryUid, accountPersonUid, searchText, sortOrder) { return this._dao_0.findPersonsWithContentEntryAttempts_vqkbx2$(contentEntryUid, accountPersonUid, searchText, sortOrder); }; StatementDao_ReplicateWrapper.prototype.getBestScoreForContentForPerson_3pjtqy$ = function (contentEntryUid, accountPersonUid, continuation) { return this._dao_0.getBestScoreForContentForPerson_3pjtqy$(contentEntryUid, accountPersonUid, continuation); }; StatementDao_ReplicateWrapper.prototype.findNextStudentNotMarkedForAssignment_3pjtqy$ = function (assignmentUid, currentStudentUid, continuation) { return this._dao_0.findNextStudentNotMarkedForAssignment_3pjtqy$(assignmentUid, currentStudentUid, continuation); }; StatementDao_ReplicateWrapper.prototype.findSubmittedStatementFromStudent_3pjtqy$ = function (studentUid, assignmentObjectUid, continuation) { return this._dao_0.findSubmittedStatementFromStudent_3pjtqy$(studentUid, assignmentObjectUid, continuation); }; StatementDao_ReplicateWrapper.prototype.findScoreStatementForStudent_s8cxhz$ = function (studentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.findSessionsForPerson_b9bd0d$ = function (contentEntryUid, accountPersonUid, personUid) { return this._dao_0.findSessionsForPerson_b9bd0d$(contentEntryUid, accountPersonUid, personUid); }; StatementDao_ReplicateWrapper.prototype.findSessionDetailForPerson_pkyi17$ = function (contentEntryUid, accountPersonUid, personUid, contextRegistration) { return this._dao_0.findSessionDetailForPerson_pkyi17$(contentEntryUid, accountPersonUid, personUid, contextRegistration); }; StatementDao_ReplicateWrapper.prototype.calculateScoreForSession_61zpoe$ = function (contextRegistration, continuation) { return this._dao_0.calculateScoreForSession_61zpoe$(contextRegistration, continuation); }; StatementDao_ReplicateWrapper.prototype.findCompletedScoreForSession_61zpoe$ = function (contextRegistration, continuation) { return this._dao_0.findCompletedScoreForSession_61zpoe$(contextRegistration, continuation); }; StatementDao_ReplicateWrapper.prototype.findLatestRegistrationStatement_3pjtqy$ = function (accountPersonUid, entryUid, continuation) { return this._dao_0.findLatestRegistrationStatement_3pjtqy$(accountPersonUid, entryUid, continuation); }; StatementDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_168($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_168.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_168.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_168.prototype.constructor = Coroutine$insertAsync_168; Coroutine$insertAsync_168.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.statementUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(60, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.statementUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.statementLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.statementUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_168(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao_ReplicateWrapper', interfaces: [StatementDao]}; function StatementDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { StatementDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_160($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_160.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_160.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_160.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_160; Coroutine$replicateOnNewNode_s8cxhz$_160.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_160(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_163($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_163.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_163.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_163.prototype.constructor = Coroutine$replicateOnChange_163; Coroutine$replicateOnChange_163.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_163(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_19($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_19.prototype.constructor = Coroutine$insertListAsync_19; Coroutine$insertListAsync_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.insertListAsync = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_19(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.getOneStatement = function () { var _result = this._dao.getOneStatement(); return _result; }; StatementDao_Repo.prototype.findByStatementId_61zpoe$ = function (id) { var _result = this._dao.findByStatementId_61zpoe$(id); return _result; }; StatementDao_Repo.prototype.findByStatementIdList_mhpeer$ = function (id) { var _result = this._dao.findByStatementIdList_mhpeer$(id); return _result; }; function Coroutine$getResults_j49vja$_0($this, query_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$query = query_0; } Coroutine$getResults_j49vja$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getResults_j49vja$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getResults_j49vja$_0.prototype.constructor = Coroutine$getResults_j49vja$_0; Coroutine$getResults_j49vja$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getResults_j49vja$(this.local$query, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.getResults_j49vja$ = function (query_0, continuation_0, suspended) { var instance = new Coroutine$getResults_j49vja$_0(this, query_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.getListResults_j49vja$ = function (query) { var _result = this._dao.getListResults_j49vja$(query); return _result; }; StatementDao_Repo.prototype.getPerson = function () { var _result = this._dao.getPerson(); return _result; }; StatementDao_Repo.prototype.getXLangMap = function () { var _result = this._dao.getXLangMap(); return _result; }; StatementDao_Repo.prototype.updateProgress_ro19vi$ = function (uid, progress, updateTime) { this._dao.updateProgress_ro19vi$(uid, progress, updateTime); }; StatementDao_Repo.prototype.findPersonsWithContentEntryAttempts_vqkbx2$ = function (contentEntryUid, accountPersonUid, searchText, sortOrder) { var _result = this._dao.findPersonsWithContentEntryAttempts_vqkbx2$(contentEntryUid, accountPersonUid, searchText, sortOrder); return _result; }; function Coroutine$getBestScoreForContentForPerson_3pjtqy$_0($this, contentEntryUid_0, accountPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$accountPersonUid = accountPersonUid_0; } Coroutine$getBestScoreForContentForPerson_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getBestScoreForContentForPerson_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getBestScoreForContentForPerson_3pjtqy$_0.prototype.constructor = Coroutine$getBestScoreForContentForPerson_3pjtqy$_0; Coroutine$getBestScoreForContentForPerson_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getBestScoreForContentForPerson_3pjtqy$(this.local$contentEntryUid, this.local$accountPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.getBestScoreForContentForPerson_3pjtqy$ = function (contentEntryUid_0, accountPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$getBestScoreForContentForPerson_3pjtqy$_0(this, contentEntryUid_0, accountPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0($this, assignmentUid_0, currentStudentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$currentStudentUid = currentStudentUid_0; } Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0.prototype.constructor = Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0; Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findNextStudentNotMarkedForAssignment_3pjtqy$(this.local$assignmentUid, this.local$currentStudentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findNextStudentNotMarkedForAssignment_3pjtqy$ = function (assignmentUid_0, currentStudentUid_0, continuation_0, suspended) { var instance = new Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$_0(this, assignmentUid_0, currentStudentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0($this, studentUid_0, assignmentObjectUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$studentUid = studentUid_0; this.local$assignmentObjectUid = assignmentObjectUid_0; } Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0.prototype.constructor = Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0; Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSubmittedStatementFromStudent_3pjtqy$(this.local$studentUid, this.local$assignmentObjectUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findSubmittedStatementFromStudent_3pjtqy$ = function (studentUid_0, assignmentObjectUid_0, continuation_0, suspended) { var instance = new Coroutine$findSubmittedStatementFromStudent_3pjtqy$_0(this, studentUid_0, assignmentObjectUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.findScoreStatementForStudent_s8cxhz$ = function (studentUid) { var _result = this._dao.findScoreStatementForStudent_s8cxhz$(studentUid); return _result; }; StatementDao_Repo.prototype.findSessionsForPerson_b9bd0d$ = function (contentEntryUid, accountPersonUid, personUid) { var _result = this._dao.findSessionsForPerson_b9bd0d$(contentEntryUid, accountPersonUid, personUid); return _result; }; StatementDao_Repo.prototype.findSessionDetailForPerson_pkyi17$ = function (contentEntryUid, accountPersonUid, personUid, contextRegistration) { var _result = this._dao.findSessionDetailForPerson_pkyi17$(contentEntryUid, accountPersonUid, personUid, contextRegistration); return _result; }; function Coroutine$calculateScoreForSession_61zpoe$_0($this, contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contextRegistration = contextRegistration_0; } Coroutine$calculateScoreForSession_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$calculateScoreForSession_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$calculateScoreForSession_61zpoe$_0.prototype.constructor = Coroutine$calculateScoreForSession_61zpoe$_0; Coroutine$calculateScoreForSession_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.calculateScoreForSession_61zpoe$(this.local$contextRegistration, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.calculateScoreForSession_61zpoe$ = function (contextRegistration_0, continuation_0, suspended) { var instance = new Coroutine$calculateScoreForSession_61zpoe$_0(this, contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findCompletedScoreForSession_61zpoe$_0($this, contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contextRegistration = contextRegistration_0; } Coroutine$findCompletedScoreForSession_61zpoe$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findCompletedScoreForSession_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findCompletedScoreForSession_61zpoe$_0.prototype.constructor = Coroutine$findCompletedScoreForSession_61zpoe$_0; Coroutine$findCompletedScoreForSession_61zpoe$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findCompletedScoreForSession_61zpoe$(this.local$contextRegistration, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findCompletedScoreForSession_61zpoe$ = function (contextRegistration_0, continuation_0, suspended) { var instance = new Coroutine$findCompletedScoreForSession_61zpoe$_0(this, contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findLatestRegistrationStatement_3pjtqy$_0($this, accountPersonUid_0, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$entryUid = entryUid_0; } Coroutine$findLatestRegistrationStatement_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLatestRegistrationStatement_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLatestRegistrationStatement_3pjtqy$_0.prototype.constructor = Coroutine$findLatestRegistrationStatement_3pjtqy$_0; Coroutine$findLatestRegistrationStatement_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findLatestRegistrationStatement_3pjtqy$(this.local$accountPersonUid, this.local$entryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findLatestRegistrationStatement_3pjtqy$ = function (accountPersonUid_0, entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findLatestRegistrationStatement_3pjtqy$_0(this, accountPersonUid_0, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_169($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_169.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_169.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_169.prototype.constructor = Coroutine$insertAsync_169; Coroutine$insertAsync_169.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_169(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; StatementDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; StatementDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; StatementDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao_Repo', interfaces: [StatementDao]}; function SyncNodeDao_JdbcKt(_db) { SyncNodeDao.call(this); this._db = _db; this._insertAdapterSyncNode_upsert = new SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral(this._db); } SyncNodeDao_JdbcKt.prototype.replace_xzdt0j$ = function (syncNode) { this._insertAdapterSyncNode_upsert.insert_11rb$(syncNode); }; function SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.prototype.constructor = Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda; Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getLocalNodeClientId($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$getLocalNodeClientId.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getLocalNodeClientId.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getLocalNodeClientId.prototype.constructor = Coroutine$getLocalNodeClientId; Coroutine$getLocalNodeClientId.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: L0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode \n | LIMIT 1), 0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode \n | LIMIT 1), 0)\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SyncNodeDao_JdbcKt.prototype.getLocalNodeClientId = function (continuation_0, suspended) { var instance = new Coroutine$getLocalNodeClientId(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO SyncNode (nodeClientId) VALUES(?)'; case 2: if (returnsId) { tmp$ = ' RETURNING nodeClientId'; } else tmp$ = ''; return 'INSERT INTO SyncNode (nodeClientId) VALUES(?) ON CONFLICT (nodeClientId) DO UPDATE SET ' + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.nodeClientId); }; SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SyncNodeDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SyncNodeDao_JdbcKt', interfaces: [SyncNodeDao]}; function UserSessionDao_JdbcKt(_db) { UserSessionDao.call(this); this._db = _db; this._insertAdapterUserSession_ = new UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral(this._db); } function Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$updateReplicationTrackers$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$updateReplicationTrackers($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$updateReplicationTrackers.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackers.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackers.prototype.constructor = Coroutine$updateReplicationTrackers; Coroutine$updateReplicationTrackers.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM ChangeLog\n | JOIN UserSession UserSessionSubject\n | ON ChangeLog.chTableId = 679\n | AND ChangeLog.chEntityPk = UserSessionSubject.usUid\n | AND UserSessionSubject.usSessionType = 1\n | JOIN Person\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | /* Modify second part of query - remove requirement for session to be active.\n | * This ensures that deactivations are distributed\n | */\n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | WHERE UserSessionSubject.usClientNodeId = UserSessionSubject.usClientNodeId \n | --notpsql \n | AND UserSessionSubject.usLct != COALESCE(\n | (SELECT usVersionId\n | FROM UserSessionReplicate\n | WHERE UserSessionReplicate.usPk = UserSessionSubject.usUid\n | AND UserSessionReplicate.usDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM ChangeLog\n | JOIN UserSession UserSessionSubject\n | ON ChangeLog.chTableId = 679\n | AND ChangeLog.chEntityPk = UserSessionSubject.usUid\n | AND UserSessionSubject.usSessionType = 1\n | JOIN Person\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | /* Modify second part of query - remove requirement for session to be active.\n | * This ensures that deactivations are distributed\n | */\n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | WHERE UserSessionSubject.usClientNodeId = UserSessionSubject.usClientNodeId \n | ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$updateReplicationTrackers$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.updateReplicationTrackers = function (continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackers(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.prototype.constructor = Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM UserSession \n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN UserSession UserSessionSubject\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | AND UserSessionSubject.usSessionType = 1\n | AND UserSessionSubject.usClientNodeId = ?\n | WHERE UserSession.usClientNodeId = ?\n | --notpsql\n | AND UserSessionSubject.usLct != COALESCE(\n | (SELECT usVersionId\n | FROM UserSessionReplicate\n | WHERE UserSessionReplicate.usPk = UserSessionSubject.usUid\n | AND UserSessionReplicate.usDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM UserSession \n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN UserSession UserSessionSubject\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | AND UserSessionSubject.usSessionType = 1\n | AND UserSessionSubject.usClientNodeId = ?\n | WHERE UserSession.usClientNodeId = ?\n | ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.updateReplicationTrackersOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertSession_g3losl$($this, session_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$session = session_0; } Coroutine$insertSession_g3losl$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertSession_g3losl$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertSession_g3losl$.prototype.constructor = Coroutine$insertSession_g3losl$; Coroutine$insertSession_g3losl$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterUserSession_.insertAndReturnIdAsync_11rb$(this.local$session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.insertSession_g3losl$ = function (session_0, continuation_0, suspended) { var instance = new Coroutine$insertSession_g3losl$(this, session_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findSessionsByPerson$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_usUid = _resultSet.getLong_61zpoe$('usUid'); var tmp_usPcsn = _resultSet.getLong_61zpoe$('usPcsn'); var tmp_usLcsn = _resultSet.getLong_61zpoe$('usLcsn'); var tmp_usLcb = _resultSet.getInt_61zpoe$('usLcb'); var tmp_usLct = _resultSet.getLong_61zpoe$('usLct'); var tmp_usPersonUid = _resultSet.getLong_61zpoe$('usPersonUid'); var tmp_usClientNodeId = _resultSet.getLong_61zpoe$('usClientNodeId'); var tmp_usStartTime = _resultSet.getLong_61zpoe$('usStartTime'); var tmp_usEndTime = _resultSet.getLong_61zpoe$('usEndTime'); var tmp_usStatus = _resultSet.getInt_61zpoe$('usStatus'); var tmp_usReason = _resultSet.getInt_61zpoe$('usReason'); var tmp_usAuth = _resultSet.getString_61zpoe$('usAuth'); var tmp_usSessionType = _resultSet.getInt_61zpoe$('usSessionType'); var _entity = new UserSession(); _entity.usUid = tmp_usUid; _entity.usPcsn = tmp_usPcsn; _entity.usLcsn = tmp_usLcsn; _entity.usLcb = tmp_usLcb; _entity.usLct = tmp_usLct; _entity.usPersonUid = tmp_usPersonUid; _entity.usClientNodeId = tmp_usClientNodeId; _entity.usStartTime = tmp_usStartTime; _entity.usEndTime = tmp_usEndTime; _entity.usStatus = tmp_usStatus; _entity.usReason = tmp_usReason; _entity.usAuth = tmp_usAuth; _entity.usSessionType = tmp_usSessionType; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda; Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findSessionsByPerson$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findSessionsByPerson$lambda(closure$personUid_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda(closure$personUid_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findSessionsByPerson_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUid = personUid_0; } Coroutine$findSessionsByPerson_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSessionsByPerson_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSessionsByPerson_s8cxhz$.prototype.constructor = Coroutine$findSessionsByPerson_s8cxhz$; Coroutine$findSessionsByPerson_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*\n | FROM UserSession\n | WHERE usPersonUid = ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT UserSession.*\n | FROM UserSession\n | WHERE usPersonUid = ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$findSessionsByPerson$lambda(this.local$personUid, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.findSessionsByPerson_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findSessionsByPerson_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var _entity = new UserSessionAndPerson(); var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }var _userSession_nullFieldCount = 0; var tmp_usUid = _resultSet.getLong_61zpoe$('usUid'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usPcsn = _resultSet.getLong_61zpoe$('usPcsn'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usLcsn = _resultSet.getLong_61zpoe$('usLcsn'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usLcb = _resultSet.getInt_61zpoe$('usLcb'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usLct = _resultSet.getLong_61zpoe$('usLct'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usPersonUid = _resultSet.getLong_61zpoe$('usPersonUid'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usClientNodeId = _resultSet.getLong_61zpoe$('usClientNodeId'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usStartTime = _resultSet.getLong_61zpoe$('usStartTime'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usEndTime = _resultSet.getLong_61zpoe$('usEndTime'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usStatus = _resultSet.getInt_61zpoe$('usStatus'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usReason = _resultSet.getInt_61zpoe$('usReason'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usAuth = _resultSet.getString_61zpoe$('usAuth'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usSessionType = _resultSet.getInt_61zpoe$('usSessionType'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }if (_userSession_nullFieldCount < 13) { if (_entity.userSession == null) { _entity.userSession = new UserSession(); }ensureNotNull(_entity.userSession).usUid = tmp_usUid; ensureNotNull(_entity.userSession).usPcsn = tmp_usPcsn; ensureNotNull(_entity.userSession).usLcsn = tmp_usLcsn; ensureNotNull(_entity.userSession).usLcb = tmp_usLcb; ensureNotNull(_entity.userSession).usLct = tmp_usLct; ensureNotNull(_entity.userSession).usPersonUid = tmp_usPersonUid; ensureNotNull(_entity.userSession).usClientNodeId = tmp_usClientNodeId; ensureNotNull(_entity.userSession).usStartTime = tmp_usStartTime; ensureNotNull(_entity.userSession).usEndTime = tmp_usEndTime; ensureNotNull(_entity.userSession).usStatus = tmp_usStatus; ensureNotNull(_entity.userSession).usReason = tmp_usReason; ensureNotNull(_entity.userSession).usAuth = tmp_usAuth; ensureNotNull(_entity.userSession).usSessionType = tmp_usSessionType; }closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this$UserSessionDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$_liveResult = void 0; } Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*, Person.*\n | FROM UserSession\n | JOIN Person ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT UserSession.*, Person.*\n | FROM UserSession\n | JOIN Person ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$UserSessionDao_JdbcKt._db, _stmtConfig, UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this$UserSessionDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this$UserSessionDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findAllLocalSessionsLive = function () { var _result = new DoorLiveDataImpl(this._db, listOf(['UserSession', 'Person', 'SyncNode']), UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this)); return _result; }; function UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = new UserSessionAndPerson(); var _person_nullFieldCount = 0; var tmp_personUid = _resultSet.getLong_61zpoe$('personUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_username = _resultSet.getString_61zpoe$('username'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_firstNames = _resultSet.getString_61zpoe$('firstNames'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_lastName = _resultSet.getString_61zpoe$('lastName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_emailAddr = _resultSet.getString_61zpoe$('emailAddr'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_phoneNum = _resultSet.getString_61zpoe$('phoneNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_gender = _resultSet.getInt_61zpoe$('gender'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_active = _resultSet.getBoolean_61zpoe$('active'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_admin = _resultSet.getBoolean_61zpoe$('admin'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personNotes = _resultSet.getString_61zpoe$('personNotes'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherName = _resultSet.getString_61zpoe$('fatherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_fatherNumber = _resultSet.getString_61zpoe$('fatherNumber'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherName = _resultSet.getString_61zpoe$('motherName'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_motherNum = _resultSet.getString_61zpoe$('motherNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_dateOfBirth = _resultSet.getLong_61zpoe$('dateOfBirth'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personAddress = _resultSet.getString_61zpoe$('personAddress'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personOrgId = _resultSet.getString_61zpoe$('personOrgId'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personGroupUid = _resultSet.getLong_61zpoe$('personGroupUid'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personMasterChangeSeqNum = _resultSet.getLong_61zpoe$('personMasterChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLocalChangeSeqNum = _resultSet.getLong_61zpoe$('personLocalChangeSeqNum'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLastChangedBy = _resultSet.getInt_61zpoe$('personLastChangedBy'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personLct = _resultSet.getLong_61zpoe$('personLct'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personCountry = _resultSet.getString_61zpoe$('personCountry'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }var tmp_personType = _resultSet.getInt_61zpoe$('personType'); if (_resultSet.wasNull()) { _person_nullFieldCount = _person_nullFieldCount + 1 | 0; }if (_person_nullFieldCount < 24) { if (_entity.person == null) { _entity.person = new Person(); }ensureNotNull(_entity.person).personUid = tmp_personUid; ensureNotNull(_entity.person).username = tmp_username; ensureNotNull(_entity.person).firstNames = tmp_firstNames; ensureNotNull(_entity.person).lastName = tmp_lastName; ensureNotNull(_entity.person).emailAddr = tmp_emailAddr; ensureNotNull(_entity.person).phoneNum = tmp_phoneNum; ensureNotNull(_entity.person).gender = tmp_gender; ensureNotNull(_entity.person).active = tmp_active; ensureNotNull(_entity.person).admin = tmp_admin; ensureNotNull(_entity.person).personNotes = tmp_personNotes; ensureNotNull(_entity.person).fatherName = tmp_fatherName; ensureNotNull(_entity.person).fatherNumber = tmp_fatherNumber; ensureNotNull(_entity.person).motherName = tmp_motherName; ensureNotNull(_entity.person).motherNum = tmp_motherNum; ensureNotNull(_entity.person).dateOfBirth = tmp_dateOfBirth; ensureNotNull(_entity.person).personAddress = tmp_personAddress; ensureNotNull(_entity.person).personOrgId = tmp_personOrgId; ensureNotNull(_entity.person).personGroupUid = tmp_personGroupUid; ensureNotNull(_entity.person).personMasterChangeSeqNum = tmp_personMasterChangeSeqNum; ensureNotNull(_entity.person).personLocalChangeSeqNum = tmp_personLocalChangeSeqNum; ensureNotNull(_entity.person).personLastChangedBy = tmp_personLastChangedBy; ensureNotNull(_entity.person).personLct = tmp_personLct; ensureNotNull(_entity.person).personCountry = tmp_personCountry; ensureNotNull(_entity.person).personType = tmp_personType; }var _userSession_nullFieldCount = 0; var tmp_usUid = _resultSet.getLong_61zpoe$('usUid'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usPcsn = _resultSet.getLong_61zpoe$('usPcsn'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usLcsn = _resultSet.getLong_61zpoe$('usLcsn'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usLcb = _resultSet.getInt_61zpoe$('usLcb'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usLct = _resultSet.getLong_61zpoe$('usLct'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usPersonUid = _resultSet.getLong_61zpoe$('usPersonUid'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usClientNodeId = _resultSet.getLong_61zpoe$('usClientNodeId'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usStartTime = _resultSet.getLong_61zpoe$('usStartTime'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usEndTime = _resultSet.getLong_61zpoe$('usEndTime'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usStatus = _resultSet.getInt_61zpoe$('usStatus'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usReason = _resultSet.getInt_61zpoe$('usReason'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usAuth = _resultSet.getString_61zpoe$('usAuth'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }var tmp_usSessionType = _resultSet.getInt_61zpoe$('usSessionType'); if (_resultSet.wasNull()) { _userSession_nullFieldCount = _userSession_nullFieldCount + 1 | 0; }if (_userSession_nullFieldCount < 13) { if (_entity.userSession == null) { _entity.userSession = new UserSession(); }ensureNotNull(_entity.userSession).usUid = tmp_usUid; ensureNotNull(_entity.userSession).usPcsn = tmp_usPcsn; ensureNotNull(_entity.userSession).usLcsn = tmp_usLcsn; ensureNotNull(_entity.userSession).usLcb = tmp_usLcb; ensureNotNull(_entity.userSession).usLct = tmp_usLct; ensureNotNull(_entity.userSession).usPersonUid = tmp_usPersonUid; ensureNotNull(_entity.userSession).usClientNodeId = tmp_usClientNodeId; ensureNotNull(_entity.userSession).usStartTime = tmp_usStartTime; ensureNotNull(_entity.userSession).usEndTime = tmp_usEndTime; ensureNotNull(_entity.userSession).usStatus = tmp_usStatus; ensureNotNull(_entity.userSession).usReason = tmp_usReason; ensureNotNull(_entity.userSession).usAuth = tmp_usAuth; ensureNotNull(_entity.userSession).usSessionType = tmp_usSessionType; }closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllLocalSessionsAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; } Coroutine$findAllLocalSessionsAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllLocalSessionsAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllLocalSessionsAsync.prototype.constructor = Coroutine$findAllLocalSessionsAsync; Coroutine$findAllLocalSessionsAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*, Person.*\n | FROM UserSession\n | JOIN Person ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT UserSession.*, Person.*\n | FROM UserSession\n | JOIN Person ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.findAllLocalSessionsAsync = function (continuation_0, suspended) { var instance = new Coroutine$findAllLocalSessionsAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_result.v = _entity; }return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(closure$maxDateOfBirth_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$maxDateOfBirth = closure$maxDateOfBirth_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda; Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$maxDateOfBirth); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$maxDateOfBirth); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(closure$maxDateOfBirth_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(closure$maxDateOfBirth_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$countAllLocalSessionsAsync_s8cxhz$($this, maxDateOfBirth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$maxDateOfBirth = maxDateOfBirth_0; } Coroutine$countAllLocalSessionsAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countAllLocalSessionsAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countAllLocalSessionsAsync_s8cxhz$.prototype.constructor = Coroutine$countAllLocalSessionsAsync_s8cxhz$; Coroutine$countAllLocalSessionsAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT COUNT(*)\n | FROM UserSession\n | JOIN Person \n | ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | AND (? = 0 OR Person.dateOfBirth < ?) \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COUNT(*)\n | FROM UserSession\n | JOIN Person \n | ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | AND (? = 0 OR Person.dateOfBirth < ?) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(this.local$maxDateOfBirth, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.countAllLocalSessionsAsync_s8cxhz$ = function (maxDateOfBirth_0, continuation_0, suspended) { var instance = new Coroutine$countAllLocalSessionsAsync_s8cxhz$(this, maxDateOfBirth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UserSessionDao_JdbcKt$endSession$lambda(closure$newStatus_0, closure$reason_0, closure$sessionUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newStatus = closure$newStatus_0; this.local$closure$reason = closure$reason_0; this.local$closure$sessionUid = closure$sessionUid_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$endSession$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$endSession$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$endSession$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$endSession$lambda; Coroutine$UserSessionDao_JdbcKt$endSession$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newStatus); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$reason); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$sessionUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$endSession$lambda(closure$newStatus_0, closure$reason_0, closure$sessionUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$endSession$lambda(closure$newStatus_0, closure$reason_0, closure$sessionUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$endSession_liip7b$($this, sessionUid_0, newStatus_0, reason_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sessionUid = sessionUid_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; } Coroutine$endSession_liip7b$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endSession_liip7b$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endSession_liip7b$.prototype.constructor = Coroutine$endSession_liip7b$; Coroutine$endSession_liip7b$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE UserSession\n | SET usAuth = null,\n | usStatus = ?,\n | usReason = ?,\n | usLcb = COALESCE(\n | (SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1), 0)\n | WHERE UserSession.usUid = ? \n | \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE UserSession\n | SET usAuth = null,\n | usStatus = ?,\n | usReason = ?,\n | usLcb = COALESCE(\n | (SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1), 0)\n | WHERE UserSession.usUid = ? \n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$endSession$lambda(this.local$newStatus, this.local$reason, this.local$sessionUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.endSession_liip7b$ = function (sessionUid_0, newStatus_0, reason_0, continuation_0, suspended) { var instance = new Coroutine$endSession_liip7b$(this, sessionUid_0, newStatus_0, reason_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findByUidLive$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var tmp_usUid = _resultSet.getLong_61zpoe$('usUid'); var tmp_usPcsn = _resultSet.getLong_61zpoe$('usPcsn'); var tmp_usLcsn = _resultSet.getLong_61zpoe$('usLcsn'); var tmp_usLcb = _resultSet.getInt_61zpoe$('usLcb'); var tmp_usLct = _resultSet.getLong_61zpoe$('usLct'); var tmp_usPersonUid = _resultSet.getLong_61zpoe$('usPersonUid'); var tmp_usClientNodeId = _resultSet.getLong_61zpoe$('usClientNodeId'); var tmp_usStartTime = _resultSet.getLong_61zpoe$('usStartTime'); var tmp_usEndTime = _resultSet.getLong_61zpoe$('usEndTime'); var tmp_usStatus = _resultSet.getInt_61zpoe$('usStatus'); var tmp_usReason = _resultSet.getInt_61zpoe$('usReason'); var tmp_usAuth = _resultSet.getString_61zpoe$('usAuth'); var tmp_usSessionType = _resultSet.getInt_61zpoe$('usSessionType'); var _entity = new UserSession(); _entity.usUid = tmp_usUid; _entity.usPcsn = tmp_usPcsn; _entity.usLcsn = tmp_usLcsn; _entity.usLcb = tmp_usLcb; _entity.usLct = tmp_usLct; _entity.usPersonUid = tmp_usPersonUid; _entity.usClientNodeId = tmp_usClientNodeId; _entity.usStartTime = tmp_usStartTime; _entity.usEndTime = tmp_usEndTime; _entity.usStatus = tmp_usStatus; _entity.usReason = tmp_usReason; _entity.usAuth = tmp_usAuth; _entity.usSessionType = tmp_usSessionType; closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(closure$sessionUid_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sessionUid = closure$sessionUid_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$sessionUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findByUidLive$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(closure$sessionUid_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(closure$sessionUid_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda(this$UserSessionDao_JdbcKt_0, closure$sessionUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$closure$sessionUid = closure$sessionUid_0; this.local$_liveResult = void 0; } Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var tmp$; this.local$_liveResult = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, UserSession) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*\n | FROM UserSession\n | WHERE UserSession.usUid = ?\n | LIMIT 1\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT UserSession.*\n | FROM UserSession\n | WHERE UserSession.usUid = ?\n | LIMIT 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$UserSessionDao_JdbcKt._db, _stmtConfig, UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$sessionUid, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findByUidLive$lambda(this$UserSessionDao_JdbcKt_0, closure$sessionUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda(this$UserSessionDao_JdbcKt_0, closure$sessionUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (sessionUid) { var _result = new DoorLiveDataImpl(this._db, listOf_0('UserSession'), UserSessionDao_JdbcKt$findByUidLive$lambda(this, sessionUid)); return _result; }; function Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda(closure$newStatus_0, closure$reason_0, closure$changeTime_0, closure$personUid_0, closure$exemptNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newStatus = closure$newStatus_0; this.local$closure$reason = closure$reason_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$exemptNodeId = closure$exemptNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda; Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newStatus); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$reason); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$exemptNodeId); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$newStatus); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$endOtherSessions$lambda(closure$newStatus_0, closure$reason_0, closure$changeTime_0, closure$personUid_0, closure$exemptNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda(closure$newStatus_0, closure$reason_0, closure$changeTime_0, closure$personUid_0, closure$exemptNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$endOtherSessions_d2c2sj$($this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$exemptNodeId = exemptNodeId_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; this.local$changeTime = changeTime_0; } Coroutine$endOtherSessions_d2c2sj$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endOtherSessions_d2c2sj$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endOtherSessions_d2c2sj$.prototype.constructor = Coroutine$endOtherSessions_d2c2sj$; Coroutine$endOtherSessions_d2c2sj$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | UPDATE UserSession\n | SET usAuth = null,\n | usStatus = ?,\n | usReason = ?,\n | usLct = ?\n | WHERE usPersonUid = ?\n | AND usClientNodeId != ?\n | AND usStatus != ? \n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE UserSession\n | SET usAuth = null,\n | usStatus = ?,\n | usReason = ?,\n | usLct = ?\n | WHERE usPersonUid = ?\n | AND usClientNodeId != ?\n | AND usStatus != ? \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$endOtherSessions$lambda(this.local$newStatus, this.local$reason, this.local$changeTime, this.local$personUid, this.local$exemptNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.endOtherSessions_d2c2sj$ = function (personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$endOtherSessions_d2c2sj$(this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(this$UserSessionDao_JdbcKt_0, closure$personUids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$closure$personUids = closure$personUids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda; Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$UserSessionDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$personUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(this$UserSessionDao_JdbcKt_0, closure$personUids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(this$UserSessionDao_JdbcKt_0, closure$personUids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findActiveNodeIdsByPersonUids_gox9k8$($this, personUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$personUids = personUids_0; } Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.prototype.constructor = Coroutine$findActiveNodeIdsByPersonUids_gox9k8$; Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT DISTINCT UserSession.usClientNodeId\n | FROM UserSession\n | WHERE UserSession.usPersonUid IN (?)\n | AND UserSession.usStatus = 1\n | \n '), true, void 0, void 0, trimMargin('\n |\n | SELECT DISTINCT UserSession.usClientNodeId\n | FROM UserSession\n | WHERE UserSession.usPersonUid IN (?)\n | AND UserSession.usStatus = 1\n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(this.$this, this.local$personUids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.findActiveNodeIdsByPersonUids_gox9k8$ = function (personUids_0, continuation_0, suspended) { var instance = new Coroutine$findActiveNodeIdsByPersonUids_gox9k8$(this, personUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(this$UserSessionDao_JdbcKt_0, closure$groupUids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$closure$groupUids = closure$groupUids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda; Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$UserSessionDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$groupUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(this$UserSessionDao_JdbcKt_0, closure$groupUids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(this$UserSessionDao_JdbcKt_0, closure$groupUids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findActiveNodesIdsByGroupUids_gox9k8$($this, groupUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$groupUids = groupUids_0; } Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.prototype.constructor = Coroutine$findActiveNodesIdsByGroupUids_gox9k8$; Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT DISTINCT UserSession.usClientNodeId\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberPersonUid = UserSession.usPersonUid\n | WHERE PersonGroupMember.groupMemberGroupUid IN (?) \n | \n '), true, void 0, void 0, trimMargin('\n |\n | SELECT DISTINCT UserSession.usClientNodeId\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberPersonUid = UserSession.usPersonUid\n | WHERE PersonGroupMember.groupMemberGroupUid IN (?) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(this.$this, this.local$groupUids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.findActiveNodesIdsByGroupUids_gox9k8$ = function (groupUids_0, continuation_0, suspended) { var instance = new Coroutine$findActiveNodesIdsByGroupUids_gox9k8$(this, groupUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(this$UserSessionDao_JdbcKt_0, closure$clazzUids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$closure$clazzUids = closure$clazzUids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$UserSessionDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$clazzUids))); this.local$_stmt.setArray_wqp8hw$(2, this.local$this$UserSessionDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$clazzUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(this$UserSessionDao_JdbcKt_0, closure$clazzUids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(this$UserSessionDao_JdbcKt_0, closure$clazzUids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$($this, clazzUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$clazzUids = clazzUids_0; } Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.prototype.constructor = Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$; Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.usClientNodeId\n | FROM ScopedGrant\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrant.sgGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | WHERE (ScopedGrant.sgTableId = 6 AND ScopedGrant.sgEntityUid IN (?))\n | OR (ScopedGrant.sgTableId = 164 AND ScopedGrant.sgEntityUid IN \n | (SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid IN (?)))\n | \n | \n '), true, void 0, void 0, trimMargin('\n |\n | SELECT UserSession.usClientNodeId\n | FROM ScopedGrant\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrant.sgGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | WHERE (ScopedGrant.sgTableId = 6 AND ScopedGrant.sgEntityUid IN (?))\n | OR (ScopedGrant.sgTableId = 164 AND ScopedGrant.sgEntityUid IN \n | (SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid IN (?)))\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(this.$this, this.local$clazzUids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$ = function (clazzUids_0, continuation_0, suspended) { var instance = new Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$(this, clazzUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(this$UserSessionDao_JdbcKt_0, closure$schoolUids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$closure$schoolUids = closure$schoolUids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$UserSessionDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$schoolUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(this$UserSessionDao_JdbcKt_0, closure$schoolUids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(this$UserSessionDao_JdbcKt_0, closure$schoolUids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$($this, schoolUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$schoolUids = schoolUids_0; } Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.prototype.constructor = Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$; Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.usClientNodeId\n | FROM ScopedGrant\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrant.sgGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | WHERE ScopedGrant.sgTableId = 164 \n | AND ScopedGrant.sgEntityUid IN (?) \n | \n '), true, void 0, void 0, trimMargin('\n |\n | SELECT UserSession.usClientNodeId\n | FROM ScopedGrant\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrant.sgGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | WHERE ScopedGrant.sgTableId = 164 \n | AND ScopedGrant.sgEntityUid IN (?) \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(this.$this, this.local$schoolUids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$ = function (schoolUids_0, continuation_0, suspended) { var instance = new Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$(this, schoolUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO UserSession (usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING usUid'; } else tmp$ = ''; return "INSERT INTO UserSession (usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES(COALESCE(?,nextval('UserSession_usUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.usUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.usUid); } stmt.setLong_6svq3l$(2, entity.usPcsn); stmt.setLong_6svq3l$(3, entity.usLcsn); stmt.setInt_vux9f0$(4, entity.usLcb); stmt.setLong_6svq3l$(5, entity.usLct); stmt.setLong_6svq3l$(6, entity.usPersonUid); stmt.setLong_6svq3l$(7, entity.usClientNodeId); stmt.setLong_6svq3l$(8, entity.usStartTime); stmt.setLong_6svq3l$(9, entity.usEndTime); stmt.setInt_vux9f0$(10, entity.usStatus); stmt.setInt_vux9f0$(11, entity.usReason); stmt.setString_vqvrqt$(12, entity.usAuth); stmt.setInt_vux9f0$(13, entity.usSessionType); }; UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; UserSessionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao_JdbcKt', interfaces: [UserSessionDao]}; function UserSessionDao_ReplicateWrapper(_db, _dao) { UserSessionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$updateReplicationTrackers_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$updateReplicationTrackers_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackers_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackers_0.prototype.constructor = Coroutine$updateReplicationTrackers_0; Coroutine$updateReplicationTrackers_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateReplicationTrackers(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.updateReplicationTrackers = function (continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackers_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.prototype.constructor = Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateReplicationTrackersOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.updateReplicationTrackersOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertSession_g3losl$_0($this, session_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$session = session_0; } Coroutine$insertSession_g3losl$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertSession_g3losl$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertSession_g3losl$_0.prototype.constructor = Coroutine$insertSession_g3losl$_0; Coroutine$insertSession_g3losl$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$session.usUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(679, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$session.usUid = _newPk; this.state_0 = 3; continue; case 3: this.local$session.usLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertSession_g3losl$(this.local$session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$session.usUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.insertSession_g3losl$ = function (session_0, continuation_0, suspended) { var instance = new Coroutine$insertSession_g3losl$_0(this, session_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_ReplicateWrapper.prototype.findSessionsByPerson_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findSessionsByPerson_s8cxhz$(personUid, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findAllLocalSessionsLive = function () { return this._dao_0.findAllLocalSessionsLive(); }; UserSessionDao_ReplicateWrapper.prototype.findAllLocalSessionsAsync = function (continuation) { return this._dao_0.findAllLocalSessionsAsync(continuation); }; UserSessionDao_ReplicateWrapper.prototype.countAllLocalSessionsAsync_s8cxhz$ = function (maxDateOfBirth, continuation) { return this._dao_0.countAllLocalSessionsAsync_s8cxhz$(maxDateOfBirth, continuation); }; function Coroutine$endSession_liip7b$_0($this, sessionUid_0, newStatus_0, reason_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sessionUid = sessionUid_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; } Coroutine$endSession_liip7b$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endSession_liip7b$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endSession_liip7b$_0.prototype.constructor = Coroutine$endSession_liip7b$_0; Coroutine$endSession_liip7b$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.endSession_liip7b$(this.local$sessionUid, this.local$newStatus, this.local$reason, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.endSession_liip7b$ = function (sessionUid_0, newStatus_0, reason_0, continuation_0, suspended) { var instance = new Coroutine$endSession_liip7b$_0(this, sessionUid_0, newStatus_0, reason_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (sessionUid) { return this._dao_0.findByUidLive_s8cxhz$(sessionUid); }; function Coroutine$endOtherSessions_d2c2sj$_0($this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$exemptNodeId = exemptNodeId_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; this.local$changeTime = changeTime_0; } Coroutine$endOtherSessions_d2c2sj$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endOtherSessions_d2c2sj$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endOtherSessions_d2c2sj$_0.prototype.constructor = Coroutine$endOtherSessions_d2c2sj$_0; Coroutine$endOtherSessions_d2c2sj$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.endOtherSessions_d2c2sj$(this.local$personUid, this.local$exemptNodeId, this.local$newStatus, this.local$reason, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.endOtherSessions_d2c2sj$ = function (personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$endOtherSessions_d2c2sj$_0(this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_ReplicateWrapper.prototype.findActiveNodeIdsByPersonUids_gox9k8$ = function (personUids, continuation) { return this._dao_0.findActiveNodeIdsByPersonUids_gox9k8$(personUids, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findActiveNodesIdsByGroupUids_gox9k8$ = function (groupUids, continuation) { return this._dao_0.findActiveNodesIdsByGroupUids_gox9k8$(groupUids, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$ = function (clazzUids, continuation) { return this._dao_0.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$(clazzUids, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$ = function (schoolUids, continuation) { return this._dao_0.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$(schoolUids, continuation); }; UserSessionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao_ReplicateWrapper', interfaces: [UserSessionDao]}; function UserSessionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { UserSessionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$updateReplicationTrackers_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$updateReplicationTrackers_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackers_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackers_1.prototype.constructor = Coroutine$updateReplicationTrackers_1; Coroutine$updateReplicationTrackers_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateReplicationTrackers(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.updateReplicationTrackers = function (continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackers_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.prototype.constructor = Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateReplicationTrackersOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.updateReplicationTrackersOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertSession_g3losl$_1($this, session_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$session = session_0; } Coroutine$insertSession_g3losl$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertSession_g3losl$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertSession_g3losl$_1.prototype.constructor = Coroutine$insertSession_g3losl$_1; Coroutine$insertSession_g3losl$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertSession_g3losl$(this.local$session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.insertSession_g3losl$ = function (session_0, continuation_0, suspended) { var instance = new Coroutine$insertSession_g3losl$_1(this, session_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findSessionsByPerson_s8cxhz$_0($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findSessionsByPerson_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSessionsByPerson_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSessionsByPerson_s8cxhz$_0.prototype.constructor = Coroutine$findSessionsByPerson_s8cxhz$_0; Coroutine$findSessionsByPerson_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSessionsByPerson_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findSessionsByPerson_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findSessionsByPerson_s8cxhz$_0(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_Repo.prototype.findAllLocalSessionsLive = function () { var _result = this._dao.findAllLocalSessionsLive(); return _result; }; function Coroutine$findAllLocalSessionsAsync_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$findAllLocalSessionsAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllLocalSessionsAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllLocalSessionsAsync_0.prototype.constructor = Coroutine$findAllLocalSessionsAsync_0; Coroutine$findAllLocalSessionsAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllLocalSessionsAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findAllLocalSessionsAsync = function (continuation_0, suspended) { var instance = new Coroutine$findAllLocalSessionsAsync_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$countAllLocalSessionsAsync_s8cxhz$_0($this, maxDateOfBirth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$maxDateOfBirth = maxDateOfBirth_0; } Coroutine$countAllLocalSessionsAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countAllLocalSessionsAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countAllLocalSessionsAsync_s8cxhz$_0.prototype.constructor = Coroutine$countAllLocalSessionsAsync_s8cxhz$_0; Coroutine$countAllLocalSessionsAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.countAllLocalSessionsAsync_s8cxhz$(this.local$maxDateOfBirth, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.countAllLocalSessionsAsync_s8cxhz$ = function (maxDateOfBirth_0, continuation_0, suspended) { var instance = new Coroutine$countAllLocalSessionsAsync_s8cxhz$_0(this, maxDateOfBirth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$endSession_liip7b$_1($this, sessionUid_0, newStatus_0, reason_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sessionUid = sessionUid_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; } Coroutine$endSession_liip7b$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endSession_liip7b$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endSession_liip7b$_1.prototype.constructor = Coroutine$endSession_liip7b$_1; Coroutine$endSession_liip7b$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.endSession_liip7b$(this.local$sessionUid, this.local$newStatus, this.local$reason, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.endSession_liip7b$ = function (sessionUid_0, newStatus_0, reason_0, continuation_0, suspended) { var instance = new Coroutine$endSession_liip7b$_1(this, sessionUid_0, newStatus_0, reason_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_Repo.prototype.findByUidLive_s8cxhz$ = function (sessionUid) { var _result = this._dao.findByUidLive_s8cxhz$(sessionUid); return _result; }; function Coroutine$endOtherSessions_d2c2sj$_1($this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$exemptNodeId = exemptNodeId_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; this.local$changeTime = changeTime_0; } Coroutine$endOtherSessions_d2c2sj$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endOtherSessions_d2c2sj$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endOtherSessions_d2c2sj$_1.prototype.constructor = Coroutine$endOtherSessions_d2c2sj$_1; Coroutine$endOtherSessions_d2c2sj$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.endOtherSessions_d2c2sj$(this.local$personUid, this.local$exemptNodeId, this.local$newStatus, this.local$reason, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.endOtherSessions_d2c2sj$ = function (personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$endOtherSessions_d2c2sj$_1(this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0($this, personUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUids = personUids_0; } Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0.prototype.constructor = Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0; Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findActiveNodeIdsByPersonUids_gox9k8$(this.local$personUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findActiveNodeIdsByPersonUids_gox9k8$ = function (personUids_0, continuation_0, suspended) { var instance = new Coroutine$findActiveNodeIdsByPersonUids_gox9k8$_0(this, personUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0($this, groupUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupUids = groupUids_0; } Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0.prototype.constructor = Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0; Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findActiveNodesIdsByGroupUids_gox9k8$(this.local$groupUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findActiveNodesIdsByGroupUids_gox9k8$ = function (groupUids_0, continuation_0, suspended) { var instance = new Coroutine$findActiveNodesIdsByGroupUids_gox9k8$_0(this, groupUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0($this, clazzUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUids = clazzUids_0; } Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0.prototype.constructor = Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0; Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$(this.local$clazzUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$ = function (clazzUids_0, continuation_0, suspended) { var instance = new Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$_0(this, clazzUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0($this, schoolUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUids = schoolUids_0; } Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0.prototype.constructor = Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0; Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$(this.local$schoolUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$ = function (schoolUids_0, continuation_0, suspended) { var instance = new Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$_0(this, schoolUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao_Repo', interfaces: [UserSessionDao]}; function VerbDao_JdbcKt(_db) { VerbDao.call(this); this._db = _db; this._insertAdapterVerbEntity_upsert = new VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral(this._db); this._insertAdapterVerbEntity_ = new VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral(this._db); } function Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_161($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_161.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_161.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_161.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_161; Coroutine$replicateOnNewNode_s8cxhz$_161.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS vePk,\n | ? AS veDestination\n | FROM VerbEntity\n | WHERE VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = ?), 0) \n | /*psql ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS vePk,\n | ? AS veDestination\n | FROM VerbEntity\n | WHERE VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = ?), 0) \n | ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, VerbDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_161(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda; Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_164($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_164.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_164.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_164.prototype.constructor = Coroutine$replicateOnChange_164; Coroutine$replicateOnChange_164.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS veUid,\n | UserSession.usClientNodeId AS veDestination\n | FROM ChangeLog\n | JOIN VerbEntity\n | ON ChangeLog.chTableId = 62\n | AND ChangeLog.chEntityPk = VerbEntity.verbUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS veUid,\n | UserSession.usClientNodeId AS veDestination\n | FROM ChangeLog\n | JOIN VerbEntity\n | ON ChangeLog.chTableId = 62\n | AND ChangeLog.chEntityPk = VerbEntity.verbUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, VerbDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_164(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function VerbDao_JdbcKt$findByUrl$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_verbUid = _resultSet.getLong_61zpoe$('verbUid'); var tmp_urlId = _resultSet.getString_61zpoe$('urlId'); var tmp_verbInActive = _resultSet.getBoolean_61zpoe$('verbInActive'); var tmp_verbMasterChangeSeqNum = _resultSet.getLong_61zpoe$('verbMasterChangeSeqNum'); var tmp_verbLocalChangeSeqNum = _resultSet.getLong_61zpoe$('verbLocalChangeSeqNum'); var tmp_verbLastChangedBy = _resultSet.getInt_61zpoe$('verbLastChangedBy'); var tmp_verbLct = _resultSet.getLong_61zpoe$('verbLct'); var _entity = new VerbEntity(); _entity.verbUid = tmp_verbUid; _entity.urlId = tmp_urlId; _entity.verbInActive = tmp_verbInActive; _entity.verbMasterChangeSeqNum = tmp_verbMasterChangeSeqNum; _entity.verbLocalChangeSeqNum = tmp_verbLocalChangeSeqNum; _entity.verbLastChangedBy = tmp_verbLastChangedBy; _entity.verbLct = tmp_verbLct; closure$_result.v = _entity; }return Unit; }; } function VerbDao_JdbcKt$findByUrl$lambda(closure$urlId, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$urlId); useResults(_stmt.executeQuery(), VerbDao_JdbcKt$findByUrl$lambda$lambda(closure$_result)); return Unit; }; } VerbDao_JdbcKt.prototype.findByUrl_pdl1vj$ = function (urlId) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, VerbEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM VerbEntity WHERE urlId = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * FROM VerbEntity WHERE urlId = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, VerbDao_JdbcKt$findByUrl$lambda(urlId, _result)); return _result.v; }; function VerbDao_JdbcKt$findByUidList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var _entity = _resultSet.getLong_za3lpa$(1); closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$VerbDao_JdbcKt$findByUidList$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findByUidList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findByUidList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findByUidList$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findByUidList$lambda; Coroutine$VerbDao_JdbcKt$findByUidList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$VerbDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findByUidList$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findByUidList$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findByUidList$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$findByUidList_1($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$uidList = uidList_0; } Coroutine$findByUidList_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidList_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidList_1.prototype.constructor = Coroutine$findByUidList_1; Coroutine$findByUidList_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT verbUid FROM VerbEntity WHERE verbUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT verbUid FROM VerbEntity WHERE verbUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, VerbDao_JdbcKt$findByUidList$lambda(this.$this, this.local$uidList, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.findByUidList = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$findByUidList_1(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceList_2($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_2.prototype.constructor = Coroutine$replaceList_2; Coroutine$replaceList_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterVerbEntity_upsert.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.replaceList = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_2(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function VerbDao_JdbcKt$findAllVerbsAscList$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_verbUid = _resultSet.getLong_61zpoe$('verbUid'); var tmp_urlId = _resultSet.getString_61zpoe$('urlId'); var tmp_display = _resultSet.getString_61zpoe$('display'); var _entity = new VerbDisplay(); _entity.verbUid = tmp_verbUid; _entity.urlId = tmp_urlId; _entity.display = tmp_display; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function VerbDao_JdbcKt$findAllVerbsAscList$lambda(this$VerbDao_JdbcKt, closure$uidList, closure$_result) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, this$VerbDao_JdbcKt._db.createArrayOf_v4bnj2$(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); useResults(_stmt.executeQuery(), VerbDao_JdbcKt$findAllVerbsAscList$lambda$lambda(closure$_result)); return Unit; }; } VerbDao_JdbcKt.prototype.findAllVerbsAscList_gox9k8$ = function (uidList) { var _result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display\n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | XLangMapEntry.verbLangMapUid NOT IN (?)\n '), true, void 0, void 0, trimMargin('\n |SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display\n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | XLangMapEntry.verbLangMapUid NOT IN (?)\n |')); prepareAndUseStatement(this._db, _stmtConfig, VerbDao_JdbcKt$findAllVerbsAscList$lambda(this, uidList, _result)); return _result.v; }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral(this$VerbDao_JdbcKt, closure$uidList) { this.this$VerbDao_JdbcKt = this$VerbDao_JdbcKt; this.closure$uidList = closure$uidList; DoorDataSourceFactory.call(this); } function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_verbUid = _resultSet.getLong_61zpoe$('verbUid'); var tmp_urlId = _resultSet.getString_61zpoe$('urlId'); var tmp_display = _resultSet.getString_61zpoe$('display'); var _entity = new VerbDisplay(); _entity.verbUid = tmp_verbUid; _entity.urlId = tmp_urlId; _entity.display = tmp_display; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$VerbDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display ASC) LIMIT ? OFFSET ? \n '), true, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display ASC) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, _stmtConfig, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(this.local$this$VerbDao_JdbcKt, this.local$closure$uidList, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList, _limit, _offset)); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$VerbDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$_liveResult = void 0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display ASC) \n '), true, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display ASC) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, _stmtConfig, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(this.local$this$VerbDao_JdbcKt, this.local$closure$uidList, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList)); }; VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; VerbDao_JdbcKt.prototype.findAllVerbsAsc_gox9k8$ = function (uidList) { var _result = new VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral(this, uidList); return _result; }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral(this$VerbDao_JdbcKt, closure$uidList) { this.this$VerbDao_JdbcKt = this$VerbDao_JdbcKt; this.closure$uidList = closure$uidList; DoorDataSourceFactory.call(this); } function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { while (_resultSet.next()) { var tmp_verbUid = _resultSet.getLong_61zpoe$('verbUid'); var tmp_urlId = _resultSet.getString_61zpoe$('urlId'); var tmp_display = _resultSet.getString_61zpoe$('display'); var _entity = new VerbDisplay(); _entity.verbUid = tmp_verbUid; _entity.urlId = tmp_urlId; _entity.display = tmp_display; closure$_liveResult.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$VerbDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_liveResult = void 0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display DESC) LIMIT ? OFFSET ? \n '), true, void 0, void 0, trimMargin('\n |SELECT * FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display DESC) LIMIT ? OFFSET ? \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, _stmtConfig, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(this.local$this$VerbDao_JdbcKt, this.local$closure$uidList, this.local$closure$_limit, this.local$closure$_offset, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return toList(this.local$_liveResult.v); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new DoorLiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList, _limit, _offset)); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda$lambda(closure$_liveResult) { return function (_resultSet) { if (_resultSet.next()) { var _entity = _resultSet.getInt_za3lpa$(1); closure$_liveResult.v = _entity; }return Unit; }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_liveResult_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_liveResult = closure$_liveResult_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$VerbDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda$lambda(this.local$closure$_liveResult)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_liveResult_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_liveResult_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$_liveResult = void 0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_liveResult = {v: 0}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display DESC) \n '), true, void 0, void 0, trimMargin('\n |SELECT COUNT(*) FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display DESC) \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, _stmtConfig, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(this.local$this$VerbDao_JdbcKt, this.local$closure$uidList, this.local$_liveResult), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_liveResult.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype.getLength = function () { return new DoorLiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList)); }; VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DoorDataSourceFactory]}; VerbDao_JdbcKt.prototype.findAllVerbsDesc_gox9k8$ = function (uidList) { var _result = new VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral(this, uidList); return _result; }; VerbDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterVerbEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_170($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_170.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_170.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_170.prototype.constructor = Coroutine$insertAsync_170; Coroutine$insertAsync_170.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterVerbEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_170(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterVerbEntity_.insertList_4ezy5m$(entityList); }; function VerbDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.urlId); _stmt.setBoolean_fzusl$(2, _entity.verbInActive); _stmt.setLong_6svq3l$(3, _entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.verbLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.verbLct); _stmt.setLong_6svq3l$(7, _entity.verbUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } VerbDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE VerbEntity SET urlId = ?, verbInActive = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, verbLct = ? WHERE verbUid = ?'; prepareAndUseStatement_0(this._db, _sql, VerbDao_JdbcKt$updateList$lambda(entityList)); }; function VerbDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.urlId); _stmt.setBoolean_fzusl$(2, closure$entity.verbInActive); _stmt.setLong_6svq3l$(3, closure$entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.verbLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.verbLct); _stmt.setLong_6svq3l$(7, closure$entity.verbUid); return _stmt.executeUpdate(); }; } VerbDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE VerbEntity SET urlId = ?, verbInActive = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, verbLct = ? WHERE verbUid = ?'; prepareAndUseStatement_0(this._db, _sql, VerbDao_JdbcKt$update$lambda(entity)); }; function VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT OR REPLACE INTO VerbEntity (verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING verbUid'; } else tmp$ = ''; return "INSERT INTO VerbEntity (verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES(COALESCE(?,nextval('VerbEntity_verbUid_seq')), ?, ?, ?, ?, ?, ?) ON CONFLICT (verbUid) DO UPDATE SET urlId = excluded.urlId,verbInActive = excluded.verbInActive,verbMasterChangeSeqNum = excluded.verbMasterChangeSeqNum,verbLocalChangeSeqNum = excluded.verbLocalChangeSeqNum,verbLastChangedBy = excluded.verbLastChangedBy,verbLct = excluded.verbLct" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.verbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.verbUid); } stmt.setString_vqvrqt$(2, entity.urlId); stmt.setBoolean_fzusl$(3, entity.verbInActive); stmt.setLong_6svq3l$(4, entity.verbMasterChangeSeqNum); stmt.setLong_6svq3l$(5, entity.verbLocalChangeSeqNum); stmt.setInt_vux9f0$(6, entity.verbLastChangedBy); stmt.setLong_6svq3l$(7, entity.verbLct); }; VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO VerbEntity (verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING verbUid'; } else tmp$ = ''; return "INSERT INTO VerbEntity (verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES(COALESCE(?,nextval('VerbEntity_verbUid_seq')), ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.verbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.verbUid); } stmt.setString_vqvrqt$(2, entity.urlId); stmt.setBoolean_fzusl$(3, entity.verbInActive); stmt.setLong_6svq3l$(4, entity.verbMasterChangeSeqNum); stmt.setLong_6svq3l$(5, entity.verbLocalChangeSeqNum); stmt.setInt_vux9f0$(6, entity.verbLastChangedBy); stmt.setLong_6svq3l$(7, entity.verbLct); }; VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; VerbDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao_JdbcKt', interfaces: [VerbDao]}; function VerbDao_ReplicateWrapper(_db, _dao) { VerbDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_162($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_162.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_162.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_162.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_162; Coroutine$replicateOnNewNode_s8cxhz$_162.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_162(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_165($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_165.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_165.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_165.prototype.constructor = Coroutine$replicateOnChange_165; Coroutine$replicateOnChange_165.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_165(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_ReplicateWrapper.prototype.findByUrl_pdl1vj$ = function (urlId) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.findByUidList = function (uidList, continuation) { return this._dao_0.findByUidList(uidList, continuation); }; function Coroutine$replaceList_3($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$replaceList_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_3.prototype.constructor = Coroutine$replaceList_3; Coroutine$replaceList_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.verbUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(62, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.verbUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.verbLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceList(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.replaceList = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_3(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_ReplicateWrapper.prototype.findAllVerbsAscList_gox9k8$ = function (uidList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.findAllVerbsAsc_gox9k8$ = function (uidList) { return this._dao_0.findAllVerbsAsc_gox9k8$(uidList); }; VerbDao_ReplicateWrapper.prototype.findAllVerbsDesc_gox9k8$ = function (uidList) { return this._dao_0.findAllVerbsDesc_gox9k8$(uidList); }; VerbDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_171($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_171.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_171.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_171.prototype.constructor = Coroutine$insertAsync_171; Coroutine$insertAsync_171.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.verbUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(62, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.verbUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.verbLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.verbUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_171(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao_ReplicateWrapper', interfaces: [VerbDao]}; function VerbDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { VerbDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_163($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_163.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_163.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_163.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_163; Coroutine$replicateOnNewNode_s8cxhz$_163.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_163(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_166($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_166.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_166.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_166.prototype.constructor = Coroutine$replicateOnChange_166; Coroutine$replicateOnChange_166.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_166(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_Repo.prototype.findByUrl_pdl1vj$ = function (urlId) { var _result = this._dao.findByUrl_pdl1vj$(urlId); return _result; }; function Coroutine$findByUidList_2($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$findByUidList_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidList_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidList_2.prototype.constructor = Coroutine$findByUidList_2; Coroutine$findByUidList_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidList(this.local$uidList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.findByUidList = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$findByUidList_2(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceList_4($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_4.prototype.constructor = Coroutine$replaceList_4; Coroutine$replaceList_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceList(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.replaceList = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_4(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_Repo.prototype.findAllVerbsAscList_gox9k8$ = function (uidList) { var _result = this._dao.findAllVerbsAscList_gox9k8$(uidList); return _result; }; VerbDao_Repo.prototype.findAllVerbsAsc_gox9k8$ = function (uidList) { var _result = this._dao.findAllVerbsAsc_gox9k8$(uidList); return _result; }; VerbDao_Repo.prototype.findAllVerbsDesc_gox9k8$ = function (uidList) { var _result = this._dao.findAllVerbsDesc_gox9k8$(uidList); return _result; }; VerbDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_172($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_172.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_172.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_172.prototype.constructor = Coroutine$insertAsync_172; Coroutine$insertAsync_172.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_172(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; VerbDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; VerbDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; VerbDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao_Repo', interfaces: [VerbDao]}; function XLangMapEntryDao_JdbcKt(_db) { XLangMapEntryDao.call(this); this._db = _db; this._insertAdapterXLangMapEntry_ = new XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral(this._db); } function Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_164($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_164.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_164.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_164.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_164; Coroutine$replicateOnNewNode_s8cxhz$_164.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmePk,\n | ? AS xlmeDestination\n | FROM XLangMapEntry\n | JOIN UserSession ON UserSession.usClientNodeId = ?\n | --notpsql \n | WHERE XLangMapEntry.statementLangMapLct != COALESCE(\n | (SELECT xlmeVersionId\n | FROM XLangMapEntryReplicate\n | WHERE xlmePk = XLangMapEntry.statementLangMapUid\n | AND xlmeDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = (SELECT XLangMapEntry.statementLangMapLct\n | FROM XLangmapEntry\n | WHERE XLangmapEntry.statementLangMapUid = EXCLUDED.xlmePk)\n | != XLangMapEntryReplicate.xlmeVersionId\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmePk,\n | ? AS xlmeDestination\n | FROM XLangMapEntry\n | JOIN UserSession ON UserSession.usClientNodeId = ?\n | ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = (SELECT XLangMapEntry.statementLangMapLct\n | FROM XLangmapEntry\n | WHERE XLangmapEntry.statementLangMapUid = EXCLUDED.xlmePk)\n | != XLangMapEntryReplicate.xlmeVersionId\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_164(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XLangMapEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_167($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_167.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_167.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_167.prototype.constructor = Coroutine$replicateOnChange_167; Coroutine$replicateOnChange_167.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmeUid,\n | UserSession.usClientNodeId AS xlmeDestination\n | FROM ChangeLog\n | JOIN XLangMapEntry\n | ON ChangeLog.chTableId = 74\n | AND ChangeLog.chEntityPk = XLangMapEntry.statementLangMapUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XLangMapEntry.statementLangMapLct != COALESCE(\n | (SELECT xlmeVersionId\n | FROM XLangMapEntryReplicate\n | WHERE xlmePk = XLangMapEntry.statementLangMapUid\n | AND xlmeDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmeUid,\n | UserSession.usClientNodeId AS xlmeDestination\n | FROM ChangeLog\n | JOIN XLangMapEntry\n | ON ChangeLog.chTableId = 74\n | AND ChangeLog.chEntityPk = XLangMapEntry.statementLangMapUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XLangMapEntry.statementLangMapLct != COALESCE(\n | (SELECT xlmeVersionId\n | FROM XLangMapEntryReplicate\n | WHERE xlmePk = XLangMapEntry.statementLangMapUid\n | AND xlmeDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, XLangMapEntryDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_167(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda$lambda(closure$_result) { return function (_resultSet) { while (_resultSet.next()) { var tmp_verbLangMapUid = _resultSet.getLong_61zpoe$('verbLangMapUid'); var tmp_objectLangMapUid = _resultSet.getLong_61zpoe$('objectLangMapUid'); var tmp_languageLangMapUid = _resultSet.getLong_61zpoe$('languageLangMapUid'); var tmp_languageVariantLangMapUid = _resultSet.getLong_61zpoe$('languageVariantLangMapUid'); var tmp_valueLangMap = _resultSet.getString_61zpoe$('valueLangMap'); var tmp_statementLangMapMasterCsn = _resultSet.getInt_61zpoe$('statementLangMapMasterCsn'); var tmp_statementLangMapLocalCsn = _resultSet.getInt_61zpoe$('statementLangMapLocalCsn'); var tmp_statementLangMapLcb = _resultSet.getInt_61zpoe$('statementLangMapLcb'); var tmp_statementLangMapLct = _resultSet.getLong_61zpoe$('statementLangMapLct'); var tmp_statementLangMapUid = _resultSet.getLong_61zpoe$('statementLangMapUid'); var _entity = new XLangMapEntry(); _entity.verbLangMapUid = tmp_verbLangMapUid; _entity.objectLangMapUid = tmp_objectLangMapUid; _entity.languageLangMapUid = tmp_languageLangMapUid; _entity.languageVariantLangMapUid = tmp_languageVariantLangMapUid; _entity.valueLangMap = tmp_valueLangMap; _entity.statementLangMapMasterCsn = tmp_statementLangMapMasterCsn; _entity.statementLangMapLocalCsn = tmp_statementLangMapLocalCsn; _entity.statementLangMapLcb = tmp_statementLangMapLcb; _entity.statementLangMapLct = tmp_statementLangMapLct; _entity.statementLangMapUid = tmp_statementLangMapUid; closure$_result.v.add_11rb$(_entity); } return Unit; }; } function Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(this$XLangMapEntryDao_JdbcKt_0, closure$ids_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$XLangMapEntryDao_JdbcKt = this$XLangMapEntryDao_JdbcKt_0; this.local$closure$ids = closure$ids_0; this.local$closure$_result = closure$_result_0; this.local$_stmt = _stmt_0; } Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.prototype.constructor = Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda; Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, this.local$this$XLangMapEntryDao_JdbcKt._db.createArrayOf_v4bnj2$(this.local$_stmt.getConnection(), 'INTEGER', copyToArray(this.local$closure$ids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda$lambda(this.local$closure$_result)); default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(this$XLangMapEntryDao_JdbcKt_0, closure$ids_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(this$XLangMapEntryDao_JdbcKt_0, closure$ids_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$getValuesWithListOfId($this, ids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$ids = ids_0; } Coroutine$getValuesWithListOfId.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getValuesWithListOfId.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getValuesWithListOfId.prototype.constructor = Coroutine$getValuesWithListOfId; Coroutine$getValuesWithListOfId.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: ArrayList_init()}; var _stmtConfig = new PreparedStatementConfig('SELECT * FROM XLangMapEntry WHERE objectLangMapUid IN (?)', true, void 0, void 0, trimMargin('\n |SELECT * FROM XLangMapEntry WHERE objectLangMapUid IN (?)\n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(this.$this, this.local$ids, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.getValuesWithListOfId = function (ids_0, continuation_0, suspended) { var instance = new Coroutine$getValuesWithListOfId(this, ids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_verbLangMapUid = _resultSet.getLong_61zpoe$('verbLangMapUid'); var tmp_objectLangMapUid = _resultSet.getLong_61zpoe$('objectLangMapUid'); var tmp_languageLangMapUid = _resultSet.getLong_61zpoe$('languageLangMapUid'); var tmp_languageVariantLangMapUid = _resultSet.getLong_61zpoe$('languageVariantLangMapUid'); var tmp_valueLangMap = _resultSet.getString_61zpoe$('valueLangMap'); var tmp_statementLangMapMasterCsn = _resultSet.getInt_61zpoe$('statementLangMapMasterCsn'); var tmp_statementLangMapLocalCsn = _resultSet.getInt_61zpoe$('statementLangMapLocalCsn'); var tmp_statementLangMapLcb = _resultSet.getInt_61zpoe$('statementLangMapLcb'); var tmp_statementLangMapLct = _resultSet.getLong_61zpoe$('statementLangMapLct'); var tmp_statementLangMapUid = _resultSet.getLong_61zpoe$('statementLangMapUid'); var _entity = new XLangMapEntry(); _entity.verbLangMapUid = tmp_verbLangMapUid; _entity.objectLangMapUid = tmp_objectLangMapUid; _entity.languageLangMapUid = tmp_languageLangMapUid; _entity.languageVariantLangMapUid = tmp_languageVariantLangMapUid; _entity.valueLangMap = tmp_valueLangMap; _entity.statementLangMapMasterCsn = tmp_statementLangMapMasterCsn; _entity.statementLangMapLocalCsn = tmp_statementLangMapLocalCsn; _entity.statementLangMapLcb = tmp_statementLangMapLcb; _entity.statementLangMapLct = tmp_statementLangMapLct; _entity.statementLangMapUid = tmp_statementLangMapUid; closure$_result.v = _entity; }return Unit; }; } function XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda(closure$verbUid, closure$langMapUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$verbUid); _stmt.setLong_6svq3l$(2, closure$langMapUid); useResults(_stmt.executeQuery(), XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda$lambda(closure$_result)); return Unit; }; } XLangMapEntryDao_JdbcKt.prototype.getXLangMapFromVerb_3pjtqy$ = function (verbUid, langMapUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, XLangMapEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM XLangMapEntry WHERE \n | verbLangMapUid = ? AND languageLangMapUid = ? LIMIT 1\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM XLangMapEntry WHERE \n | verbLangMapUid = ? AND languageLangMapUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda(verbUid, langMapUid, _result)); return _result.v; }; function XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_verbLangMapUid = _resultSet.getLong_61zpoe$('verbLangMapUid'); var tmp_objectLangMapUid = _resultSet.getLong_61zpoe$('objectLangMapUid'); var tmp_languageLangMapUid = _resultSet.getLong_61zpoe$('languageLangMapUid'); var tmp_languageVariantLangMapUid = _resultSet.getLong_61zpoe$('languageVariantLangMapUid'); var tmp_valueLangMap = _resultSet.getString_61zpoe$('valueLangMap'); var tmp_statementLangMapMasterCsn = _resultSet.getInt_61zpoe$('statementLangMapMasterCsn'); var tmp_statementLangMapLocalCsn = _resultSet.getInt_61zpoe$('statementLangMapLocalCsn'); var tmp_statementLangMapLcb = _resultSet.getInt_61zpoe$('statementLangMapLcb'); var tmp_statementLangMapLct = _resultSet.getLong_61zpoe$('statementLangMapLct'); var tmp_statementLangMapUid = _resultSet.getLong_61zpoe$('statementLangMapUid'); var _entity = new XLangMapEntry(); _entity.verbLangMapUid = tmp_verbLangMapUid; _entity.objectLangMapUid = tmp_objectLangMapUid; _entity.languageLangMapUid = tmp_languageLangMapUid; _entity.languageVariantLangMapUid = tmp_languageVariantLangMapUid; _entity.valueLangMap = tmp_valueLangMap; _entity.statementLangMapMasterCsn = tmp_statementLangMapMasterCsn; _entity.statementLangMapLocalCsn = tmp_statementLangMapLocalCsn; _entity.statementLangMapLcb = tmp_statementLangMapLcb; _entity.statementLangMapLct = tmp_statementLangMapLct; _entity.statementLangMapUid = tmp_statementLangMapUid; closure$_result.v = _entity; }return Unit; }; } function XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda(closure$objectUid, closure$langMapUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$objectUid); _stmt.setLong_6svq3l$(2, closure$langMapUid); useResults(_stmt.executeQuery(), XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda$lambda(closure$_result)); return Unit; }; } XLangMapEntryDao_JdbcKt.prototype.getXLangMapFromObject_3pjtqy$ = function (objectUid, langMapUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, XLangMapEntry) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |SELECT * FROM XLangMapEntry WHERE \n | objectLangMapUid = ? AND languageLangMapUid = ? LIMIT 1\n '), void 0, void 0, void 0, trimMargin('\n |SELECT * FROM XLangMapEntry WHERE \n | objectLangMapUid = ? AND languageLangMapUid = ? LIMIT 1\n |')); prepareAndUseStatement(this._db, _stmtConfig, XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda(objectUid, langMapUid, _result)); return _result.v; }; XLangMapEntryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterXLangMapEntry_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_173($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_173.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_173.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_173.prototype.constructor = Coroutine$insertAsync_173; Coroutine$insertAsync_173.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterXLangMapEntry_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_173(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterXLangMapEntry_.insertList_4ezy5m$(entityList); }; function XLangMapEntryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.verbLangMapUid); _stmt.setLong_6svq3l$(2, _entity.objectLangMapUid); _stmt.setLong_6svq3l$(3, _entity.languageLangMapUid); _stmt.setLong_6svq3l$(4, _entity.languageVariantLangMapUid); _stmt.setString_vqvrqt$(5, _entity.valueLangMap); _stmt.setInt_vux9f0$(6, _entity.statementLangMapMasterCsn); _stmt.setInt_vux9f0$(7, _entity.statementLangMapLocalCsn); _stmt.setInt_vux9f0$(8, _entity.statementLangMapLcb); _stmt.setLong_6svq3l$(9, _entity.statementLangMapLct); _stmt.setLong_6svq3l$(10, _entity.statementLangMapUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } XLangMapEntryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE XLangMapEntry SET verbLangMapUid = ?, objectLangMapUid = ?, languageLangMapUid = ?, languageVariantLangMapUid = ?, valueLangMap = ?, statementLangMapMasterCsn = ?, statementLangMapLocalCsn = ?, statementLangMapLcb = ?, statementLangMapLct = ? WHERE statementLangMapUid = ?'; prepareAndUseStatement_0(this._db, _sql, XLangMapEntryDao_JdbcKt$updateList$lambda(entityList)); }; function XLangMapEntryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.verbLangMapUid); _stmt.setLong_6svq3l$(2, closure$entity.objectLangMapUid); _stmt.setLong_6svq3l$(3, closure$entity.languageLangMapUid); _stmt.setLong_6svq3l$(4, closure$entity.languageVariantLangMapUid); _stmt.setString_vqvrqt$(5, closure$entity.valueLangMap); _stmt.setInt_vux9f0$(6, closure$entity.statementLangMapMasterCsn); _stmt.setInt_vux9f0$(7, closure$entity.statementLangMapLocalCsn); _stmt.setInt_vux9f0$(8, closure$entity.statementLangMapLcb); _stmt.setLong_6svq3l$(9, closure$entity.statementLangMapLct); _stmt.setLong_6svq3l$(10, closure$entity.statementLangMapUid); return _stmt.executeUpdate(); }; } XLangMapEntryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE XLangMapEntry SET verbLangMapUid = ?, objectLangMapUid = ?, languageLangMapUid = ?, languageVariantLangMapUid = ?, valueLangMap = ?, statementLangMapMasterCsn = ?, statementLangMapLocalCsn = ?, statementLangMapLcb = ?, statementLangMapLct = ? WHERE statementLangMapUid = ?'; prepareAndUseStatement_0(this._db, _sql, XLangMapEntryDao_JdbcKt$update$lambda(entity)); }; function XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO XLangMapEntry (verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING statementLangMapUid'; } else tmp$ = ''; return "INSERT INTO XLangMapEntry (verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, COALESCE(?,nextval('XLangMapEntry_statementLangMapUid_seq')))" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.verbLangMapUid); stmt.setLong_6svq3l$(2, entity.objectLangMapUid); stmt.setLong_6svq3l$(3, entity.languageLangMapUid); stmt.setLong_6svq3l$(4, entity.languageVariantLangMapUid); stmt.setString_vqvrqt$(5, entity.valueLangMap); stmt.setInt_vux9f0$(6, entity.statementLangMapMasterCsn); stmt.setInt_vux9f0$(7, entity.statementLangMapLocalCsn); stmt.setInt_vux9f0$(8, entity.statementLangMapLcb); stmt.setLong_6svq3l$(9, entity.statementLangMapLct); if (equals(entity.statementLangMapUid, L0)) { stmt.setObject_6t2rgq$(10, null); } else { stmt.setLong_6svq3l$(10, entity.statementLangMapUid); } }; XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; XLangMapEntryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao_JdbcKt', interfaces: [XLangMapEntryDao]}; function XLangMapEntryDao_ReplicateWrapper(_db, _dao) { XLangMapEntryDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_165($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_165.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_165.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_165.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_165; Coroutine$replicateOnNewNode_s8cxhz$_165.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_165(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_168($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_168.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_168.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_168.prototype.constructor = Coroutine$replicateOnChange_168; Coroutine$replicateOnChange_168.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_168(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_ReplicateWrapper.prototype.getValuesWithListOfId = function (ids, continuation) { return this._dao_0.getValuesWithListOfId(ids, continuation); }; XLangMapEntryDao_ReplicateWrapper.prototype.getXLangMapFromVerb_3pjtqy$ = function (verbUid, langMapUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.getXLangMapFromObject_3pjtqy$ = function (objectUid, langMapUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_174($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_174.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_174.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_174.prototype.constructor = Coroutine$insertAsync_174; Coroutine$insertAsync_174.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.statementLangMapUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(74, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.statementLangMapUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.statementLangMapLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.statementLangMapUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_174(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao_ReplicateWrapper', interfaces: [XLangMapEntryDao]}; function XLangMapEntryDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { XLangMapEntryDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_166($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_166.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_166.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_166.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_166; Coroutine$replicateOnNewNode_s8cxhz$_166.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_166(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_169($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_169.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_169.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_169.prototype.constructor = Coroutine$replicateOnChange_169; Coroutine$replicateOnChange_169.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_169(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getValuesWithListOfId_0($this, ids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ids = ids_0; } Coroutine$getValuesWithListOfId_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getValuesWithListOfId_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getValuesWithListOfId_0.prototype.constructor = Coroutine$getValuesWithListOfId_0; Coroutine$getValuesWithListOfId_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getValuesWithListOfId(this.local$ids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.getValuesWithListOfId = function (ids_0, continuation_0, suspended) { var instance = new Coroutine$getValuesWithListOfId_0(this, ids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_Repo.prototype.getXLangMapFromVerb_3pjtqy$ = function (verbUid, langMapUid) { var _result = this._dao.getXLangMapFromVerb_3pjtqy$(verbUid, langMapUid); return _result; }; XLangMapEntryDao_Repo.prototype.getXLangMapFromObject_3pjtqy$ = function (objectUid, langMapUid) { var _result = this._dao.getXLangMapFromObject_3pjtqy$(objectUid, langMapUid); return _result; }; XLangMapEntryDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_175($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_175.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_175.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_175.prototype.constructor = Coroutine$insertAsync_175; Coroutine$insertAsync_175.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_175(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; XLangMapEntryDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; XLangMapEntryDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; XLangMapEntryDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao_Repo', interfaces: [XLangMapEntryDao]}; function XObjectDao_JdbcKt(_db) { XObjectDao.call(this); this._db = _db; this._insertAdapterXObjectEntity_ = new XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral(this._db); } function Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XObjectDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_167($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_167.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_167.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_167.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_167; Coroutine$replicateOnNewNode_s8cxhz$_167.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoePk,\n | ? AS xoeDestination\n | FROM XObjectEntity\n | WHERE XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = ?), 0) \n | /*psql ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoePk,\n | ? AS xoeDestination\n | FROM XObjectEntity\n | WHERE XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = ?), 0) \n | ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, XObjectDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_167(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda; Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _numUpdates = this.result_0; return Unit; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XObjectDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_170($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_170.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_170.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_170.prototype.constructor = Coroutine$replicateOnChange_170; Coroutine$replicateOnChange_170.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _stmtConfig = new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoeUid,\n | UserSession.usClientNodeId AS xoeDestination\n | FROM ChangeLog\n | JOIN XObjectEntity\n | ON ChangeLog.chTableId = 64\n | AND ChangeLog.chEntityPk = XObjectEntity.xObjectUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoeUid,\n | UserSession.usClientNodeId AS xoeDestination\n | FROM ChangeLog\n | JOIN XObjectEntity\n | ON ChangeLog.chTableId = 64\n | AND ChangeLog.chEntityPk = XObjectEntity.xObjectUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | \n | \n |')); this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, _stmtConfig, XObjectDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_170(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function XObjectDao_JdbcKt$findByObjectId$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_objectType = _resultSet.getString_61zpoe$('objectType'); var tmp_objectId = _resultSet.getString_61zpoe$('objectId'); var tmp_definitionType = _resultSet.getString_61zpoe$('definitionType'); var tmp_interactionType = _resultSet.getString_61zpoe$('interactionType'); var tmp_correctResponsePattern = _resultSet.getString_61zpoe$('correctResponsePattern'); var tmp_objectContentEntryUid = _resultSet.getLong_61zpoe$('objectContentEntryUid'); var tmp_objectStatementRefUid = _resultSet.getLong_61zpoe$('objectStatementRefUid'); var tmp_xObjectMasterChangeSeqNum = _resultSet.getLong_61zpoe$('xObjectMasterChangeSeqNum'); var tmp_xObjectocalChangeSeqNum = _resultSet.getLong_61zpoe$('xObjectocalChangeSeqNum'); var tmp_xObjectLastChangedBy = _resultSet.getInt_61zpoe$('xObjectLastChangedBy'); var tmp_xObjectLct = _resultSet.getLong_61zpoe$('xObjectLct'); var _entity = XObjectEntity_init(); _entity.xObjectUid = tmp_xObjectUid; _entity.objectType = tmp_objectType; _entity.objectId = tmp_objectId; _entity.definitionType = tmp_definitionType; _entity.interactionType = tmp_interactionType; _entity.correctResponsePattern = tmp_correctResponsePattern; _entity.objectContentEntryUid = tmp_objectContentEntryUid; _entity.objectStatementRefUid = tmp_objectStatementRefUid; _entity.xObjectMasterChangeSeqNum = tmp_xObjectMasterChangeSeqNum; _entity.xObjectocalChangeSeqNum = tmp_xObjectocalChangeSeqNum; _entity.xObjectLastChangedBy = tmp_xObjectLastChangedBy; _entity.xObjectLct = tmp_xObjectLct; closure$_result.v = _entity; }return Unit; }; } function XObjectDao_JdbcKt$findByObjectId$lambda(closure$id, closure$_result) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$id); useResults(_stmt.executeQuery(), XObjectDao_JdbcKt$findByObjectId$lambda$lambda(closure$_result)); return Unit; }; } XObjectDao_JdbcKt.prototype.findByObjectId = function (id) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, XObjectEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from XObjectEntity WHERE objectId = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * from XObjectEntity WHERE objectId = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, XObjectDao_JdbcKt$findByObjectId$lambda(id, _result)); return _result.v; }; function XObjectDao_JdbcKt$findByXobjectUid$lambda$lambda(closure$_result) { return function (_resultSet) { if (_resultSet.next()) { var tmp_xObjectUid = _resultSet.getLong_61zpoe$('xObjectUid'); var tmp_objectType = _resultSet.getString_61zpoe$('objectType'); var tmp_objectId = _resultSet.getString_61zpoe$('objectId'); var tmp_definitionType = _resultSet.getString_61zpoe$('definitionType'); var tmp_interactionType = _resultSet.getString_61zpoe$('interactionType'); var tmp_correctResponsePattern = _resultSet.getString_61zpoe$('correctResponsePattern'); var tmp_objectContentEntryUid = _resultSet.getLong_61zpoe$('objectContentEntryUid'); var tmp_objectStatementRefUid = _resultSet.getLong_61zpoe$('objectStatementRefUid'); var tmp_xObjectMasterChangeSeqNum = _resultSet.getLong_61zpoe$('xObjectMasterChangeSeqNum'); var tmp_xObjectocalChangeSeqNum = _resultSet.getLong_61zpoe$('xObjectocalChangeSeqNum'); var tmp_xObjectLastChangedBy = _resultSet.getInt_61zpoe$('xObjectLastChangedBy'); var tmp_xObjectLct = _resultSet.getLong_61zpoe$('xObjectLct'); var _entity = XObjectEntity_init(); _entity.xObjectUid = tmp_xObjectUid; _entity.objectType = tmp_objectType; _entity.objectId = tmp_objectId; _entity.definitionType = tmp_definitionType; _entity.interactionType = tmp_interactionType; _entity.correctResponsePattern = tmp_correctResponsePattern; _entity.objectContentEntryUid = tmp_objectContentEntryUid; _entity.objectStatementRefUid = tmp_objectStatementRefUid; _entity.xObjectMasterChangeSeqNum = tmp_xObjectMasterChangeSeqNum; _entity.xObjectocalChangeSeqNum = tmp_xObjectocalChangeSeqNum; _entity.xObjectLastChangedBy = tmp_xObjectLastChangedBy; _entity.xObjectLct = tmp_xObjectLct; closure$_result.v = _entity; }return Unit; }; } function XObjectDao_JdbcKt$findByXobjectUid$lambda(closure$xObjectUid, closure$_result) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$xObjectUid); useResults(_stmt.executeQuery(), XObjectDao_JdbcKt$findByXobjectUid$lambda$lambda(closure$_result)); return Unit; }; } XObjectDao_JdbcKt.prototype.findByXobjectUid = function (xObjectUid) { var tmp$; var _result = {v: (tmp$ = null) == null || Kotlin.isType(tmp$, XObjectEntity) ? tmp$ : throwCCE()}; var _stmtConfig = new PreparedStatementConfig('SELECT * from XObjectEntity WHERE xObjectUid = ?', void 0, void 0, void 0, trimMargin('\n |SELECT * from XObjectEntity WHERE xObjectUid = ?\n |')); prepareAndUseStatement(this._db, _stmtConfig, XObjectDao_JdbcKt$findByXobjectUid$lambda(xObjectUid, _result)); return _result.v; }; XObjectDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterXObjectEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_176($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_176.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_176.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_176.prototype.constructor = Coroutine$insertAsync_176; Coroutine$insertAsync_176.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterXObjectEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_176(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterXObjectEntity_.insertList_4ezy5m$(entityList); }; function XObjectDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.objectType); _stmt.setString_vqvrqt$(2, _entity.objectId); _stmt.setString_vqvrqt$(3, _entity.definitionType); _stmt.setString_vqvrqt$(4, _entity.interactionType); _stmt.setString_vqvrqt$(5, _entity.correctResponsePattern); _stmt.setLong_6svq3l$(6, _entity.objectContentEntryUid); _stmt.setLong_6svq3l$(7, _entity.objectStatementRefUid); _stmt.setLong_6svq3l$(8, _entity.xObjectMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, _entity.xObjectocalChangeSeqNum); _stmt.setInt_vux9f0$(10, _entity.xObjectLastChangedBy); _stmt.setLong_6svq3l$(11, _entity.xObjectLct); _stmt.setLong_6svq3l$(12, _entity.xObjectUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } XObjectDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE XObjectEntity SET objectType = ?, objectId = ?, definitionType = ?, interactionType = ?, correctResponsePattern = ?, objectContentEntryUid = ?, objectStatementRefUid = ?, xObjectMasterChangeSeqNum = ?, xObjectocalChangeSeqNum = ?, xObjectLastChangedBy = ?, xObjectLct = ? WHERE xObjectUid = ?'; prepareAndUseStatement_0(this._db, _sql, XObjectDao_JdbcKt$updateList$lambda(entityList)); }; function XObjectDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.objectType); _stmt.setString_vqvrqt$(2, closure$entity.objectId); _stmt.setString_vqvrqt$(3, closure$entity.definitionType); _stmt.setString_vqvrqt$(4, closure$entity.interactionType); _stmt.setString_vqvrqt$(5, closure$entity.correctResponsePattern); _stmt.setLong_6svq3l$(6, closure$entity.objectContentEntryUid); _stmt.setLong_6svq3l$(7, closure$entity.objectStatementRefUid); _stmt.setLong_6svq3l$(8, closure$entity.xObjectMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, closure$entity.xObjectocalChangeSeqNum); _stmt.setInt_vux9f0$(10, closure$entity.xObjectLastChangedBy); _stmt.setLong_6svq3l$(11, closure$entity.xObjectLct); _stmt.setLong_6svq3l$(12, closure$entity.xObjectUid); return _stmt.executeUpdate(); }; } XObjectDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE XObjectEntity SET objectType = ?, objectId = ?, definitionType = ?, interactionType = ?, correctResponsePattern = ?, objectContentEntryUid = ?, objectStatementRefUid = ?, xObjectMasterChangeSeqNum = ?, xObjectocalChangeSeqNum = ?, xObjectLastChangedBy = ?, xObjectLct = ? WHERE xObjectUid = ?'; prepareAndUseStatement_0(this._db, _sql, XObjectDao_JdbcKt$update$lambda(entity)); }; function XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { var tmp$; switch (this.dbType) { case 1: return 'INSERT INTO XObjectEntity (xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; case 2: if (returnsId) { tmp$ = ' RETURNING xObjectUid'; } else tmp$ = ''; return "INSERT INTO XObjectEntity (xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES(COALESCE(?,nextval('XObjectEntity_xObjectUid_seq')), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + tmp$; default:throw IllegalArgumentException_init('Unsupported db type'); } }; XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.xObjectUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.xObjectUid); } stmt.setString_vqvrqt$(2, entity.objectType); stmt.setString_vqvrqt$(3, entity.objectId); stmt.setString_vqvrqt$(4, entity.definitionType); stmt.setString_vqvrqt$(5, entity.interactionType); stmt.setString_vqvrqt$(6, entity.correctResponsePattern); stmt.setLong_6svq3l$(7, entity.objectContentEntryUid); stmt.setLong_6svq3l$(8, entity.objectStatementRefUid); stmt.setLong_6svq3l$(9, entity.xObjectMasterChangeSeqNum); stmt.setLong_6svq3l$(10, entity.xObjectocalChangeSeqNum); stmt.setInt_vux9f0$(11, entity.xObjectLastChangedBy); stmt.setLong_6svq3l$(12, entity.xObjectLct); }; XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; XObjectDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao_JdbcKt', interfaces: [XObjectDao]}; function XObjectDao_ReplicateWrapper(_db, _dao) { XObjectDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_168($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_168.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_168.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_168.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_168; Coroutine$replicateOnNewNode_s8cxhz$_168.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_168(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_171($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_171.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_171.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_171.prototype.constructor = Coroutine$replicateOnChange_171; Coroutine$replicateOnChange_171.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_171(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_ReplicateWrapper.prototype.findByObjectId = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.findByXobjectUid = function (xObjectUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_177($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_177.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_177.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_177.prototype.constructor = Coroutine$insertAsync_177; Coroutine$insertAsync_177.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.xObjectUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(64, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.xObjectUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.xObjectLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.xObjectUid; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_177(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao_ReplicateWrapper', interfaces: [XObjectDao]}; function XObjectDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { XObjectDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_169($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_169.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_169.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_169.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_169; Coroutine$replicateOnNewNode_s8cxhz$_169.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_169(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_172($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_172.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_172.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_172.prototype.constructor = Coroutine$replicateOnChange_172; Coroutine$replicateOnChange_172.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_172(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_Repo.prototype.findByObjectId = function (id) { var _result = this._dao.findByObjectId(id); return _result; }; XObjectDao_Repo.prototype.findByXobjectUid = function (xObjectUid) { var _result = this._dao.findByXobjectUid(xObjectUid); return _result; }; XObjectDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_178($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_178.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_178.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_178.prototype.constructor = Coroutine$insertAsync_178; Coroutine$insertAsync_178.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default:this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_178(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; XObjectDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; XObjectDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; XObjectDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao_Repo', interfaces: [XObjectDao]}; function ContentEntryPicture_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.cepUri; }, set: function (value) { this.entity_0.cepUri = value; }}); Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.cepMd5; }, set: function (value) { this.entity_0.cepMd5 = value; }}); Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.cepFileSize; }, set: function (value) { this.entity_0.cepFileSize = value; }}); Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'ContentEntryPicture'; }}); ContentEntryPicture_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPicture_EwaAdapter', interfaces: [EntityWithAttachment]}; ContentEntryPicture_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; ContentEntryPicture_EwaAdapter.prototype.toString = function () { return 'ContentEntryPicture_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; ContentEntryPicture_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; ContentEntryPicture_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function CourseAssignmentSubmissionAttachment_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.casaUri; }, set: function (value) { this.entity_0.casaUri = value; }}); Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.casaMd5; }, set: function (value) { this.entity_0.casaMd5 = value; }}); Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.casaSize; }, set: function (value) { this.entity_0.casaSize = value; }}); Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'CourseAssignmentSubmissionAttachment'; }}); CourseAssignmentSubmissionAttachment_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachment_EwaAdapter', interfaces: [EntityWithAttachment]}; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.toString = function () { return 'CourseAssignmentSubmissionAttachment_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function CoursePicture_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.coursePictureUri; }, set: function (value) { this.entity_0.coursePictureUri = value; }}); Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.coursePictureMd5; }, set: function (value) { this.entity_0.coursePictureMd5 = value; }}); Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.coursePictureFileSize; }, set: function (value) { this.entity_0.coursePictureFileSize = value; }}); Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'CoursePicture'; }}); CoursePicture_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePicture_EwaAdapter', interfaces: [EntityWithAttachment]}; CoursePicture_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; CoursePicture_EwaAdapter.prototype.toString = function () { return 'CoursePicture_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; CoursePicture_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; CoursePicture_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function PersonPicture_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.personPictureUri; }, set: function (value) { this.entity_0.personPictureUri = value; }}); Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.personPictureMd5; }, set: function (value) { this.entity_0.personPictureMd5 = value; }}); Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.fileSize; }, set: function (value) { this.entity_0.fileSize = value; }}); Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'PersonPicture'; }}); PersonPicture_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPicture_EwaAdapter', interfaces: [EntityWithAttachment]}; PersonPicture_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; PersonPicture_EwaAdapter.prototype.toString = function () { return 'PersonPicture_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; PersonPicture_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; PersonPicture_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; var package$com = _.com || (_.com = {}); var package$ustadmobile = package$com.ustadmobile || (package$com.ustadmobile = {}); var package$core = package$ustadmobile.core || (package$ustadmobile.core = {}); var package$db = package$core.db || (package$core.db = {}); package$db.SiteTermsDao_JdbcKt = SiteTermsDao_JdbcKt; package$db.SiteTermsDao_ReplicateWrapper = SiteTermsDao_ReplicateWrapper; package$db.SiteTermsDao_Repo = SiteTermsDao_Repo; Object.defineProperty(package$db, 'UmAppDatabaseJsImplementations', {get: UmAppDatabaseJsImplementations_getInstance}); Object.defineProperty(UmAppDatabase_DoorMetadata, 'Companion', {get: UmAppDatabase_DoorMetadata$Companion_getInstance}); package$db.UmAppDatabase_DoorMetadata = UmAppDatabase_DoorMetadata; package$db.UmAppDatabase_JdbcKt = UmAppDatabase_JdbcKt; package$db.UmAppDatabase_ReplicateWrapper = UmAppDatabase_ReplicateWrapper; package$db.UmAppDatabase_ReplicationRunOnChangeRunner = UmAppDatabase_ReplicationRunOnChangeRunner; Object.defineProperty(UmAppDatabase_Repo, 'Companion', {get: UmAppDatabase_Repo$Companion_getInstance}); package$db.UmAppDatabase_Repo = UmAppDatabase_Repo; var package$dao = package$db.dao || (package$db.dao = {}); package$dao.AgentDao_JdbcKt = AgentDao_JdbcKt; package$dao.AgentDao_ReplicateWrapper = AgentDao_ReplicateWrapper; package$dao.AgentDao_Repo = AgentDao_Repo; package$dao.ChatDao_JdbcKt = ChatDao_JdbcKt; package$dao.ChatDao_ReplicateWrapper = ChatDao_ReplicateWrapper; package$dao.ChatDao_Repo = ChatDao_Repo; package$dao.ChatMemberDao_JdbcKt = ChatMemberDao_JdbcKt; package$dao.ChatMemberDao_ReplicateWrapper = ChatMemberDao_ReplicateWrapper; package$dao.ChatMemberDao_Repo = ChatMemberDao_Repo; package$dao.ClazzAssignmentContentJoinDao_JdbcKt = ClazzAssignmentContentJoinDao_JdbcKt; package$dao.ClazzAssignmentContentJoinDao_ReplicateWrapper = ClazzAssignmentContentJoinDao_ReplicateWrapper; package$dao.ClazzAssignmentContentJoinDao_Repo = ClazzAssignmentContentJoinDao_Repo; package$dao.ClazzAssignmentDao_JdbcKt = ClazzAssignmentDao_JdbcKt; package$dao.ClazzAssignmentDao_ReplicateWrapper = ClazzAssignmentDao_ReplicateWrapper; package$dao.ClazzAssignmentDao_Repo = ClazzAssignmentDao_Repo; package$dao.ClazzAssignmentRollUpDao_JdbcKt = ClazzAssignmentRollUpDao_JdbcKt; package$dao.ClazzAssignmentRollUpDao_Repo = ClazzAssignmentRollUpDao_Repo; package$dao.ClazzContentJoinDao_JdbcKt = ClazzContentJoinDao_JdbcKt; package$dao.ClazzContentJoinDao_ReplicateWrapper = ClazzContentJoinDao_ReplicateWrapper; package$dao.ClazzContentJoinDao_Repo = ClazzContentJoinDao_Repo; package$dao.ClazzDao_JdbcKt = ClazzDao_JdbcKt; package$dao.ClazzDao_ReplicateWrapper = ClazzDao_ReplicateWrapper; $$importsForInline$$['door-door-runtime'] = $module$door_door_runtime; package$dao.ClazzDao_Repo = ClazzDao_Repo; package$dao.ClazzEnrolmentDao_JdbcKt = ClazzEnrolmentDao_JdbcKt; package$dao.ClazzEnrolmentDao_ReplicateWrapper = ClazzEnrolmentDao_ReplicateWrapper; package$dao.ClazzEnrolmentDao_Repo = ClazzEnrolmentDao_Repo; package$dao.ClazzLogAttendanceRecordDao_JdbcKt = ClazzLogAttendanceRecordDao_JdbcKt; package$dao.ClazzLogAttendanceRecordDao_ReplicateWrapper = ClazzLogAttendanceRecordDao_ReplicateWrapper; package$dao.ClazzLogAttendanceRecordDao_Repo = ClazzLogAttendanceRecordDao_Repo; package$dao.ClazzLogDao_JdbcKt = ClazzLogDao_JdbcKt; package$dao.ClazzLogDao_ReplicateWrapper = ClazzLogDao_ReplicateWrapper; package$dao.ClazzLogDao_Repo = ClazzLogDao_Repo; package$dao.CommentsDao_JdbcKt = CommentsDao_JdbcKt; package$dao.CommentsDao_ReplicateWrapper = CommentsDao_ReplicateWrapper; package$dao.CommentsDao_Repo = CommentsDao_Repo; package$dao.ConnectivityStatusDao_JdbcKt = ConnectivityStatusDao_JdbcKt; package$dao.ContainerDao_JdbcKt = ContainerDao_JdbcKt; package$dao.ContainerDao_ReplicateWrapper = ContainerDao_ReplicateWrapper; package$dao.ContainerDao_Repo = ContainerDao_Repo; package$dao.ContainerETagDao_JdbcKt = ContainerETagDao_JdbcKt; package$dao.ContainerEntryDao_JdbcKt = ContainerEntryDao_JdbcKt; package$dao.ContainerEntryFileDao_JdbcKt = ContainerEntryFileDao_JdbcKt; package$dao.ContainerImportJobDao_JdbcKt = ContainerImportJobDao_JdbcKt; package$dao.ContentCategoryDao_JdbcKt = ContentCategoryDao_JdbcKt; package$dao.ContentCategoryDao_ReplicateWrapper = ContentCategoryDao_ReplicateWrapper; package$dao.ContentCategoryDao_Repo = ContentCategoryDao_Repo; package$dao.ContentCategorySchemaDao_JdbcKt = ContentCategorySchemaDao_JdbcKt; package$dao.ContentCategorySchemaDao_ReplicateWrapper = ContentCategorySchemaDao_ReplicateWrapper; package$dao.ContentCategorySchemaDao_Repo = ContentCategorySchemaDao_Repo; package$dao.ContentEntryContentCategoryJoinDao_JdbcKt = ContentEntryContentCategoryJoinDao_JdbcKt; package$dao.ContentEntryContentCategoryJoinDao_ReplicateWrapper = ContentEntryContentCategoryJoinDao_ReplicateWrapper; package$dao.ContentEntryContentCategoryJoinDao_Repo = ContentEntryContentCategoryJoinDao_Repo; package$dao.ContentEntryDao_JdbcKt = ContentEntryDao_JdbcKt; package$dao.ContentEntryDao_ReplicateWrapper = ContentEntryDao_ReplicateWrapper; $$importsForInline$$['ktor-ktor-client-core-js-legacy'] = $module$ktor_ktor_client_core_js_legacy; package$dao.ContentEntryDao_Repo = ContentEntryDao_Repo; package$dao.ContentEntryParentChildJoinDao_JdbcKt = ContentEntryParentChildJoinDao_JdbcKt; package$dao.ContentEntryParentChildJoinDao_ReplicateWrapper = ContentEntryParentChildJoinDao_ReplicateWrapper; package$dao.ContentEntryParentChildJoinDao_Repo = ContentEntryParentChildJoinDao_Repo; package$dao.ContentEntryPictureDao_JdbcKt = ContentEntryPictureDao_JdbcKt; package$dao.ContentEntryPictureDao_ReplicateWrapper = ContentEntryPictureDao_ReplicateWrapper; package$dao.ContentEntryPictureDao_Repo = ContentEntryPictureDao_Repo; package$dao.ContentEntryRelatedEntryJoinDao_JdbcKt = ContentEntryRelatedEntryJoinDao_JdbcKt; package$dao.ContentEntryRelatedEntryJoinDao_ReplicateWrapper = ContentEntryRelatedEntryJoinDao_ReplicateWrapper; package$dao.ContentEntryRelatedEntryJoinDao_Repo = ContentEntryRelatedEntryJoinDao_Repo; package$dao.ContentJobDao_JdbcKt = ContentJobDao_JdbcKt; package$dao.ContentJobItemDao_JdbcKt = ContentJobItemDao_JdbcKt; package$dao.ContextXObjectStatementJoinDao_JdbcKt = ContextXObjectStatementJoinDao_JdbcKt; package$dao.ContextXObjectStatementJoinDao_ReplicateWrapper = ContextXObjectStatementJoinDao_ReplicateWrapper; package$dao.ContextXObjectStatementJoinDao_Repo = ContextXObjectStatementJoinDao_Repo; package$dao.CourseAssignmentMarkDao_JdbcKt = CourseAssignmentMarkDao_JdbcKt; package$dao.CourseAssignmentMarkDao_ReplicateWrapper = CourseAssignmentMarkDao_ReplicateWrapper; package$dao.CourseAssignmentMarkDao_Repo = CourseAssignmentMarkDao_Repo; package$dao.CourseAssignmentSubmissionAttachmentDao_JdbcKt = CourseAssignmentSubmissionAttachmentDao_JdbcKt; package$dao.CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper = CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper; package$dao.CourseAssignmentSubmissionAttachmentDao_Repo = CourseAssignmentSubmissionAttachmentDao_Repo; package$dao.CourseAssignmentSubmissionDao_JdbcKt = CourseAssignmentSubmissionDao_JdbcKt; package$dao.CourseAssignmentSubmissionDao_ReplicateWrapper = CourseAssignmentSubmissionDao_ReplicateWrapper; package$dao.CourseAssignmentSubmissionDao_Repo = CourseAssignmentSubmissionDao_Repo; package$dao.CourseBlockDao_JdbcKt = CourseBlockDao_JdbcKt; package$dao.CourseBlockDao_ReplicateWrapper = CourseBlockDao_ReplicateWrapper; package$dao.CourseBlockDao_Repo = CourseBlockDao_Repo; package$dao.CourseDiscussionDao_JdbcKt = CourseDiscussionDao_JdbcKt; package$dao.CourseDiscussionDao_ReplicateWrapper = CourseDiscussionDao_ReplicateWrapper; package$dao.CourseDiscussionDao_Repo = CourseDiscussionDao_Repo; package$dao.CourseGroupMemberDao_JdbcKt = CourseGroupMemberDao_JdbcKt; package$dao.CourseGroupMemberDao_ReplicateWrapper = CourseGroupMemberDao_ReplicateWrapper; package$dao.CourseGroupMemberDao_Repo = CourseGroupMemberDao_Repo; package$dao.CourseGroupSetDao_JdbcKt = CourseGroupSetDao_JdbcKt; package$dao.CourseGroupSetDao_ReplicateWrapper = CourseGroupSetDao_ReplicateWrapper; package$dao.CourseGroupSetDao_Repo = CourseGroupSetDao_Repo; package$dao.CoursePictureDao_JdbcKt = CoursePictureDao_JdbcKt; package$dao.CoursePictureDao_ReplicateWrapper = CoursePictureDao_ReplicateWrapper; package$dao.CoursePictureDao_Repo = CoursePictureDao_Repo; package$dao.CourseTerminologyDao_JdbcKt = CourseTerminologyDao_JdbcKt; package$dao.CourseTerminologyDao_ReplicateWrapper = CourseTerminologyDao_ReplicateWrapper; package$dao.CourseTerminologyDao_Repo = CourseTerminologyDao_Repo; package$dao.CustomFieldDao_JdbcKt = CustomFieldDao_JdbcKt; package$dao.CustomFieldValueDao_JdbcKt = CustomFieldValueDao_JdbcKt; package$dao.CustomFieldValueOptionDao_JdbcKt = CustomFieldValueOptionDao_JdbcKt; package$dao.DiscussionPostDao_JdbcKt = DiscussionPostDao_JdbcKt; package$dao.DiscussionPostDao_ReplicateWrapper = DiscussionPostDao_ReplicateWrapper; package$dao.DiscussionPostDao_Repo = DiscussionPostDao_Repo; package$dao.DiscussionTopicDao_JdbcKt = DiscussionTopicDao_JdbcKt; package$dao.DiscussionTopicDao_ReplicateWrapper = DiscussionTopicDao_ReplicateWrapper; package$dao.DiscussionTopicDao_Repo = DiscussionTopicDao_Repo; package$dao.EntityRoleDao_JdbcKt = EntityRoleDao_JdbcKt; package$dao.EntityRoleDao_Repo = EntityRoleDao_Repo; package$dao.ErrorReportDao_JdbcKt = ErrorReportDao_JdbcKt; package$dao.ErrorReportDao_ReplicateWrapper = ErrorReportDao_ReplicateWrapper; package$dao.ErrorReportDao_Repo = ErrorReportDao_Repo; package$dao.GroupLearningSessionDao_JdbcKt = GroupLearningSessionDao_JdbcKt; package$dao.GroupLearningSessionDao_ReplicateWrapper = GroupLearningSessionDao_ReplicateWrapper; package$dao.GroupLearningSessionDao_Repo = GroupLearningSessionDao_Repo; package$dao.HolidayCalendarDao_JdbcKt = HolidayCalendarDao_JdbcKt; package$dao.HolidayCalendarDao_ReplicateWrapper = HolidayCalendarDao_ReplicateWrapper; package$dao.HolidayCalendarDao_Repo = HolidayCalendarDao_Repo; package$dao.HolidayDao_JdbcKt = HolidayDao_JdbcKt; package$dao.HolidayDao_ReplicateWrapper = HolidayDao_ReplicateWrapper; package$dao.HolidayDao_Repo = HolidayDao_Repo; package$dao.LanguageDao_JdbcKt = LanguageDao_JdbcKt; package$dao.LanguageDao_ReplicateWrapper = LanguageDao_ReplicateWrapper; package$dao.LanguageDao_Repo = LanguageDao_Repo; package$dao.LanguageVariantDao_JdbcKt = LanguageVariantDao_JdbcKt; package$dao.LanguageVariantDao_ReplicateWrapper = LanguageVariantDao_ReplicateWrapper; package$dao.LanguageVariantDao_Repo = LanguageVariantDao_Repo; package$dao.LearnerGroupDao_JdbcKt = LearnerGroupDao_JdbcKt; package$dao.LearnerGroupDao_ReplicateWrapper = LearnerGroupDao_ReplicateWrapper; package$dao.LearnerGroupDao_Repo = LearnerGroupDao_Repo; package$dao.LearnerGroupMemberDao_JdbcKt = LearnerGroupMemberDao_JdbcKt; package$dao.LearnerGroupMemberDao_ReplicateWrapper = LearnerGroupMemberDao_ReplicateWrapper; package$dao.LearnerGroupMemberDao_Repo = LearnerGroupMemberDao_Repo; package$dao.LeavingReasonDao_JdbcKt = LeavingReasonDao_JdbcKt; package$dao.LeavingReasonDao_ReplicateWrapper = LeavingReasonDao_ReplicateWrapper; package$dao.LeavingReasonDao_Repo = LeavingReasonDao_Repo; package$dao.LocallyAvailableContainerDao_JdbcKt = LocallyAvailableContainerDao_JdbcKt; package$dao.MessageDao_JdbcKt = MessageDao_JdbcKt; package$dao.MessageDao_ReplicateWrapper = MessageDao_ReplicateWrapper; package$dao.MessageDao_Repo = MessageDao_Repo; package$dao.MessageReadDao_JdbcKt = MessageReadDao_JdbcKt; package$dao.MessageReadDao_ReplicateWrapper = MessageReadDao_ReplicateWrapper; package$dao.MessageReadDao_Repo = MessageReadDao_Repo; package$dao.NetworkNodeDao_JdbcKt = NetworkNodeDao_JdbcKt; package$dao.PersonAuth2Dao_JdbcKt = PersonAuth2Dao_JdbcKt; package$dao.PersonAuth2Dao_ReplicateWrapper = PersonAuth2Dao_ReplicateWrapper; package$dao.PersonAuth2Dao_Repo = PersonAuth2Dao_Repo; package$dao.PersonAuthDao_JdbcKt = PersonAuthDao_JdbcKt; package$dao.PersonDao_JdbcKt = PersonDao_JdbcKt; package$dao.PersonDao_ReplicateWrapper = PersonDao_ReplicateWrapper; package$dao.PersonDao_Repo = PersonDao_Repo; package$dao.PersonGroupDao_JdbcKt = PersonGroupDao_JdbcKt; package$dao.PersonGroupDao_ReplicateWrapper = PersonGroupDao_ReplicateWrapper; package$dao.PersonGroupDao_Repo = PersonGroupDao_Repo; package$dao.PersonGroupMemberDao_JdbcKt = PersonGroupMemberDao_JdbcKt; package$dao.PersonGroupMemberDao_ReplicateWrapper = PersonGroupMemberDao_ReplicateWrapper; package$dao.PersonGroupMemberDao_Repo = PersonGroupMemberDao_Repo; package$dao.PersonParentJoinDao_JdbcKt = PersonParentJoinDao_JdbcKt; package$dao.PersonParentJoinDao_ReplicateWrapper = PersonParentJoinDao_ReplicateWrapper; package$dao.PersonParentJoinDao_Repo = PersonParentJoinDao_Repo; package$dao.PersonPictureDao_JdbcKt = PersonPictureDao_JdbcKt; package$dao.PersonPictureDao_ReplicateWrapper = PersonPictureDao_ReplicateWrapper; package$dao.PersonPictureDao_Repo = PersonPictureDao_Repo; package$dao.ReportDao_JdbcKt = ReportDao_JdbcKt; package$dao.ReportDao_ReplicateWrapper = ReportDao_ReplicateWrapper; package$dao.ReportDao_Repo = ReportDao_Repo; package$dao.ScheduleDao_JdbcKt = ScheduleDao_JdbcKt; package$dao.ScheduleDao_ReplicateWrapper = ScheduleDao_ReplicateWrapper; package$dao.ScheduleDao_Repo = ScheduleDao_Repo; package$dao.ScheduledCheckDao_JdbcKt = ScheduledCheckDao_JdbcKt; package$dao.SchoolDao_JdbcKt = SchoolDao_JdbcKt; package$dao.SchoolDao_ReplicateWrapper = SchoolDao_ReplicateWrapper; package$dao.SchoolDao_Repo = SchoolDao_Repo; package$dao.SchoolMemberDao_JdbcKt = SchoolMemberDao_JdbcKt; package$dao.SchoolMemberDao_ReplicateWrapper = SchoolMemberDao_ReplicateWrapper; package$dao.SchoolMemberDao_Repo = SchoolMemberDao_Repo; package$dao.ScopedGrantDao_JdbcKt = ScopedGrantDao_JdbcKt; package$dao.ScopedGrantDao_ReplicateWrapper = ScopedGrantDao_ReplicateWrapper; package$dao.ScopedGrantDao_Repo = ScopedGrantDao_Repo; package$dao.ScrapeQueueItemDao_JdbcKt = ScrapeQueueItemDao_JdbcKt; package$dao.ScrapeRunDao_JdbcKt = ScrapeRunDao_JdbcKt; package$dao.SiteDao_JdbcKt = SiteDao_JdbcKt; package$dao.SiteDao_ReplicateWrapper = SiteDao_ReplicateWrapper; package$dao.SiteDao_Repo = SiteDao_Repo; package$dao.StateContentDao_JdbcKt = StateContentDao_JdbcKt; package$dao.StateContentDao_ReplicateWrapper = StateContentDao_ReplicateWrapper; package$dao.StateContentDao_Repo = StateContentDao_Repo; package$dao.StateDao_JdbcKt = StateDao_JdbcKt; package$dao.StateDao_ReplicateWrapper = StateDao_ReplicateWrapper; package$dao.StateDao_Repo = StateDao_Repo; package$dao.StatementDao_JdbcKt = StatementDao_JdbcKt; package$dao.StatementDao_ReplicateWrapper = StatementDao_ReplicateWrapper; package$dao.StatementDao_Repo = StatementDao_Repo; package$dao.SyncNodeDao_JdbcKt = SyncNodeDao_JdbcKt; package$dao.UserSessionDao_JdbcKt = UserSessionDao_JdbcKt; package$dao.UserSessionDao_ReplicateWrapper = UserSessionDao_ReplicateWrapper; package$dao.UserSessionDao_Repo = UserSessionDao_Repo; package$dao.VerbDao_JdbcKt = VerbDao_JdbcKt; package$dao.VerbDao_ReplicateWrapper = VerbDao_ReplicateWrapper; package$dao.VerbDao_Repo = VerbDao_Repo; package$dao.XLangMapEntryDao_JdbcKt = XLangMapEntryDao_JdbcKt; package$dao.XLangMapEntryDao_ReplicateWrapper = XLangMapEntryDao_ReplicateWrapper; package$dao.XLangMapEntryDao_Repo = XLangMapEntryDao_Repo; package$dao.XObjectDao_JdbcKt = XObjectDao_JdbcKt; package$dao.XObjectDao_ReplicateWrapper = XObjectDao_ReplicateWrapper; package$dao.XObjectDao_Repo = XObjectDao_Repo; var package$lib = package$ustadmobile.lib || (package$ustadmobile.lib = {}); var package$db_0 = package$lib.db || (package$lib.db = {}); var package$entities = package$db_0.entities || (package$db_0.entities = {}); package$entities.ContentEntryPicture_EwaAdapter = ContentEntryPicture_EwaAdapter; package$entities.CourseAssignmentSubmissionAttachment_EwaAdapter = CourseAssignmentSubmissionAttachment_EwaAdapter; package$entities.CoursePicture_EwaAdapter = CoursePicture_EwaAdapter; package$entities.PersonPicture_EwaAdapter = PersonPicture_EwaAdapter; return _; })); //# sourceMappingURL=UstadMobile-lib-database-mpp.js.map